[M67 Dev][EFL] Fix linker errors 52/185052/6
authorChandan Padhi <c.padhi@samsung.com>
Wed, 25 Jul 2018 13:25:34 +0000 (06:25 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Fri, 27 Jul 2018 07:06:54 +0000 (07:06 +0000)
This resolves linker errors to enable EFL port.

Change-Id: I8c6affe1bf430e478c874df9fe6fb1ebcf56a169
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
23 files changed:
base/BUILD.gn
content/browser/browser_main_loop.cc
content/browser/browser_main_loop.h
content/browser/compositor/surface_utils.cc
content/browser/media/capture/frame_sink_video_capture_device.cc
content/browser/renderer_host/render_process_host_impl.cc
content/shell/browser/shell_content_browser_client.cc
gpu/command_buffer/service/BUILD.gn
third_party/BUILD.gn
third_party/webrtc/webrtc.gni
tizen_src/chromium_impl/content/browser/renderer_host/native_web_keyboard_event_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/gpu/gpu_efl.gni
tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc
tizen_src/chromium_impl/gpu/command_buffer/client/shared_mailbox_manager.cc [new file with mode: 0644]
tizen_src/chromium_impl/gpu/command_buffer/client/shared_mailbox_manager.h [new file with mode: 0644]
tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc
tizen_src/ewk/efl_integration/BUILD.gn
tizen_src/ewk/efl_integration/cookie_manager.cc
tizen_src/ewk/efl_integration/devtools_delegate_efl.cc
tizen_src/ewk/efl_integration/public/ewk_context.cc
tizen_src/ewk/efl_webview_app/app.c
tizen_src/ewk/ubrowser/BUILD.gn

index 31e8168..5f548c5 100644 (file)
@@ -1135,6 +1135,10 @@ jumbo_component("base") {
     "win/wrapped_window_proc.h",
   ]
 
+  if (use_efl) {
+    sources += external_base_sources
+  }
+
   # winternl.h and NTSecAPI.h have different definitions of UNICODE_STRING.
   # There's only one client of NTSecAPI.h in base but several of winternl.h,
   # so exclude the NTSecAPI.h one.
@@ -2389,10 +2393,6 @@ test("base_unittests") {
     "win/wrapped_window_proc_unittest.cc",
   ]
 
-  if (use_efl) {
-    sources += external_base_sources
-  }
-
   defines = []
 
   if (use_efl) {
index a2586ba..873406e 100644 (file)
 #include "ui/display/display_switches.h"
 #include "ui/gfx/switches.h"
 
-#if defined(USE_AURA) || defined(OS_MACOSX) || defined(USE_EFL)
+#if defined(USE_AURA) || defined(OS_MACOSX)
 #include "content/browser/compositor/image_transport_factory.h"
 #endif
 
@@ -1042,19 +1042,19 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
     TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:MidiService");
     midi_service_->Shutdown();
   }
-
+#if !defined(USE_EFL)
   TRACE_EVENT0("shutdown",
                "BrowserMainLoop::Subsystem:SpeechRecognitionManager");
   io_thread_->task_runner()->DeleteSoon(FROM_HERE,
                                         speech_recognition_manager_.release());
-
+#endif
   memory_pressure_monitor_.reset();
 
 #if defined(OS_MACOSX)
   BrowserCompositorMac::DisableRecyclingForShutdown();
 #endif
 
-#if defined(USE_AURA) || defined(OS_MACOSX) || defined(USE_EFL)
+#if defined(USE_AURA) || defined(OS_MACOSX)
   {
     TRACE_EVENT0("shutdown",
                  "BrowserMainLoop::Subsystem:ImageTransportFactory");
@@ -1236,6 +1236,8 @@ int BrowserMainLoop::BrowserThreadsStarted() {
   established_gpu_channel = false;
   always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup();
   BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
+#elif defined(USE_EFL)
+  BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
 #else
   established_gpu_channel = true;
   if (parsed_command_line_.HasSwitch(switches::kDisableGpu) ||
@@ -1346,7 +1348,7 @@ int BrowserMainLoop::BrowserThreadsStarted() {
     media_stream_manager_.reset(new MediaStreamManager(
         audio_system_.get(), audio_manager_->GetTaskRunner()));
   }
-
+#if !defined(USE_EFL)
   {
     TRACE_EVENT0("startup",
       "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition");
@@ -1354,7 +1356,7 @@ int BrowserMainLoop::BrowserThreadsStarted() {
         audio_system_.get(), audio_manager_.get(),
         media_stream_manager_.get()));
   }
-
+#endif
   {
     TRACE_EVENT0(
         "startup",
index 20b2ac7..94c1437 100644 (file)
@@ -350,10 +350,10 @@ class CONTENT_EXPORT BrowserMainLoop {
   std::unique_ptr<media::AudioSystem> audio_system_;
 
   std::unique_ptr<midi::MidiService> midi_service_;
-
+#if !defined(USE_EFL)
   // Must be deleted on the IO thread.
   std::unique_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_;
-
+#endif
 #if defined(OS_WIN)
   std::unique_ptr<media::SystemMessageWindowWin> system_message_window_;
 #elif defined(OS_LINUX) && defined(USE_UDEV)
index a1cf48e..205355b 100644 (file)
@@ -20,6 +20,8 @@ namespace content {
 viz::FrameSinkId AllocateFrameSinkId() {
 #if defined(OS_ANDROID)
   return CompositorImpl::AllocateFrameSinkId();
+#elif defined(USE_EFL)
+  return viz::FrameSinkId();
 #else
   ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
   return factory->GetContextFactoryPrivate()->AllocateFrameSinkId();
@@ -29,6 +31,8 @@ viz::FrameSinkId AllocateFrameSinkId() {
 viz::FrameSinkManagerImpl* GetFrameSinkManager() {
 #if defined(OS_ANDROID)
   return CompositorImpl::GetFrameSinkManager();
+#elif defined(USE_EFL)
+  return nullptr;
 #else
   ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
   if (!factory)
@@ -40,6 +44,8 @@ viz::FrameSinkManagerImpl* GetFrameSinkManager() {
 viz::HostFrameSinkManager* GetHostFrameSinkManager() {
 #if defined(OS_ANDROID)
   return CompositorImpl::GetHostFrameSinkManager();
+#elif defined(USE_EFL)
+  return nullptr;
 #else
   ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
   if (!factory)
index 8db3dc8..8ffca9d 100644 (file)
@@ -92,8 +92,10 @@ class ScopedFrameDoneHelper
 FrameSinkVideoCaptureDevice::FrameSinkVideoCaptureDevice()
     : capturer_creator_(base::BindRepeating(&CreateCapturer)),
       binding_(this),
+#if !defined(EWK_BRINGUP)
       cursor_renderer_(RescopeToUIThread(CursorRenderer::Create(
           CursorRenderer::CURSOR_DISPLAYED_ON_MOUSE_MOVEMENT))),
+#endif
       weak_factory_(this) {
   DCHECK(cursor_renderer_);
 }
index 3e6f43d..e2f33e5 100644 (file)
@@ -1850,8 +1850,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
 #if BUILDFLAG(ENABLE_PLUGINS)
   AddFilter(new PepperRendererConnection(GetID()));
 #endif
+#if !defined(USE_EFL)
   AddFilter(new SpeechRecognitionDispatcherHost(
       GetID(), storage_partition_impl_->GetURLRequestContext()));
+#endif
   AddFilter(new FileAPIMessageFilter(
       GetID(), storage_partition_impl_->GetURLRequestContext(),
       storage_partition_impl_->GetFileSystemContext(),
@@ -2868,7 +2870,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
     renderer_cmd->AppendSwitch(switches::kDisableDatabases);
   }
 
-#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) && !defined(USE_EFL)
 #if !BUILDFLAG(ENABLE_MUS)
   // If gpu compositing is not being used, tell the renderer at startup. This
   // is inherently racey, as it may change while the renderer is being launched,
index cc39884..0d3c36f 100644 (file)
@@ -80,7 +80,7 @@ namespace {
 
 ShellContentBrowserClient* g_browser_client;
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) && !defined(USE_EFL)
 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
     const std::string& process_type) {
   base::FilePath dumps_path =
@@ -384,7 +384,7 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
 
   breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
       child_process_id, mappings);
-#else
+#elif !defined(USE_EFL)
   int crash_signal_fd = GetCrashSignalFD(command_line);
   if (crash_signal_fd >= 0) {
     mappings->Share(kCrashDumpSignal, crash_signal_fd);
index c655bed..83fc953 100644 (file)
@@ -5,6 +5,10 @@
 import("//build/config/ui.gni")
 import("//third_party/protobuf/proto_library.gni")
 
+if (use_efl) {
+  import("//tizen_src/chromium_impl/gpu/gpu_efl.gni")
+}
+
 group("service") {
   if (is_component_build) {
     public_deps = [
@@ -270,6 +274,10 @@ target(link_target_type, "gles2_sources") {
     configs -= [ "//build/config/compiler:default_optimization" ]
     configs += [ "//build/config/compiler:optimize_max" ]
   }
+
+  if (use_efl) {
+    sources += external_gles2_implementation_sources
+  }
 }
 
 proto_library("disk_cache_proto") {
index 6d94ec7..f0a8651 100644 (file)
@@ -43,7 +43,7 @@ group("jpeg_includes") {
   if (use_system_libjpeg) {
     public_configs = [ ":system_libjpeg_config" ]
   } else if (use_libjpeg_turbo) {
-    public_configs = [ "//build/secondary/third_party/libjpeg_turbo:libjpeg_config" ]
+    public_configs = [ "//third_party/libjpeg_turbo:libjpeg_config" ]
   } else {
     public_configs = [ "//third_party/libjpeg:libjpeg_config" ]
   }
index cfc9cb0..4b7d3e1 100644 (file)
@@ -103,7 +103,7 @@ declare_args() {
   # Links a default implementation of task queues to targets
   # that depend on the target rtc_task_queue. Set to false to
   # use an external implementation.
-  rtc_link_task_queue_impl = true
+  rtc_link_task_queue_impl = !use_efl
 
   if (current_cpu == "arm" || current_cpu == "arm64") {
     rtc_prefer_fixed_point = true
index a57368c..ba1232a 100644 (file)
@@ -48,6 +48,12 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent(const ui::KeyEvent& key_event)
       skip_in_browser(false) {
 }
 
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(
+    const NativeWebKeyboardEvent& other)
+    : WebKeyboardEvent(other),
+      os_event(CopyEvent(other.os_event)),
+      skip_in_browser(other.skip_in_browser) {}
+
 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
     const NativeWebKeyboardEvent& other) {
   WebKeyboardEvent::operator=(other);
index 42c4fd4..0037820 100644 (file)
@@ -33,7 +33,6 @@
 #include "content/common/cursors/webcursor_efl.h"
 #include "content/common/input_messages.h"
 #include "content/common/view_messages.h"
-#include "content/gpu/shared_mailbox_manager.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/context_factory.h"
 #include "content/public/browser/render_process_host.h"
index 4c3af83..bc23d8a 100644 (file)
@@ -5,10 +5,6 @@
 external_content_gpu_efl_sources = [
   "//tizen_src/chromium_impl/content/gpu/gpu_thread_override_efl.cc",
   "//tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc",
-  "//tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.h",
-  "//tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.cc",
-  "//gpu/command_buffer/service/mailbox_manager_impl.h",
-  "//gpu/command_buffer/service/mailbox_manager_impl.cc",
 ]
 
 external_exclude_content_gpu_efl_sources = [ "in_process_gpu_thread.cc" ]
index c35d71d..27bbb9a 100644 (file)
@@ -3,14 +3,12 @@
 // found in the LICENSE file.
 
 #include "content/gpu/gpu_process.h"
-#include "content/gpu/shared_mailbox_manager.h"
 #include "content/public/common/content_client.h"
 #include "content/public/gpu/content_gpu_client.h"
+#include "gpu/command_buffer/client/shared_mailbox_manager.h"
 #include "gpu/command_buffer/service/mailbox_manager.h"
 #include "gpu/config/gpu_info_collector.h"
 #include "gpu/ipc/service/gpu_init.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_message_macros.h"
 #include "ui/gl/gl_shared_context_efl.h"
 
 #define private public
@@ -20,7 +18,7 @@
 
 // Implementation of InProcessGpuThread and GpuChildThread overrides
 // in order to provide on startup shared context and mailbox manager
-// created form Efl shared evas gl context.
+// created from Efl shared evas gl context.
 
 namespace content {
 
@@ -29,26 +27,6 @@ struct GpuChildThreadEfl : public content::GpuChildThread {
       const InProcessChildThreadParams& params,
       std::unique_ptr<gpu::GpuInit> gpu_init)
       : GpuChildThread(params, std::move(gpu_init)) {}
-
-  private:
-  bool Send(IPC::Message* msg) override {
-    // The GPU process must never send a synchronous IPC message to the browser
-    // process. This could result in deadlock.
-    DCHECK(!msg->is_sync());
-
-    return ChildThreadImpl::Send(msg);
-  }
-
-  // IPC::Listener implementation via ChildThreadImpl:
-  void OnAssociatedInterfaceRequest(
-      const std::string& name,
-      mojo::ScopedInterfaceEndpointHandle handle) override {
-    if (associated_interfaces_.CanBindRequest(name))
-      associated_interfaces_.BindRequest(name, std::move(handle));
-    else
-      ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle));
-  } 
-
 };
 
 struct InProcessGpuThreadEfl : public content::InProcessGpuThread {
diff --git a/tizen_src/chromium_impl/gpu/command_buffer/client/shared_mailbox_manager.cc b/tizen_src/chromium_impl/gpu/command_buffer/client/shared_mailbox_manager.cc
new file mode 100644 (file)
index 0000000..6a86682
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "shared_mailbox_manager.h"
+
+#include "gpu/command_buffer/service/mailbox_manager_impl.h"
+
+// static
+gpu::MailboxManager* SharedMailboxManager::GetMailboxManager() {
+  static std::unique_ptr<gpu::MailboxManager> mailbox_manager =
+      std::make_unique<gpu::gles2::MailboxManagerImpl>();
+  return mailbox_manager.get();
+}
diff --git a/tizen_src/chromium_impl/gpu/command_buffer/client/shared_mailbox_manager.h b/tizen_src/chromium_impl/gpu/command_buffer/client/shared_mailbox_manager.h
new file mode 100644 (file)
index 0000000..ab1f1b2
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "gpu/command_buffer/client/gles2_impl_export.h"
+
+namespace gpu {
+class MailboxManager;
+}  // namespace gpu
+
+struct GLES2_IMPL_EXPORT SharedMailboxManager {
+  static gpu::MailboxManager* GetMailboxManager();
+};
index 4acd3fb..edafddf 100644 (file)
@@ -32,17 +32,15 @@ bool GrabWindowSnapshot(gfx::NativeWindow window,
 void GrabWindowSnapshotAsync(
   gfx::NativeWindow window,
   const gfx::Rect& source_rect,
-  scoped_refptr<base::TaskRunner> background_task_runner,
-  const GrabWindowSnapshotAsyncPNGCallback& callback) {
+  const GrabWindowSnapshotAsyncCallback& callback) {
   NOTIMPLEMENTED();
 }
 
 void GrabViewSnapshotAsync(
   gfx::NativeView view,
   const gfx::Rect& source_rect,
-  scoped_refptr<base::TaskRunner> background_task_runner,
-  const GrabWindowSnapshotAsyncPNGCallback& callback) {
-  GrabWindowSnapshotAsync(view, source_rect, background_task_runner, callback);
+  const GrabWindowSnapshotAsyncCallback& callback) {
+  GrabWindowSnapshotAsync(view, source_rect, callback);
 }
 
 }  // namespace ui
index 11b9220..938ab5d 100644 (file)
@@ -527,14 +527,8 @@ shared_library("chromium-ewk") {
   # FIXME: Followings are guarded just for bringup.
   if (ewk_bringup) {
     sources -= [
-      "browser/permission_manager_efl.cc",
-      "browser/permission_manager_efl.h",
       "browser/vibration/vibration_provider_client.cc",
       "browser/vibration/vibration_provider_client.h",
-      "devtools_delegate_efl.cc",
-      "devtools_delegate_efl.h",
-      "devtools_manager_delegate_efl.cc",
-      "devtools_manager_delegate_efl.h",
       "permission_popup_manager.cc",
       "permission_popup_manager.h",
     ]
index 57d306e..7439886 100644 (file)
@@ -89,14 +89,9 @@ void CookieManager::DeleteSessionCookiesOnIOThread() {
   DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
 
   std::unique_ptr<net::CookieStore> cookie_store = GetCookieStore();
-  
-  // FIXME: EWK_BRINGUP: Check it.
-  if (cookie_store.get()) {
-    net::ResultSavingCookieCallback<uint32_t> callback;
+  if (cookie_store) {
     cookie_store->DeleteSessionCookiesAsync(
-        base::Bind(&net::ResultSavingCookieCallback<uint32_t>::Run,
-                   base::Unretained(&callback)));
-    callback.WaitUntilDone();
+        base::OnceCallback<void(uint32_t)>());
   }
 }
 
index 5bfac6f..97bae45 100644 (file)
@@ -131,7 +131,7 @@ void DevToolsDelegateEfl::Stop() {
 }
 
 std::string DevToolsDelegateEfl::GetDiscoveryPageHTML() {
-  return ResourceBundle::GetSharedInstance()
+  return ui::ResourceBundle::GetSharedInstance()
       .GetRawDataResource(IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE)
       .as_string();
 }
index 66f2bf7..dc98c32 100644 (file)
@@ -464,8 +464,10 @@ void ewk_context_vibration_client_callbacks_set(Ewk_Context* context,
                                                 Ewk_Vibration_Client_Vibration_Cancel_Cb cancel,
                                                 void* data)
 {
+#if !defined(EWK_BRINGUP)
   VibrationProviderClientEwk* vibra_client = VibrationProviderClientEwk::GetInstance();
   vibra_client->SetVibrationClientCallbacks(vibrate, cancel, data);
+#endif
 }
 
 Eina_Bool ewk_context_tizen_extensible_api_string_set(Ewk_Context* context,  const char* extensible_api, Eina_Bool enable)
index 7349697..214002e 100644 (file)
@@ -1331,7 +1331,9 @@ void __hit_test_request_cb(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_
   printf("HitTest: link title %s\n", ewk_hit_test_link_title_get(ht));
   printf("HitTest: link label %s\n",ewk_hit_test_link_label_get(ht));
   printf("HitTest: image uri %s\n", ewk_hit_test_image_uri_get(ht));
+#if !defined(EWK_BRINGUP)
   printf("HitTest: media uri %s\n", ewk_hit_test_media_uri_get(ht));
+#endif
   printf("HitTest: tag name %s\n", ewk_hit_test_tag_name_get(ht));
   printf("HitTest: node value %s\n", ewk_hit_test_node_value_get(ht));
   printf("HitTest: image length %d\n", ewk_hit_test_image_buffer_length_get(ht));
index 25b2108..fb1404a 100644 (file)
@@ -24,6 +24,7 @@ executable("ubrowser") {
   configs += [ "//tizen_src/build:libelementary" ]
   public_configs += [ "//tizen_src/build:elementary-public" ]
   deps = [
+    "//build/config:exe_and_shlib_deps",
     "//tizen_src/ewk/efl_integration:chromium-ewk",
     "//tizen_src/ewk/efl_integration:launch_exec",
   ]