[wayland][tizen v3.0] Initial support for TV and mobile
authorYoungsoo Choi <kenshin.choi@samsung.com>
Thu, 2 Apr 2015 06:15:46 +0000 (15:15 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Note that this patch does not directly handle any wayland APIs.
It will be handled in other patch set, enabling blocked feature.

1) All of x11 dependent codes are blocked by flag 'BRINGUP_WAYLAND'.
   It is starting point of supporting chromium-efl on wayland.

2) The wayland library rpm packages are included, and
   the required packages are listed in alphabetical order in spec file.

3) In gyp, all changes of wayland are located under
   the condition 'building_for_tizen' to avoid affecting desktop build.

4) This patch supports builds for TV and mobile on arm-wayland or arm-x11,
   including desktop.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=12490
Reviewed by: Antonio Gomes, DaeHyun Ko, Hyunhak Kim, SeungSeop Park

Change-Id: Ie059c270a1545bbba98e4297014f905d5883afe3
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
40 files changed:
tizen_src/build/common.sh
tizen_src/build/gyp_chromiumefl.sh
tizen_src/build/system.gyp
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/common/cursors/webcursor_efl.cc
tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl.cc
tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl_pixmap.cc
tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl.cc
tizen_src/chromium_impl/content/content_efl.gypi
tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc
tizen_src/chromium_impl/efl/init.cc
tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.h
tizen_src/chromium_impl/media/base/efl/media_source_player_gstreamer.h
tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h
tizen_src/chromium_impl/media/media_efl.gypi
tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.cc
tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.h
tizen_src/chromium_impl/ui/gfx/screen_efl.cc
tizen_src/chromium_impl/ui/gl/efl_pixmap.h
tizen_src/chromium_impl/ui/ui_efl.gypi
tizen_src/ecore_wrapper/ecore_x_wayland_wrapper.h [moved from tizen_src/gcc46_compat_wrappers/ecore_x_wrapper.h with 59% similarity]
tizen_src/ewk/efl_integration/autofill_popup_view_efl.h
tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.cc
tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.h
tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.cc
tizen_src/ewk/efl_integration/context_menu_controller_efl.cc
tizen_src/ewk/efl_integration/efl_integration.gypi
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/popup_controller_efl.cc
tizen_src/ewk/efl_integration/public/ewk_main.cc
tizen_src/ewk/efl_webview_app/app.c
tizen_src/ewk/efl_webview_app/efl_webview_app.gypi
tizen_src/ewk/efl_webview_app/elm_cycle_app.c
tizen_src/ewk/efl_webview_app/mini_browser.c
tizen_src/ewk/unittest/ewk-tests.gypi
tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_closed.cpp
tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_opened.cpp
tizen_src/impl/chromedriver_efl.gypi
tizen_src/packaging/chromium-efl.spec
tizen_src/supplement.gypi

index a899ad8..45bdae0 100755 (executable)
@@ -24,7 +24,7 @@ function getHostOs() {
 
 function getHostArch() {
   echo $(uname -m | sed -e \
-        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
+        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/;s/aarch64/arm64/')
 }
 
 function getPythonVersion() {
index 3352f07..05b103d 100755 (executable)
@@ -27,6 +27,12 @@ while [[ $# > 0 ]]; do
     -Dchromium_efl_tizen_version=*)
       tizen_version=$(echo $1 | sed -e 's#-Dchromium_efl_tizen_version\=\([0-9.]*\)#\1#')
       ;;
+    -Dtizen_emulator_support=1)
+      tizen_emulator_support=1
+      ;;
+    -Duse_wayland=1)
+      use_wayland=1
+      ;;
   esac
   shift;
 done
@@ -73,6 +79,7 @@ add_desktop_flags() {
                               -Dtizen_multimedia_use_capi_for_me=0
                               -Dtizen_multimedia_support=1
                               -Dwerror=
+                              -Duse_wayland=0
                              "
 }
 
@@ -112,7 +119,6 @@ add_tizen_flags() {
                                "
   fi
 
-
   if [ "$target" == "mobile" ]; then
     ADDITIONAL_GYP_PARAMETERS+="-Dtizen_multimedia_use_capi_for_me=0
                                "
@@ -123,6 +129,23 @@ add_tizen_flags() {
     ADDITIONAL_GYP_PARAMETERS+="-Dtizen_multimedia_use_capi_for_me=0
                                "
   fi
+
+  add_wayland_flags
+}
+
+add_wayland_flags() {
+  if [ "$use_wayland" == "1" ]; then
+    ADDITIONAL_GYP_PARAMETERS+="-Duse_wayland=1
+                                -Dwayland_bringup=1
+                                -Duse_x11=0
+                                -Dtizen_multimedia_pixmap_support=0
+                               "
+  else
+    ADDITIONAL_GYP_PARAMETERS+="-Duse_wayland=0
+                                -Dwayland_bringup=0
+                                -Duse_x11=1
+                               "
+  fi
 }
 
 add_gbs_flags() {
index 40a8c7c..8fb5d98 100644 (file)
     {
       'target_name': 'ecore-x',
       'type': 'none',
-      'direct_dependent_settings': {
-        'cflags': [
-          '<!@(<(pkg-config) --cflags ecore-x)',
-        ],
-      },
-      'link_settings': {
-        'ldflags': [
-          '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-x)',
-        ],
-        'libraries': [
-          '<!@(<(pkg-config) --libs-only-l ecore-x)',
-        ],
-      },
+      'conditions': [
+        ['use_wayland==0', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags ecore-x)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-x)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l ecore-x)',
+            ],
+          },
+        }],
+      ],
     }, # ecore-x
     {
+      'target_name': 'ecore-wayland',
+      'type': 'none',
+      'conditions': [
+        ['building_for_tizen==1 and use_wayland==1', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags ecore-wayland)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-wayland)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l ecore-wayland)',
+            ],
+          },
+        }],
+      ],
+    }, # ecore-wayland
+    {
       'target_name': 'ecore-evas',
       'type': 'none',
       'direct_dependent_settings': {
       'target_name': 'libdri2',
       'type': 'none',
       'conditions': [
-        ['building_for_tizen==1', {
+        ['building_for_tizen==1 and use_wayland==0', {
           'direct_dependent_settings': {
             'cflags': [
               '<!@(<(pkg-config) --cflags libdri2)',
         }],
       ],
     }, # feedback
+    {
+      'target_name': 'wayland-client',
+      'type': 'none',
+      'conditions': [
+        ['building_for_tizen==1 and use_wayland==1', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags wayland-client)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other wayland-client)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l wayland-client)',
+            ],
+          },
+        }],
+      ],
+    }, # wayland-client
+    {
+      'target_name': 'wayland-cursor',
+      'type': 'none',
+      'conditions': [
+        ['building_for_tizen==1 and use_wayland==1', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags wayland-cursor)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other wayland-cursor)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l wayland-cursor)',
+            ],
+          },
+        }],
+      ],
+    }, # wayland-cursor
+    {
+      'target_name': 'wayland-egl',
+      'type': 'none',
+      'conditions': [
+        ['building_for_tizen==1 and use_wayland==1', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags wayland-egl)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other wayland-egl)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l wayland-egl)',
+            ],
+          },
+        }],
+      ],
+    }, # wayland-egl
+    {
+      'target_name': 'wayland-server',
+      'type': 'none',
+      'conditions': [
+        ['building_for_tizen==1 and use_wayland==1', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags wayland-server)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other wayland-server)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l wayland-server)',
+            ],
+          },
+        }],
+      ],
+    }, # wayland-server
+    {
+      'target_name': 'xkbcommon',
+      'type': 'none',
+      'conditions': [
+        ['building_for_tizen==1 and use_wayland==1', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags xkbcommon)',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other xkbcommon)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l xkbcommon)',
+            ],
+          },
+        }],
+      ],
+    }, # xkbcommon
   ],
 }
index 8d65a8c..ac0c81f 100644 (file)
@@ -8,7 +8,7 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_Input.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #include <Elementary.h>
 
 #include "base/auto_reset.h"
@@ -529,7 +529,12 @@ void RenderWidgetHostViewEfl::SetSize(const gfx::Size& size) {
   int height = std::min(size.height(), EFL_MAX_HEIGHT);
   if (popup_type_ != blink::WebPopupTypeNone) {
     // We're a popup, honor the size request.
+    // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_resize(GetEcoreXWindow(), width, height);
+#else
+    NOTIMPLEMENTED();
+#endif
   }
 
   // Update the size of the RWH.
@@ -623,17 +628,32 @@ void RenderWidgetHostViewEfl::MovePluginContainer(const WebPluginGeometry& move)
     return;
 
   if (!move.visible) {
+    // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_hide(surface_window);
+#else
+    NOTIMPLEMENTED();
+#endif
     return;
   }
 
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   ecore_x_window_show(surface_window);
+#else
+  NOTIMPLEMENTED();
+#endif
 
   if (!move.rects_valid)
     return;
 
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   ecore_x_window_move(surface_window, move.window_rect.x(), move.window_rect.y());
   ecore_x_window_resize(surface_window, move.window_rect.width(), move.window_rect.height());
+#else
+  NOTIMPLEMENTED();
+#endif
 }
 
 void RenderWidgetHostViewEfl::MovePluginWindows(
@@ -645,13 +665,23 @@ void RenderWidgetHostViewEfl::MovePluginWindows(
 void RenderWidgetHostViewEfl::UpdateCursor(const WebCursor& webcursor) {
   if (is_loading_) {
     // Setting native Loading cursor
+    // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_cursor_set(GetEcoreXWindow(), ecore_x_cursor_shape_get(ECORE_X_CURSOR_CLOCK));
+#else
+    NOTIMPLEMENTED();
+#endif
   } else {
     WebCursor::CursorInfo cursor_info;
     webcursor.GetCursorInfo(&cursor_info);
 
     int cursor_type = GetCursorType(cursor_info.type);
+    // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_cursor_set(GetEcoreXWindow(), ecore_x_cursor_shape_get(cursor_type));
+#else
+    NOTIMPLEMENTED();
+#endif
   }
   // Need to check for cursor visibility
   //ecore_x_window_cursor_show(GetEcoreXWindow(), true);
@@ -1178,7 +1208,7 @@ void RenderWidgetHostViewEfl::OnMouseMove(
 
   if (!rwhv->touch_events_enabled_) {
     blink::WebMouseEvent event = MakeWebMouseEvent(obj,
-       static_cast<Evas_Event_Mouse_Move*>(event_info));
+        static_cast<Evas_Event_Mouse_Move*>(event_info));
     rwhv->host_->ForwardMouseEvent(event);
   } else {
     rwhv->ProcessTouchEvents();
@@ -1242,9 +1272,9 @@ void RenderWidgetHostViewEfl::OnMouseWheel(
       return;
 
   if (!rwhv->touch_events_enabled_) {
-      blink::WebMouseWheelEvent event = MakeWebMouseEvent(
-          obj, static_cast<Evas_Event_Mouse_Wheel*>(event_info));
-      rwhv->host_->ForwardWheelEvent(event);
+    blink::WebMouseWheelEvent event = MakeWebMouseEvent(
+        obj, static_cast<Evas_Event_Mouse_Wheel*>(event_info));
+    rwhv->host_->ForwardWheelEvent(event);
   }
 }
 
index fd58ef7..59b9f14 100644 (file)
@@ -4,7 +4,7 @@
 // found in the LICENSE file.
 #include "content/common/cursors/webcursor_efl.h"
 
-#include "ecore_x_wrapper.h"
+#include "ecore_x_wayland_wrapper.h"
 
 #include "base/logging.h"
 #include "content/common/cursors/webcursor.h"
@@ -36,6 +36,8 @@ void WebCursor::CopyPlatformData(const WebCursor& other) {
 } // namespace content
 
 int GetCursorType(int type) {
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   switch (type) {
     case WebCursorInfo::TypePointer:
       return ECORE_X_CURSOR_ARROW;
@@ -124,4 +126,8 @@ int GetCursorType(int type) {
   }
   NOTREACHED();
   return ECORE_X_CURSOR_XTERM;
+#else
+  NOTIMPLEMENTED();
+  return 0;
+#endif
 }
index 56affbd..15c7559 100644 (file)
@@ -31,11 +31,16 @@ void GpuMemoryBufferImpl::Create(gfx::GpuMemoryBufferId id,
                                  Usage usage,
                                  int client_id,
                                  const CreationCallback& callback) {
+  // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   if (IsZeroCopyEnabled() &&
       GpuMemoryBufferImplEflPixmap::IsConfigurationSupported(format, usage)) {
     GpuMemoryBufferImplEflPixmap::Create(id, size, format, client_id, callback);
     return;
   }
+#else
+  NOTIMPLEMENTED();
+#endif
 
   if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
           size, format, usage)) {
@@ -55,12 +60,17 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
     base::ProcessHandle child_process,
     int child_client_id,
     const AllocationCallback& callback) {
+    // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   if (IsZeroCopyEnabled() &&
       GpuMemoryBufferImplEflPixmap::IsConfigurationSupported(format, usage)) {
     GpuMemoryBufferImplEflPixmap::AllocateForChildProcess(
         id, size, format, child_client_id, callback);
     return;
   }
+#else
+  NOTIMPLEMENTED();
+#endif
 
   if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
           size, format, usage)) {
@@ -83,8 +93,13 @@ void GpuMemoryBufferImpl::DeletedByChildProcess(
     case gfx::SHARED_MEMORY_BUFFER:
       break;
     case gfx::EFL_PIXMAP_BUFFER:
+      // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
       GpuMemoryBufferImplEflPixmap::DeletedByChildProcess(
           id, child_client_id, sync_point);
+#else
+      NOTIMPLEMENTED();
+#endif
       break;
     default:
       NOTREACHED();
@@ -103,8 +118,14 @@ scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle(
       return GpuMemoryBufferImplSharedMemory::CreateFromHandle(
                  handle, size, format, callback);
     case gfx::EFL_PIXMAP_BUFFER:
+       // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
       return GpuMemoryBufferImplEflPixmap::CreateFromHandle(
                  handle, size, format, callback);
+#else
+      NOTIMPLEMENTED();
+      return NULL;
+#endif
     default:
       return scoped_ptr<GpuMemoryBufferImpl>();
   }
index a75b82f..b4e7faf 100644 (file)
@@ -107,9 +107,15 @@ scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImplEflPixmap::CreateFromHandle(
     const DestructionCallback& callback) {
   DCHECK(IsFormatSupported(format));
   DCHECK(handle.efl_pixmap_id);
+  // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   return make_scoped_ptr<GpuMemoryBufferImpl>(new GpuMemoryBufferImplEflPixmap(
              handle.id, size, format, callback,make_scoped_ptr<gfx::EflPixmapImpl>(new gfx::EflPixmapImpl(
                  gfx::EflPixmapBase::BUFFER, handle.efl_pixmap_id))));
+#else
+  NOTIMPLEMENTED();
+  return NULL;
+#endif
 }
 
 void GpuMemoryBufferImplEflPixmap::DeletedByChildProcess(
index 01ed39f..6ea39ed 100644 (file)
@@ -27,10 +27,16 @@ class GpuMemoryBufferFactoryImpl:
       gfx::GpuMemoryBuffer::Usage usage,
       int client_id) override {
     switch (type) {
-      case gfx::EFL_PIXMAP_BUFFER:{
+      case gfx::EFL_PIXMAP_BUFFER: {
+      // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
         return efl_pixmap_factory_.CreateGpuMemoryBuffer(
                    id, size, format,client_id);
-     }
+#else
+        NOTIMPLEMENTED();
+        return NULL;
+#endif
+      }
       default:
         NOTREACHED();
         return gfx::GpuMemoryBufferHandle();
@@ -42,7 +48,12 @@ class GpuMemoryBufferFactoryImpl:
       int client_id) override {
     switch (type) {
       case gfx::EFL_PIXMAP_BUFFER:
+        // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
         efl_pixmap_factory_.DestroyGpuMemoryBuffer(id, client_id);
+#else
+        NOTIMPLEMENTED();
+#endif
         break;
       default:
         NOTREACHED();
@@ -67,8 +78,14 @@ class GpuMemoryBufferFactoryImpl:
         return image;
       }
       case gfx::EFL_PIXMAP_BUFFER: {
-             return efl_pixmap_factory_.CreateImageForGpuMemoryBuffer(
+        // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
+        return efl_pixmap_factory_.CreateImageForGpuMemoryBuffer(
             handle.efl_pixmap_id, size, internalformat,client_id);
+#else
+        NOTIMPLEMENTED();
+        return NULL;
+#endif
       }
       default:
         NOTREACHED();
@@ -76,8 +93,11 @@ class GpuMemoryBufferFactoryImpl:
     }
   }
 
+#if !defined(WAYLAND_BRINGUP)
  private:
+  // TODO: Rendering TG will implement following for Wayland.
   GpuMemoryBufferFactoryEflPixmap efl_pixmap_factory_;
+#endif
 };
 
 }  // namespace
index 37a7df7..39a2f4f 100644 (file)
@@ -5,7 +5,6 @@
 {
   'variables': {
     'external_content_common_deps': [
-      '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
       '<(DEPTH)/tizen_src/build/system.gyp:capi-appfw-application',
       '<(DEPTH)/tizen_src/build/system.gyp:capi-system-system-settings',
       '<(DEPTH)/tizen_src/build/system.gyp:gstreamer',
@@ -13,7 +12,6 @@
     ],
     'external_content_browser_deps': [
       '<(DEPTH)/tizen_src/build/system.gyp:ecore',
-      '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
       '<(DEPTH)/tizen_src/build/system.gyp:ecore-imf-evas',
       '<(DEPTH)/tizen_src/build/system.gyp:ecore-evas',
       '<(DEPTH)/tizen_src/build/system.gyp:elementary',
@@ -33,7 +31,6 @@
     'external_content_shell_deps': [
       '<(DEPTH)/tizen_src/build/system.gyp:evas',
       '<(DEPTH)/tizen_src/build/system.gyp:ecore-evas',
-      '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
       '<(DEPTH)/tizen_src/build/system.gyp:elementary',
       '<(DEPTH)/tizen_src/chromium_impl/efl/efl.gyp:efl-init',
       '<(DEPTH)/tizen_src/chromium_impl/components/components.gyp:js_dialogs_efl',
     'external_native_theme_deps': [
       '<(DEPTH)/tizen_src/chromium_impl/ui/ui_targets_efl.gyp:ui_native_theme_inject',
     ],
+    'conditions': [
+      ['use_wayland==0', {
+        'external_content_common_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+        ],
+        'external_content_browser_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+        ],
+        'external_content_shell_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+        ],
+      },
+      {
+        'external_content_common_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+        ],
+        'external_content_browser_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+        ],
+        'external_content_shell_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+        ],
+      }],
+    ],
   },
 
   'target_defaults': {
index b51b8e9..457f4e3 100644 (file)
@@ -24,7 +24,7 @@ void timetofull_vconf_cb(keynode_t* key, void* data) {
   if (!bsm || !timetofull_changed_cb)
     return;
 
-  char* keyname = vconf_keynode_get_name(key);
+  const char* keyname = vconf_keynode_get_name(key);
   if (keyname == NULL)
     return;
 
@@ -34,8 +34,6 @@ void timetofull_vconf_cb(keynode_t* key, void* data) {
       time > 0) {
     timetofull_changed_cb(time, timetofull_cb_user_data);
   }
-
-  free(keyname);
 }
 
 void timetoempty_vconf_cb(keynode_t* key, void* data) {
@@ -45,7 +43,7 @@ void timetoempty_vconf_cb(keynode_t* key, void* data) {
   if (!bsm || !timetoempty_changed_cb)
     return;
 
-  char* keyname = vconf_keynode_get_name(key);
+  const char* keyname = vconf_keynode_get_name(key);
   if (keyname == NULL)
     return;
 
@@ -55,8 +53,6 @@ void timetoempty_vconf_cb(keynode_t* key, void* data) {
       time > 0) {
     timetoempty_changed_cb(time, timetoempty_cb_user_data);
   }
-
-  free(keyname);
 }
 
 void OnChargingStatusChanged(keynode_t* key, void* data) {
index 1662e91..618d88b 100644 (file)
@@ -5,7 +5,7 @@
 #include "efl/init.h"
 
 #include <Elementary.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #include <Ecore.h>
 
 #include "base/logging.h"
@@ -30,7 +30,12 @@ int Initialize(int argc, const char* argv[]) {
   elm_config_accel_preference_set("hw");
 
   ecore_init();
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   ecore_x_init(NULL);
+#else
+  NOTIMPLEMENTED();
+#endif
   eina_init();
   evas_init();
 
index 4724eec..bd76ca9 100644 (file)
@@ -21,7 +21,7 @@
 #include "ui/gl/efl_pixmap.h"
 
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #endif
 
 namespace media {
index 3330846..cbfca92 100644 (file)
@@ -6,7 +6,7 @@
 #define MEDIA_BASE_EFL_MEDIA_SOURCE_PLAYER_GSTREAMER_H_
 
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #include <gst/gst.h>
 
 #include "base/cancelable_callback.h"
index a5836e1..d4dbd3d 100644 (file)
@@ -14,7 +14,7 @@
 
 #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT)
 #include <Ecore.h>
-#include "ecore_x_wrapper.h"
+#include "ecore_x_wayland_wrapper.h"
 #endif
 
 #include "base/memory/scoped_ptr.h"
index f8713c8..4ab2290 100644 (file)
@@ -6,10 +6,21 @@
   'variables': {
     'external_media_deps': [
       '<(DEPTH)/tizen_src/build/system.gyp:ecore',
-      '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
       '<(DEPTH)/tizen_src/build/system.gyp:gstreamer',
       '<(DEPTH)/tizen_src/build/system.gyp:capi-media-camera',
     ],
+    'conditions': [
+      ['use_wayland==0', {
+        'external_media_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+        ],
+      },
+      {
+        'external_media_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+        ],
+      }],
+    ],
   },
 
   'target_defaults': {
index 93b8c32..9d085bd 100644 (file)
@@ -6,10 +6,13 @@
 
 #include <Evas.h>
 #include <Ecore_Evas.h>
-#include "ecore_x_wrapper.h"
+#include "ecore_x_wayland_wrapper.h"
 #include <Elementary.h>
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
+#endif
 
 #include "base/memory/singleton.h"
 #include "base/logging.h"
@@ -29,8 +32,11 @@ enum ClipType
 
 struct ClipData
 {
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Selection selection;
   void (* request)(Ecore_X_Window window, const char* pTarget);
+#endif
 
   Elm_Sel_Format format;
   Elm_Sel_Format requestedFormat;
@@ -41,7 +47,10 @@ struct ClipData
   EWebView* webView;
 };
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 typedef int (*ClipNotifyHandler)(ClipData* clipData, Ecore_X_Event_Selection_Notify* notifyData);
+#endif
 
 enum
 {
@@ -76,8 +85,11 @@ struct AtomData
 {
   const char* pName;
   Elm_Sel_Format formats;
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   ClipNotifyHandler notify;
   Ecore_X_Atom atom;
+#endif
 };
 
 AtomData atomList[ATOM_MAX];
@@ -85,10 +97,15 @@ ClipData clipList[CLIP_TYPE_MAX];
 
 Eina_Bool propertyChangeCallback(void* data, int type, void* event) {
   ClipboardHelperEfl *clipboardHelper = static_cast<ClipboardHelperEfl*>(data);
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Event_Window_Property *ev = (Ecore_X_Event_Window_Property*) event;
 
   if (ev->atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE)
     clipboardHelper->UpdateClipboardWindowState(ev);
+#else
+  NOTIMPLEMENTED();
+#endif
 
   return EINA_TRUE;
 }
@@ -125,6 +142,8 @@ ClipboardHelperEfl::ClipboardHelperEfl() {
 }
 
 void ClipboardHelperEfl::SetData(const std::string& data, ClipboardDataType type) {
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Atom data_type = 0;
 
   switch(type)
@@ -144,12 +163,17 @@ void ClipboardHelperEfl::SetData(const std::string& data, ClipboardDataType type
   }
 
   SetClipboardItem(data_type, data);
+#else
+  NOTIMPLEMENTED();
+#endif
 }
 
 void ClipboardHelperEfl::Clear() {
   NOTIMPLEMENTED();
 }
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 Ecore_X_Window ClipboardHelperEfl::GetCbhmWindow() {
   Ecore_X_Atom xAtomCbhm = ecore_x_atom_get(kCbhmAtomXWindow);
   Ecore_X_Window xCbhmWin = 0;
@@ -166,8 +190,11 @@ Ecore_X_Window ClipboardHelperEfl::GetCbhmWindow() {
 
   return xCbhmWin;
 }
+#endif
 
 bool ClipboardHelperEfl::SendCbhmMessage(const std::string& message) {
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Window cbhm_win = GetCbhmWindow();
   Ecore_X_Atom atom_cbhm_item = ecore_x_atom_get(kCbhmAtomMessage);
 
@@ -187,10 +214,15 @@ bool ClipboardHelperEfl::SendCbhmMessage(const std::string& message) {
              reinterpret_cast<XEvent*>(&messageEvent));
 
   ecore_x_sync();
+#else
+  NOTIMPLEMENTED();
+#endif
 
   return true;
 }
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 bool ClipboardHelperEfl::SetClipboardItem(Ecore_X_Atom data_type,const std::string& data) {
   if (data.empty())
     return false;
@@ -217,7 +249,10 @@ bool ClipboardHelperEfl::SetClipboardItem(Ecore_X_Atom data_type,const std::stri
 
   return false;
 }
+#endif
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 std::string ClipboardHelperEfl::GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, Ecore_X_Atom* data_type) {
   if (!property)
     return std::string();
@@ -266,11 +301,14 @@ std::string ClipboardHelperEfl::GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom p
 
   return cbhm_data;
 }
+#endif
 
 bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::string* data) {
   if (!data)
     return false;
 
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Window cbhm_win = GetCbhmWindow();
   std::ostringstream cbhm_item;
   cbhm_item << kCbhmAtomItem << index;
@@ -295,11 +333,16 @@ bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::stri
     data->swap(result);
     return true;
   }
+#else
+  NOTIMPLEMENTED();
+#endif
   return false;
 }
 
 int ClipboardHelperEfl::NumberOfItems() {
   // 1. Get CBHM Ecore_X_Window.
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Atom x_atom;
   x_atom = ecore_x_atom_get(kCbhmAtomXWindow);
   if (!x_atom)
@@ -356,6 +399,10 @@ int ClipboardHelperEfl::NumberOfItems() {
     return 0;
   }
   return count;
+#else
+  NOTIMPLEMENTED();
+  return 0;
+#endif
 }
 
 static void pasteSelectedClipboardItem(std::string data, std::string type, EWebView *webview) {
@@ -370,6 +417,8 @@ static void pasteSelectedClipboardItem(std::string data, std::string type, EWebV
 }
 
 static Eina_Bool clearClip(void* data, int type, void* event) {
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Event_Selection_Clear* clearEvent = (Ecore_X_Event_Selection_Clear*) event;
   Ecore_X_Window window = clearEvent->win;
 
@@ -377,11 +426,16 @@ static Eina_Bool clearClip(void* data, int type, void* event) {
   clipList[clipType].requestedFormat = static_cast<Elm_Sel_Format>(ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_IMAGE);
 
   ecore_x_selection_secondary_request(window, ECORE_X_SELECTION_TARGET_TARGETS);
+#else
+  NOTIMPLEMENTED();
+#endif
   return ECORE_CALLBACK_PASS_ON;
 }
 
 static Eina_Bool notifyClip(void* data , int type, void* event) {
   EWebView *webview = static_cast<EWebView*>(data);
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Event_Selection_Notify* notifytEvent = (Ecore_X_Event_Selection_Notify*) event;
 
   int i = 0;
@@ -396,9 +450,14 @@ static Eina_Bool notifyClip(void* data , int type, void* event) {
     if (!strcmp(notifytEvent->target, atomList[i].pName) && atomList[i].notify)
       atomList[i].notify(clipData, notifytEvent);
   }
+#else
+  NOTIMPLEMENTED();
+#endif
   return ECORE_CALLBACK_PASS_ON;
 }
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 static int notifyTarget(ClipData* clipData, Ecore_X_Event_Selection_Notify* notifyData) {
   Ecore_X_Atom dataType = 0;
 
@@ -434,7 +493,10 @@ static int notifyTarget(ClipData* clipData, Ecore_X_Event_Selection_Notify* noti
   clipData->request(notifyData->win, atomList[j].pName);
   return ECORE_CALLBACK_PASS_ON;
 }
+#endif
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 static int notifyText(ClipData* clipData, Ecore_X_Event_Selection_Notify* notifyData) {
   Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) notifyData->data;
   pasteSelectedClipboardItem(std::string((char*)pData->data), "InsertText", clipData->webView);
@@ -466,8 +528,11 @@ static int notifyHtml(ClipData* clipData,
       "InsertHTML", clipData->webView);
   return 0;
 }
+#endif
 
 void ClipboardHelperEfl::initializeAtomList() {
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   atomList[ATOM_TARGETS].pName = "TARGETS";
   atomList[ATOM_TARGETS].formats = ELM_SEL_FORMAT_TARGETS;
   atomList[ATOM_TARGETS].notify = notifyTarget;
@@ -601,6 +666,9 @@ void ClipboardHelperEfl::initializeAtomList() {
 
   for (int i = 0; i < ATOM_MAX; i++)
     atomList[i].atom = ecore_x_atom_get(atomList[i].pName);
+#else
+  NOTIMPLEMENTED();
+#endif
 }
 
 void ClipboardHelperEfl::clearClipboardHandler() {
@@ -621,6 +689,8 @@ void ClipboardHelperEfl::clearClipboardHandler() {
   clipboard_window_opened_ = false;
 }
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 bool ClipboardHelperEfl::getSelectedCbhmItem(Ecore_X_Atom* pDataType) {
   Ecore_X_Window cbhmWin = GetCbhmWindow();
   Ecore_X_Atom atomCbhmItem = ecore_x_atom_get("CBHM_SELECTED_ITEM");
@@ -639,14 +709,20 @@ bool ClipboardHelperEfl::getSelectedCbhmItem(Ecore_X_Atom* pDataType) {
 
   return true;
 }
+#endif
 
 void ClipboardHelperEfl::OpenClipboardWindow(EWebView* view, bool richly_editable) {
   clearClipboardHandler();
   initializeAtomList();
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   property_change_handler_ = ecore_event_handler_add(
       ECORE_X_EVENT_WINDOW_PROPERTY, propertyChangeCallback, this);
   m_selectionClearHandler = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR, clearClip, view);
   m_selectionNotifyHandler = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, notifyClip, view);
+#else
+  NOTIMPLEMENTED();
+#endif
 
   if (richly_editable)
     SendCbhmMessage(kCbhmMessageShow1);
@@ -660,7 +736,12 @@ void ClipboardHelperEfl::OpenClipboardWindow(EWebView* view, bool richly_editabl
 }
 
 void ClipboardHelperEfl::connectClipboardWindow() {
+  // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   ecore_x_selection_secondary_set(ecore_x_window_focus_get(), "",1);
+#else
+  NOTIMPLEMENTED();
+#endif
 }
 
 bool ClipboardHelperEfl::IsClipboardWindowOpened() {
@@ -671,6 +752,8 @@ void ClipboardHelperEfl::CloseClipboardWindow() {
   SendCbhmMessage(kCbhmMessageHide);
 }
 
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 void ClipboardHelperEfl::UpdateClipboardWindowState(Ecore_X_Event_Window_Property* ev) {
   Ecore_X_Illume_Clipboard_State state = ecore_x_e_illume_clipboard_state_get(ev->win);
 
@@ -679,3 +762,4 @@ void ClipboardHelperEfl::UpdateClipboardWindowState(Ecore_X_Event_Window_Propert
   else if (state == ECORE_X_ILLUME_CLIPBOARD_STATE_ON)
     clipboard_window_opened_ = true;
 }
+#endif
index 61e75b5..e306600 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <string>
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 
 #include "base/basictypes.h"
 
@@ -38,18 +38,27 @@ class ClipboardHelperEfl {
   void OpenClipboardWindow(EWebView* view, bool richly_editable);
   void CloseClipboardWindow();
   bool IsClipboardWindowOpened();
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   bool getSelectedCbhmItem(Ecore_X_Atom* pDataType);
   void UpdateClipboardWindowState(Ecore_X_Event_Window_Property* ev);
+#endif
   static void connectClipboardWindow();
 
  private:
   ClipboardHelperEfl();
   friend struct DefaultSingletonTraits<ClipboardHelperEfl>;
 
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   Ecore_X_Window GetCbhmWindow();
+#endif
   bool SendCbhmMessage(const std::string& message);
+  // TODO: Webview TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   bool SetClipboardItem(Ecore_X_Atom data_type, const std::string& data);
   std::string GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, Ecore_X_Atom* data_type);
+#endif
   void clearClipboardHandler();
   void initializeAtomList();
   DISALLOW_COPY_AND_ASSIGN(ClipboardHelperEfl);
index 765ad98..bf0949c 100644 (file)
@@ -4,7 +4,9 @@
 
 #include "ui/gfx/screen_efl.h"
 
+#if !defined(WAYLAND_BRINGUP)
 #include <Ecore_X.h>
+#endif
 
 #include "content/browser/renderer_host/dip_util.h"
 #include "ui/gfx/screen_type_delegate.h"
@@ -73,7 +75,12 @@ class ScreenEfl : public gfx::Screen {
   }
 
   gfx::Display GetPrimaryDisplay() const override {
+    // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     Ecore_X_Screen* screen = ecore_x_default_screen_get();
+#else
+    NOTIMPLEMENTED();
+#endif
 
     const float device_scale_factor =
         gfx::Display::HasForceDeviceScaleFactor() ?
@@ -89,12 +96,17 @@ class ScreenEfl : public gfx::Screen {
 #endif
 
     int width, height;
+    // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     if (display.rotation() == gfx::Display::ROTATE_90 ||
         display.rotation() == gfx::Display::ROTATE_270) {
       ecore_x_screen_size_get(screen, &height, &width);
     } else {
       ecore_x_screen_size_get(screen, &width, &height);
     }
+#else
+    NOTIMPLEMENTED();
+#endif
 
     const gfx::Rect bounds_in_pixels = gfx::Rect(width, height);
     const gfx::Rect bounds_in_dip =
index 9cb0192..bc37b82 100644 (file)
@@ -53,7 +53,10 @@ class GL_EXPORT EflPixmap : public EflPixmapBase,
   virtual ~EflPixmap();
 
   static const char* GetEglExtensions();
+  // TODO: Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
   static Display* GetNativeDisplay();
+#endif
   static EGLDisplay GetDisplay();
   static EGLConfig GetConfig();
 
index b655d9d..9b5a803 100644 (file)
     'external_ui_gl_deps': [
       '<(DEPTH)/tizen_src/build/system.gyp:evas',
       '<(DEPTH)/tizen_src/build/system.gyp:ecore-evas',
-      '<(DEPTH)/tizen_src/build/system.gyp:libdri2',
       '<(DEPTH)/tizen_src/build/system.gyp:libdrm',
       '<(DEPTH)/tizen_src/build/system.gyp:libtbm',
     ],
-    'external_ui_gfx_x11_deps': [
-      '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
-    ],
-    'external_ui_gfx_deps': [
-      '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+    'conditions': [
+      ['use_wayland==0', {
+        'external_ui_gl_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:libdri2',
+        ],
+        'external_ui_gfx_x11_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+        ],
+        'external_ui_gfx_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+        ],
+      },
+      {
+        'external_ui_gfx_deps': [
+          '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+        ],
+      }],
     ],
     'external_ui_events_deps': [
       '<(DEPTH)/tizen_src/chromium_impl/ui/ui_targets_efl.gyp:ui_events_source_inject',
         'sources/': [
           ['exclude', 'x11_event_source_glib\\.cc$'],
           ['exclude', 'x11_event_source_libevent\\.cc$'],
-        ]
+        ],
       }],
 
       ['_target_name=="gesture_detection"', {
@@ -2,9 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef ECORE_X_WRAPPER_H_
-#define ECORE_X_WRAPPER_H_
+#ifndef ECORE_X_WAYLAND_WRAPPER_H_
+#define ECORE_X_WAYLAND_WRAPPER_H_
 
+#if defined(USE_WAYLAND)
+#include <Ecore_Wayland.h>
+#else
 #include <Ecore_X.h>
+#endif
 
 #endif
index c0eecda..f9c3253 100644 (file)
@@ -8,7 +8,7 @@
 #if defined(TIZEN_AUTOFILL_SUPPORT)
 
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #include <Edje.h>
 #include <Eina.h>
 #include <Elementary.h>
index f2416d0..566de31 100644 (file)
@@ -209,7 +209,11 @@ bool JavaScriptModalDialogEfl::ShowJavaScriptDialog() {
   evas_object_focus_set(popup_, true);
 
   int width, height;
+#if !defined(WAYLAND_BRINGUP)
   ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+#else
+  NOTIMPLEMENTED();
+#endif
   evas_object_resize(popup_, width, height);
   evas_object_move(popup_, 0, 0);
   return true;
@@ -241,7 +245,11 @@ void JavaScriptModalDialogEfl::javascriptPopupResizeCallback(void *data, Evas *e
 
   int popupHeight;
   int width, height;
+#if !defined(WAYLAND_BRINGUP)
   ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+#else
+  NOTIMPLEMENTED();
+#endif
   evas_object_geometry_get(obj, 0, 0, 0, &popupHeight);
 
   JavaScriptModalDialogEfl* popup = static_cast<JavaScriptModalDialogEfl*>(data);
index da05435..8bd44da 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <Evas.h>
 #include <Elementary.h>
-#include "ecore_x_wrapper.h"
+#include "ecore_x_wayland_wrapper.h"
 
 class EWebView;
 
index 912d350..f961f42 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <Elementary.h>
 #include <libintl.h>
-#include "ecore_x_wrapper.h"
+#include "ecore_x_wayland_wrapper.h"
 #ifdef OS_TIZEN_MOBILE
 #include <dlfcn.h>
 #include <efl_assist.h>
index 55b1c43..c612230 100644 (file)
@@ -107,10 +107,14 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
         std::string(),
         params_.link_url.spec());
   }
+#if !defined(WAYLAND_BRINGUP)
   if (params_.is_editable && ClipboardHelperEfl::NumberOfItems() > 0) {
     AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_PASTE,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_PASTE")));
   }
+#else
+  NOTIMPLEMENTED();
+#endif
   if (!params_.selection_text.empty() && params_.is_editable) {
     AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_CUT,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CUT_ABB")));
@@ -167,10 +171,14 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_DRAG_AND_DROP")));
   }
 #endif
+#if !defined(WAYLAND_BRINGUP)
   if (params_.is_editable && ClipboardHelperEfl::NumberOfItems() > 0) {
     AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_CLIPBOARD,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CLIPBOARD")));
   }
+#else
+  NOTIMPLEMENTED();
+#endif
 }
 
 bool ContextMenuControllerEfl::CreateContextMenu() {
@@ -274,9 +282,13 @@ bool ContextMenuControllerEfl::CreateContextMenu() {
       }
     }
 
+#if !defined(WAYLAND_BRINGUP)
     int width = 0;
     int height = 0;
     ecore_x_screen_size_get(ecore_x_default_screen_get(), &width, &height);
+#else
+  NOTIMPLEMENTED();
+#endif
 
     evas_object_size_hint_weight_set(popup_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
@@ -513,8 +525,12 @@ void ContextMenuControllerEfl::OnDownloadUpdated(content::DownloadItem* download
   if(download && download->AllDataSaved()) {
     if (clipboard_download_items_.find(download) != clipboard_download_items_.end()) {
       const std::string& DownloadPath = download->GetForcedFilePath().value();
+#if !defined(WAYLAND_BRINGUP)
       ClipboardHelperEfl::GetInstance()->SetData(DownloadPath,
                                                  ClipboardHelperEfl::CLIPBOARD_DATA_TYPE_IMAGE);
+#else
+      NOTIMPLEMENTED();
+#endif
       download->RemoveObserver(this);
       clipboard_download_items_.erase(download);
     }
@@ -749,8 +765,12 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
       break;
     }
     case MENU_ITEM_COPY_LINK_TO_CLIPBOARD: {
+#if !defined(WAYLAND_BRINGUP)
       ClipboardHelperEfl::GetInstance()->SetData(params_.link_url.spec(),
           ClipboardHelperEfl::CLIPBOARD_DATA_TYPE_URL);
+#else
+      NOTIMPLEMENTED();
+#endif
       break;
     }
     case MENU_ITEM_DOWNLOAD_LINK_TO_DISK: {
@@ -809,17 +829,23 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
       // TODO: set true for richly editable.
       // Paste operations are blocked by Editor if content is not richly editible.
       // Need to find if webview_ has rich editor.
+#if !defined(WAYLAND_BRINGUP)
       ClipboardHelperEfl::GetInstance()->OpenClipboardWindow(webview_, true);
+#else
+      NOTIMPLEMENTED();
+#endif
       break;
     }
-#if !defined(EWK_BRINGUP)
     case MENU_ITEM_DRAG: {
+#if !defined(EWK_BRINGUP)
       RenderViewHost* rvh = web_contents_.GetRenderViewHost();
       rvh->StartDragging();
       context_menu_show_pos_.SetPoint(params_.x, params_.y);
+#else
+      NOTIMPLEMENTED();
+#endif
       break;
     }
-#endif
     default:
       CustomMenuItemSelected(menu_item);
   }
index c6d3a8e..4bcf1a1 100644 (file)
@@ -59,7 +59,6 @@
     ],
 
     'defines': [
-      'HAVE_ECORE_X=<!(if pkg-config ecore-x; then echo 1; fi)',
       'CHROMIUM_VERSION=\"<!(python <(version_script) -f <(version_file) -t "<(version_pattern)")\"',
     ],
     'link_settings': {
       '-fvisibility=hidden',
     ],
     'conditions': [
+      ['use_wayland==0', {
+        'defines': [
+          'HAVE_ECORE_X=<!(if pkg-config ecore-x; then echo 1; fi)'
+        ],
+      }],
       ['building_for_tizen==1', {
         'sources/': [
           [ 'exclude', 'browser/sound_effect\\.(cc|h)$' ],
index c373cc3..432001b 100644 (file)
@@ -554,11 +554,16 @@ void EWebView::SetOrientation(int orientation) {
 
     int width = 0;
     int height = 0;
+    // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     if (orientation == 0 || orientation == 180) {
       ecore_x_screen_size_get(ecore_x_default_screen_get(), &width, &height);
     } else {
       ecore_x_screen_size_get(ecore_x_default_screen_get(), &height, &width);
     }
+#else
+    NOTIMPLEMENTED();
+#endif
     if (context_menu_)
       context_menu_->SetPopupSize(width, height);
     if (inputPicker_)
@@ -646,6 +651,8 @@ void EWebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *poi
       // Chromium doesn't expect (and doesn't like) these events.
       continue;
     }
+    // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     if (rwhv()) {
       Evas_Coord_Point pt;
       pt.x = point->x;
@@ -654,6 +661,9 @@ void EWebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *poi
           pt, point->state, point->id, evas_object());
       rwhv()->HandleTouchEvent(&touch_event);
     }
+#else
+    NOTIMPLEMENTED();
+#endif
   }
 }
 
index 0f1628d..9647cd4 100644 (file)
@@ -4,14 +4,17 @@
 
 #include <Eina.h>
 #include <Elementary.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 
 #include "base/logging.h"
 #include "popup_controller_efl.h"
 #include "ui/base/clipboard/clipboard_helper_efl.h"
 
 #if defined(OS_TIZEN)
+// TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
 #include <ui-gadget.h>
+#endif
 #include <app_control.h>
 #else
 #include <gio/gio.h>
@@ -294,4 +297,4 @@ void PopupControllerEfl::SetPopupSize(int width, int height) {
   evas_object_move(popup_, 0, 0);
 }
 
-} //namespace
+} // namespace
index fadec81..5a787de 100644 (file)
@@ -39,9 +39,7 @@
 #include "private/ewk_private.h"
 #include "private/ewk_main_private.h"
 
-#if defined(HAVE_ECORE_X)
-#include <Ecore_X.h>
-#endif
+#include "ecore_x_wayland_wrapper.h"
 
 static int _ewkInitCount = 0;
 
index b433036..d6cd871 100644 (file)
@@ -21,7 +21,7 @@
 #include <Ecore_Evas.h>
 #include <Ecore_File.h>
 #include <Ecore_Getopt.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #include <Evas.h>
 #include <Elementary.h>
 
@@ -410,7 +410,11 @@ int main(int argc, char** argv)
   int width = 800;
   int height = 600;
 
+#if defined(USE_WAYLAND)
+  ee = ecore_evas_new("wayland_egl", 0, 0, width, height, 0);
+#else
   ee = ecore_evas_new("opengl_x11", 0, 0, width, height, 0);
+#endif
   e = ecore_evas_get(ee);
 
   ecore_evas_callback_delete_request_set(ee, _evas_close_cb);
@@ -425,7 +429,10 @@ int main(int argc, char** argv)
   if (use_fullscreen) {
     // FIXME: this is wrong with dual screen configuration (desktop).
     // We should use XineramaQueryScreens for that setup.
+    // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+#endif
     ecore_evas_size_base_set(ee, width, height);
   }
 
@@ -701,7 +708,11 @@ void __create_window_cb(void *data, Evas_Object *obj, void *event_info)
   const int default_width = 300;
   const int default_height =  400;
 
+#if defined(USE_WAYLAND)
+  Ecore_Evas* ee = ecore_evas_new("wayland_egl", 0, 0, default_width, default_height, 0);
+#else
   Ecore_Evas* ee = ecore_evas_new("opengl_x11", 0, 0, default_width, default_height, 0);
+#endif
   Evas* e = ecore_evas_get(ee);
 
   Evas_Object* view = ewk_view_add(e);
index 07c025d..2ecf703 100644 (file)
         '<(DEPTH)/tizen_src/build/system.gyp:evas',
         '<(DEPTH)/tizen_src/build/system.gyp:ecore',
         '<(DEPTH)/tizen_src/build/system.gyp:ecore-evas',
-        '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
         '<(DEPTH)/tizen_src/build/system.gyp:elementary',
         'chromium-ewk',
         'launch_exec',
       ],
+      'conditions': [
+        ['use_wayland==0', {
+          'dependencies': [
+            '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+          ],
+        },
+        {
+          'dependencies': [
+            '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+          ],
+        }],
+      ],
       'include_dirs': [
         '../efl_integration',
       ],
     {
       'target_name': 'mini_browser',
       'type': 'executable',
-       'conditions': [
+      'conditions': [
         ['building_for_tizen==1', { # FIXME: mini_browser shouldn't depend on dlog and appcore-efl without OS(TIZEN) checks
-         'sources': [
-          'mini_browser.c',
-          'browser-object.h',
-          'browser-string.h',
-         ],
-         'include_dirs': [
-          '../efl_integration',
-         ],
-         'dependencies': [
-          '<(DEPTH)/tizen_src/build/system.gyp:capi-appfw-application',
-          '<(DEPTH)/tizen_src/build/system.gyp:capi-system-device',
-          '<(DEPTH)/tizen_src/build/system.gyp:evas',
-          '<(DEPTH)/tizen_src/build/system.gyp:ecore',
-          '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
-          '<(DEPTH)/tizen_src/build/system.gyp:ecore-evas',
-          '<(DEPTH)/tizen_src/build/system.gyp:efl-assist',
-          '<(DEPTH)/tizen_src/build/system.gyp:elementary',
-          '<(DEPTH)/build/linux/system.gyp:glib',
-          'chromium-ewk',
-         ],
-         'cflags': [
-          '<!@(pkg-config --cflags dlog)',
-         ],
-         'link_settings': {
-          'ldflags': [
-            '<!@(pkg-config --libs-only-L --libs-only-other dlog)',
+          'sources': [
+            'mini_browser.c',
+            'browser-object.h',
+            'browser-string.h',
+          ],
+          'include_dirs': [
+            '../efl_integration',
+          ],
+          'dependencies': [
+            '<(DEPTH)/tizen_src/build/system.gyp:capi-appfw-application',
+            '<(DEPTH)/tizen_src/build/system.gyp:capi-system-device',
+            '<(DEPTH)/tizen_src/build/system.gyp:evas',
+            '<(DEPTH)/tizen_src/build/system.gyp:ecore',
+            '<(DEPTH)/tizen_src/build/system.gyp:ecore-evas',
+            '<(DEPTH)/tizen_src/build/system.gyp:efl-assist',
+            '<(DEPTH)/tizen_src/build/system.gyp:elementary',
+            '<(DEPTH)/build/linux/system.gyp:glib',
+            'chromium-ewk',
+          ],
+          'conditions': [
+            ['use_wayland==0', {
+              'dependencies': [
+                '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+              ],
+            },
+            {
+              'dependencies': [
+                '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+              ],
+            }],
+          ],
+          'cflags': [
+            '<!@(pkg-config --cflags dlog)',
           ],
-          'libraries': [
-            '<!@(pkg-config --libs-only-l dlog)',
-          ]
-         },
-       }]
+          'link_settings': {
+            'ldflags': [
+              '<!@(pkg-config --libs-only-L --libs-only-other dlog)',
+            ],
+            'libraries': [
+              '<!@(pkg-config --libs-only-l dlog)',
+            ]
+          },
+        }]
       ],
     }
   ]
index ffdc092..2bef261 100644 (file)
@@ -9,7 +9,8 @@
 #include <Evas.h>
 #include <Eina.h>
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
+
 #include "efl_integration/public/ewk_context.h"
 #include "efl_integration/public/ewk_main.h"
 #include "efl_integration/public/ewk_view.h"
index 445cc3a..716bdbc 100755 (executable)
@@ -8,7 +8,7 @@
 #include <Ecore_Evas.h>
 #include <Ecore_File.h>
 #include <Ecore_Getopt.h>
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 #include <Evas.h>
 #include <Elementary.h>
 #include <glib/gprintf.h>
@@ -297,7 +297,10 @@ static Evas_Object* _create_main_window(void *data)
     evas_object_size_hint_align_set(window, EVAS_HINT_FILL, EVAS_HINT_FILL);
     elm_win_borderless_set(window, EINA_TRUE);
     elm_win_conformant_set(window, EINA_TRUE);
+    // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+#endif
     evas_object_resize(window, width, height);
     elm_win_indicator_mode_set(window, ELM_WIN_INDICATOR_SHOW);
 
@@ -340,9 +343,9 @@ Evas_Object* _create_view(Evas_Object *parent, app_data *data)
   evas_object_smart_callback_add(webview, "load,progress,finished", __load_progress_finished_cb, data);
   evas_object_smart_callback_add(webview, "load,started"          , __load_started_cb          , data);
   evas_object_smart_callback_add(webview, "policy,newwindow,decide", __policy_newwindow_decide_cb, data);
-  #if defined(OS_TIZEN_TV)
+#if defined(OS_TIZEN_TV)
   evas_object_event_callback_add(webview, EVAS_CALLBACK_MOUSE_DOWN, _webview_mouse_down_cb       , data);
-  #endif
+#endif
   evas_object_smart_callback_add(webview, "policy,response,decide", __policy_response_decide_cb, data);
   evas_object_smart_callback_add(webview, "policy,navigation,decide", __navigation_policy_decide_cb, data);
   evas_object_smart_callback_add(webview, "geolocation,permission,request", __geolocation_permission_request_cb, data);
@@ -762,11 +765,17 @@ void get_main_window_size(int *changed_ang, int *width, int *height)
 {
   switch (*changed_ang) {
     case APP_DEVICE_ORIENTATION_0:
+      // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
       ecore_x_window_size_get(ecore_x_window_root_first_get(), width, height);
+#endif
       break;
     case APP_DEVICE_ORIENTATION_90:
     case APP_DEVICE_ORIENTATION_270:
+      // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
       ecore_x_window_size_get(ecore_x_window_root_first_get(), height, width);
+#endif
       break;
     default:
       return;
@@ -1146,7 +1155,10 @@ void hide_imf_panel(app_data* data)
 /* On SIP close, Toolbar bring back to original position*/
   if (is_imf_shown) {
     int width, height;
+    // TODO: Webview and Rendering TG will implement following for Wayland.
+#if !defined(WAYLAND_BRINGUP)
     ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+#endif
     //evas_object_resize(data->webview, width, height - TOOL_BOX_HEIGHT);
     evas_object_move(data->bg_tool_box, 0, height - TOOL_BOX_HEIGHT);
     evas_object_show(data->bg_tool_box);
index d300156..1b0af5f 100644 (file)
      ['building_for_tizen==1', {
       'cflags': [
         '<!@(pkg-config --cflags scim)',
-        '<!@(pkg-config --cflags x11)',
       ],
       'link_settings': {
         'ldflags': [
           '<!@(pkg-config --libs-only-L --libs-only-other scim)',
-          '<!@(pkg-config --libs-only-L --libs-only-other x11)',
         ],
         'libraries': [
           '<!@(pkg-config --libs-only-l scim)',
-          '<!@(pkg-config --libs-only-l x11)',
         ],
       },
     }],
index 89d39bc..155cf3e 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #ifdef OS_TIZEN
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 // using scim to simulate keyboard typing
 #include <scim.h>
 #include <scim_event.h>
index c8d99c4..60c6fac 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #ifdef OS_TIZEN
-#include <Ecore_X.h>
+#include "ecore_x_wayland_wrapper.h"
 // using scim to simulate keyboard typing
 #include <scim.h>
 #include <scim_event.h>
index 6591cf2..769dbb4 100644 (file)
         ],
       },
       'conditions': [
-        ['use_x11==1', {
+        ['use_wayland==0', {
           'dependencies': [
             '<(chrome_src_dir)/chrome/../build/linux/system.gyp:x11',
             '<(chrome_src_dir)/chrome/../ui/gfx/x/gfx_x11.gyp:gfx_x11',
index 5fbd38f..c1f5fea 100644 (file)
@@ -66,21 +66,41 @@ ExcludeArch: aarch64
 Requires(post): /sbin/ldconfig
 Requires(post): xkeyboard-config
 Requires(postun): /sbin/ldconfig
-BuildRequires: which, vi, python, python-xml, bison, flex, gperf, gettext, perl, edje-tools
-BuildRequires: libjpeg-turbo-devel, expat-devel, libcap-devel
-BuildRequires: pkgconfig(tts)
-BuildRequires: pkgconfig(glesv2)
-BuildRequires: pkgconfig(libpulse)
-BuildRequires: pkgconfig(recordproto)
-BuildRequires: pkgconfig(libpci)
-BuildRequires: pkgconfig(pangocairo)
-BuildRequires: pkgconfig(libudev)
+
+BuildRequires: bison, edje-tools, expat-devel, flex, gettext, gperf, libcap-devel
+BuildRequires: libjpeg-turbo-devel, perl, python, python-xml, vi, which
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-location-manager)
+BuildRequires: pkgconfig(capi-media-audio-io)
+BuildRequires: pkgconfig(capi-media-camera)
+BuildRequires: pkgconfig(capi-media-player)
+BuildRequires: pkgconfig(capi-system-device)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(capi-system-system-settings)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-evas)
+BuildRequires: pkgconfig(ecore-imf)
+BuildRequires: pkgconfig(ecore-imf-evas)
+BuildRequires: pkgconfig(ecore-input)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(feedback)
+BuildRequires: pkgconfig(flac)
 BuildRequires: pkgconfig(fontconfig)
 BuildRequires: pkgconfig(freetype2)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(harfbuzz)
 BuildRequires: pkgconfig(icu-i18n)
-BuildRequires: pkgconfig(openssl)
+BuildRequires: pkgconfig(libdrm)
+BuildRequires: pkgconfig(libexif)
+BuildRequires: pkgconfig(libpci)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(libpulse)
+BuildRequires: pkgconfig(libtbm)
+BuildRequires: pkgconfig(libudev)
+BuildRequires: pkgconfig(libusb-1.0)
 BuildRequires: pkgconfig(libxml-2.0)
 BuildRequires: pkgconfig(libxslt)
 BuildRequires: pkgconfig(sqlite3)
@@ -90,51 +110,47 @@ BuildRequires: pkgconfig(capi-system-device)
 BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(capi-location-manager)
 BuildRequires: pkgconfig(location)
-BuildRequires: pkgconfig(gles20)
-BuildRequires: pkgconfig(libpng)
-BuildRequires: pkgconfig(libusb-1.0)
-BuildRequires: pkgconfig(speex)
-BuildRequires: pkgconfig(flac)
 BuildRequires: pkgconfig(minizip)
-BuildRequires: pkgconfig(xrandr)
+BuildRequires: pkgconfig(nspr)
+BuildRequires: pkgconfig(openssl)
+BuildRequires: pkgconfig(pangocairo)
+BuildRequires: pkgconfig(scim)
+BuildRequires: pkgconfig(speex)
+BuildRequires: pkgconfig(sqlite3)
+BuildRequires: pkgconfig(tts)
+BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(zlib)
+
+%if "%{?_with_wayland}" == "1"
+BuildRequires: pkgconfig(ecore-wayland)
+BuildRequires: pkgconfig(wayland-client)
+BuildRequires: pkgconfig(wayland-cursor)
+# gles20 provides wayland-egl.pc
+BuildRequires: pkgconfig(wayland-egl)
+%else
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(libdri2)
+BuildRequires: pkgconfig(x11)
 BuildRequires: pkgconfig(xcomposite)
+BuildRequires: pkgconfig(xcursor)
 BuildRequires: pkgconfig(xext)
 BuildRequires: pkgconfig(xi)
+BuildRequires: pkgconfig(xrandr)
 BuildRequires: pkgconfig(xt)
 BuildRequires: pkgconfig(xfixes)
 BuildRequires: pkgconfig(xtst)
-BuildRequires: pkgconfig(xdamage)
-BuildRequires: pkgconfig(xcursor)
-BuildRequires: pkgconfig(libdrm)
-BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(evas)
-BuildRequires: pkgconfig(ecore-x)
-BuildRequires: pkgconfig(ecore-evas)
-BuildRequires: pkgconfig(ecore-input)
-BuildRequires: pkgconfig(ecore-imf-evas)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(ui-gadget-1)
-BuildRequires: pkgconfig(libexif)
-BuildRequires: pkgconfig(nspr)
-BuildRequires: pkgconfig(zlib)
-BuildRequires: pkgconfig(capi-media-camera)
-BuildRequires: pkgconfig(capi-media-audio-io)
-BuildRequires: pkgconfig(capi-media-player)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(libdri2)
-BuildRequires: pkgconfig(libtbm)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(feedback)
-BuildRequires: pkgconfig(appcore-efl)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(ecore-imf)
-BuildRequires: pkgconfig(scim)
-# for Mobile
-%if %{!?chromium_efl_tizen_profile:0}%{?chromium_efl_tizen_profile} == "mobile"
+%endif
+
+# Version Conditions for Each Targets
+%if "%{?chromium_efl_tizen_profile}%{!?chromium_efl_tizen_profile:0}" == "mobile"
 BuildRequires: bzip2-devel
 BuildRequires: pkgconfig(efl-assist)
 BuildRequires: pkgconfig(capi-network-connection)
 BuildRequires: pkgconfig(capi-system-sensor)
+%if "%{?_with_wayland}" != "1"
+BuildRequires: pkgconfig(xdamage)
+%endif
 %if "%{?chromium_efl_tizen_version}%{!?chromium_efl_tizen_version:0}" == "2.4"
 BuildRequires: pkgconfig(ttrace)
 %endif
@@ -142,7 +158,8 @@ BuildRequires: pkgconfig(ttrace)
 BuildRequires: pkgconfig(audio-session-mgr)
 BuildRequires: pkgconfig(mm-session)
 %endif
-# for Tizen v3.0 and Tizen v2.4
+
+# Version Conditions for Every Targets
 %if "%{?chromium_efl_tizen_version}%{!?chromium_efl_tizen_version:0}" >= "2.4"
 BuildRequires: binutils-gold
 BuildRequires: pkgconfig(gstreamer-1.0)
@@ -325,6 +342,12 @@ fi
 %if 0%{?chromium_efl_tizen_version:1}
   -Dchromium_efl_tizen_version=%{chromium_efl_tizen_version} \
 %endif
+%if "%{?_with_wayland}" == "1"
+  -Duse_wayland=1 \
+%endif
+%if "%{?_repository}" == "emulator" || "%{?_repository}" == "emulator32-x11"
+  -Dtizen_emulator_support=1  \
+%endif
 %if 0%{?build_xwalk}
   --xwalk \
 %endif
@@ -335,8 +358,12 @@ fi
 %ifarch %{arm}
 tizen_src/build/prebuild/ninja.arm %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \
 %else
+%ifarch aarch64
+tizen_src/build/prebuild/ninja-linux64 %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \
+%else
 tizen_src/build/prebuild/ninja %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \
 %endif
+%endif
 %if 0%{?_enable_content_shell}
   content_shell \
 %endif
index 6870468..abacd7d 100644 (file)
@@ -40,6 +40,7 @@
 
     'include_dirs': [
       '.',
+      '<(DEPTH)/tizen_src/ecore_wrapper',
       # Mobile gcc 4.6.x hack begin
       '<(DEPTH)/tizen_src/gcc46_compat_wrappers',
       # Mobile gcc 4.6.x hack end
           'WTF_OS_TIZEN=1',
         ],
         'conditions': [
+          ['chromium_efl_tizen_version=="3.0"', {
+            'defines': [
+              'TIZEN_V_3_0=1',
+            ],
+          }],
           ['chromium_efl_tizen_version=="2.4"', {
             'defines': [
               'TIZEN_V_2_4=1',
               'TIZEN_LEGACY_V_2_2_1=1',
             ],
           }],
-          ['chromium_efl_tizen_version=="3.0"', {
+          ['use_wayland==1', {
             'defines': [
-              'TIZEN_V_3_0=1',
+              'USE_WAYLAND=1',
+            ],
+          }],
+          # TODO: There are X11 dependencies in following condition.
+          #       The files need to be implemented based on Wayland.
+          ['wayland_bringup==1', {
+            'defines': [
+              'WAYLAND_BRINGUP=1',
+            ],
+            'target_conditions': [
+              ['_target_name=="content_common"', {
+                'sources/': [
+                  ['exclude', 'content/common/gpu/client/gpu_memory_buffer_impl_efl_pixmap\\.(h|cc)$'],
+                  ['exclude', 'content/common/gpu/gpu_memory_buffer_factory_efl_pixmap\\.(h|cc)$'],
+                ],
+              }],
+              ['_target_name=="gl"', {
+                'sources/': [
+                  ['exclude', 'ui/gl/efl_pixmap\\.(h|cc)$'],
+                ],
+              }],
+              ['_target_name=="x11_events_platform"', {
+                'sources/': [
+                  ['exclude', 'gfx/x11_event_source_efl\\.(h|cc)$'],
+                ],
+              }],
+              ['_target_name=="gfx_x11"', {
+                'sources/': [
+                  ['exclude', 'gfx/x11_types_override\\.cc$'],
+                ],
+              }],
+              ['_target_name=="ui_base"', {
+                'sources/': [
+                  ['exclude', 'ui/base/cursor/cursor_loader_x11\\.(h|cc)$'],
+                  ['exclude', 'ui/base/cursor/cursor_x11\\.(h|cc)$'],
+                ],
+              }],
             ],
           }],
         ],