From: Antonio Gomes Date: Tue, 7 Apr 2015 06:43:26 +0000 (-0400) Subject: [M67 Dev][EFL] Allow chromium to use EFL instead of Aura X-Git-Tag: submit/tizen/20201118.160233~288 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f6a1563313a523fdddc40b472d87a273c79ced7;p=platform%2Fframework%2Fweb%2Fchromium-efl.git [M67 Dev][EFL] Allow chromium to use EFL instead of Aura This commit allows chromium code to use EFL as the main UI toolkit instead of Aura. The actual implementation of EFL port of chromium is done in an external module. This commit only exposes some of the needed generic code paths that are normally disabled for non Aura or MacOSX ports. Reference: 5e22fe4d0bb137a1b73530205f7cdc07a31643c9 Change-Id: I1f327fb9e31616879cf0448735f1adbe82e476bf Signed-off-by: Piotr Tworek Signed-off-by: Youngsoo Choi --- diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 7e20243..a2586ba 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -135,7 +135,7 @@ #include "ui/display/display_switches.h" #include "ui/gfx/switches.h" -#if defined(USE_AURA) || defined(OS_MACOSX) +#if defined(USE_AURA) || defined(OS_MACOSX) || defined(USE_EFL) #include "content/browser/compositor/image_transport_factory.h" #endif @@ -1054,7 +1054,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { BrowserCompositorMac::DisableRecyclingForShutdown(); #endif -#if defined(USE_AURA) || defined(OS_MACOSX) +#if defined(USE_AURA) || defined(OS_MACOSX) || defined(USE_EFL) { TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:ImageTransportFactory"); diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index be18d40..889e1b4 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -2261,7 +2261,7 @@ void RenderWidget::OnImeEventGuardFinish(ImeEventGuard* guard) { // are ignored. These must explicitly be updated once finished handling the // ime event. UpdateSelectionBounds(); -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(USE_EFL) if (guard->show_virtual_keyboard()) ShowVirtualKeyboard(); else @@ -2477,7 +2477,7 @@ blink::WebScreenInfo RenderWidget::GetScreenInfo() { void RenderWidget::DidHandleGestureEvent(const WebGestureEvent& event, bool event_cancelled) { -#if defined(OS_ANDROID) || defined(USE_AURA) +#if defined(OS_ANDROID) || defined(USE_AURA) || defined(USE_EFL) if (event_cancelled) return; if (event.GetType() == WebInputEvent::kGestureTap) { diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h index 94236ad..e554c7b 100644 --- a/ui/base/clipboard/clipboard.h +++ b/ui/base/clipboard/clipboard.h @@ -70,7 +70,7 @@ class UI_BASE_EXPORT Clipboard : public base::ThreadChecker { #if defined(OS_WIN) const FORMATETC& ToFormatEtc() const { return data_; } -#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) +#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(USE_EFL) const std::string& ToString() const { return data_; } #elif defined(OS_MACOSX) NSString* ToNSString() const { return data_; } @@ -96,7 +96,7 @@ class UI_BASE_EXPORT Clipboard : public base::ThreadChecker { explicit FormatType(UINT native_format); FormatType(UINT native_format, LONG index); FORMATETC data_; -#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) +#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(USE_EFL) explicit FormatType(const std::string& native_format); std::string data_; #elif defined(OS_MACOSX) diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h index 7ceeee1..f55c467 100644 --- a/ui/gfx/native_widget_types.h +++ b/ui/gfx/native_widget_types.h @@ -42,7 +42,7 @@ // 'views' and with our Chrome UI code where the elements are also called // 'views'. -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) namespace aura { class Window; } @@ -51,7 +51,7 @@ class Cursor; enum class CursorType; class Event; } -#endif // defined(USE_AURA) +#endif // defined(USE_AURA) || defined(USE_EFL) #if defined(OS_WIN) typedef struct HFONT__* HFONT; @@ -132,6 +132,12 @@ typedef void* NativeCursor; typedef ui::ViewAndroid* NativeView; typedef ui::WindowAndroid* NativeWindow; typedef base::android::ScopedJavaGlobalRef NativeEvent; +#elif defined(USE_EFL) +typedef ui::Cursor NativeCursor; +typedef void* NativeView; +typedef void* NativeWindow; +typedef SkRegion* NativeRegion; +typedef ui::Event* NativeEvent; #else #error Unknown build environment. #endif @@ -155,7 +161,7 @@ typedef void* NativeViewAccessible; #endif // A constant value to indicate that gfx::NativeCursor refers to no cursor. -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) const ui::CursorType kNullCursor = static_cast(0); #else const gfx::NativeCursor kNullCursor = static_cast(NULL);