[M67 Dev][EFL] Fix compiler errors (1/2) 01/184901/4
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 24 Jul 2018 06:48:21 +0000 (06:48 +0000)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Fri, 27 Jul 2018 04:26:50 +0000 (21:26 -0700)
This resolves compiler errors to enable EFL port.

Reference: https://review.tizen.org/gerrit/#/c/169959/

Change-Id: I634566226533aea17f774ffff45cdb7d2236c57b
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
181 files changed:
tizen_src/chromium_impl/base/message_loop/message_pump_ecore.h
tizen_src/chromium_impl/components/js_dialogs_efl/BUILD.gn
tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.cc
tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.h
tizen_src/chromium_impl/components/js_dialogs_efl/javascript_modal_dialog_efl.cc
tizen_src/chromium_impl/components/js_dialogs_efl/javascript_modal_dialog_efl.h
tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc
tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.h
tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc
tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h
tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.h
tizen_src/chromium_impl/content/browser/renderer_host/im_context_efl.cc [changed mode: 0755->0644]
tizen_src/chromium_impl/content/browser/renderer_host/im_context_efl.h [changed mode: 0755->0644]
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/browser/renderer_host/render_widget_host_view_efl.h
tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.h
tizen_src/chromium_impl/content/browser/screen_orientation/screen_orientation_delegate_efl.h
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h
tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h
tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h
tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h
tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h
tizen_src/chromium_impl/content/common/cursors/webcursor_efl.cc
tizen_src/chromium_impl/content/common/media/efl/media_player_messages_efl.h
tizen_src/chromium_impl/content/common/paths_efl.cc
tizen_src/chromium_impl/content/content_gpu_efl.gypi
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/content/gpu/shared_mailbox_manager.cc
tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.h
tizen_src/chromium_impl/content/public/browser/web_contents_view_efl_delegate.h
tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.cc
tizen_src/chromium_impl/content/renderer/media/efl/media_source_delegate_efl.h
tizen_src/chromium_impl/content/renderer/media/efl/renderer_media_player_manager_efl.h
tizen_src/chromium_impl/content/renderer/media/efl/webmediaplayer_efl.cc
tizen_src/chromium_impl/content/renderer/media/efl/webmediaplayer_efl.h
tizen_src/chromium_impl/content/renderer/media/tizen/audio_decoder_capi.cc
tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.cc
tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h
tizen_src/chromium_impl/content/shell/browser/shell_efl.cc
tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc
tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc
tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc
tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h
tizen_src/chromium_impl/efl/init.cc
tizen_src/chromium_impl/gpu/config/gpu_info_collector_efl.cc
tizen_src/chromium_impl/gpu/gpu_efl.gni
tizen_src/chromium_impl/media/base/efl/media_player_manager_efl.h
tizen_src/chromium_impl/media/base/tizen/media_source_player_capi.h
tizen_src/chromium_impl/third_party/WebKit/Source/core/rendering/RenderThemeChromiumTizen.cpp
tizen_src/chromium_impl/third_party/WebKit/Source/core/rendering/RenderThemeChromiumTizen.h
tizen_src/chromium_impl/ui/BUILD.gn
tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.cc
tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.h
tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.cc
tizen_src/chromium_impl/ui/display/screen_efl.cc
tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc [deleted file]
tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h
tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc
tizen_src/chromium_impl/ui/ozone/BUILD.gn
tizen_src/chromium_impl/ui/ozone/client_native_pixmap_factory_efl.cc
tizen_src/chromium_impl/ui/ozone/client_native_pixmap_factory_efl.h
tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc
tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.h
tizen_src/chromium_impl/ui/ozone/surface_factory_efl.cc
tizen_src/chromium_impl/ui/ozone/surface_factory_efl.h
tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc
tizen_src/chromium_impl/ui/ui_efl.gni
tizen_src/ewk/chromium-ewk-xwalk.filter
tizen_src/ewk/efl_integration/BUILD.gn
tizen_src/ewk/efl_integration/browser/browsing_data_remover_efl.cc
tizen_src/ewk/efl_integration/browser/download_manager_delegate_efl.cc
tizen_src/ewk/efl_integration/browser/favicon/favicon_commands.cc
tizen_src/ewk/efl_integration/browser/favicon/favicon_database.cc
tizen_src/ewk/efl_integration/browser/favicon/favicon_database_p.cc
tizen_src/ewk/efl_integration/browser/geolocation/access_token_store_efl.cc
tizen_src/ewk/efl_integration/browser/geolocation/access_token_store_efl.h
tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.h
tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc
tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_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/notification/notification_controller_efl.cc
tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h
tizen_src/ewk/efl_integration/browser/password_manager/password_manager_client_efl.h
tizen_src/ewk/efl_integration/browser/password_manager/password_store_factory.cc
tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc
tizen_src/ewk/efl_integration/browser/permission_manager_efl.h
tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.h
tizen_src/ewk/efl_integration/browser/quota_permission_context_efl.cc
tizen_src/ewk/efl_integration/browser/quota_permission_context_efl.h
tizen_src/ewk/efl_integration/browser/render_message_filter_efl.h
tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.cc
tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.h
tizen_src/ewk/efl_integration/browser/resource_throttle_efl.h
tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item.cc
tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item.h
tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item_private.h
tizen_src/ewk/efl_integration/browser/ssl_host_state_delegate_efl.cc
tizen_src/ewk/efl_integration/browser/ssl_host_state_delegate_efl.h
tizen_src/ewk/efl_integration/browser/webdata/web_data_service.cc
tizen_src/ewk/efl_integration/browser/webdata/web_data_service_factory.cc
tizen_src/ewk/efl_integration/browser_context_efl.cc
tizen_src/ewk/efl_integration/browser_context_efl.h
tizen_src/ewk/efl_integration/browser_main_parts_efl.cc
tizen_src/ewk/efl_integration/browser_main_parts_efl.h
tizen_src/ewk/efl_integration/common/hit_test_params.h
tizen_src/ewk/efl_integration/common/navigation_policy_params.cc
tizen_src/ewk/efl_integration/common/navigation_policy_params.h
tizen_src/ewk/efl_integration/common/print_pages_params.cc
tizen_src/ewk/efl_integration/common/print_pages_params.h
tizen_src/ewk/efl_integration/common/render_messages_ewk.h
tizen_src/ewk/efl_integration/common/version_info.cc
tizen_src/ewk/efl_integration/common/web_contents_utils.cc
tizen_src/ewk/efl_integration/common/web_contents_utils.h
tizen_src/ewk/efl_integration/content_browser_client_efl.cc
tizen_src/ewk/efl_integration/content_browser_client_efl.h
tizen_src/ewk/efl_integration/content_main_delegate_efl.cc
tizen_src/ewk/efl_integration/context_menu_controller_efl.cc
tizen_src/ewk/efl_integration/cookie_manager.cc
tizen_src/ewk/efl_integration/devtools_delegate_efl.cc
tizen_src/ewk/efl_integration/devtools_delegate_efl.h
tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.cc
tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.h
tizen_src/ewk/efl_integration/eweb_context.cc
tizen_src/ewk/efl_integration/eweb_context.h
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h
tizen_src/ewk/efl_integration/ewk_global_data.cc
tizen_src/ewk/efl_integration/launch_exec.sh
tizen_src/ewk/efl_integration/message_pump_for_ui_efl.cc
tizen_src/ewk/efl_integration/network_delegate_efl.cc
tizen_src/ewk/efl_integration/network_delegate_efl.h
tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.cc
tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.h
tizen_src/ewk/efl_integration/private/ewk_geolocation_private.h
tizen_src/ewk/efl_integration/private/ewk_hit_test_private.cc
tizen_src/ewk/efl_integration/private/ewk_hit_test_private.h
tizen_src/ewk/efl_integration/private/ewk_notification_private.cc
tizen_src/ewk/efl_integration/private/ewk_notification_private.h
tizen_src/ewk/efl_integration/private/ewk_object_private.h
tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.cc
tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h
tizen_src/ewk/efl_integration/private/ewk_settings_private.cc
tizen_src/ewk/efl_integration/public/ewk_hit_test.cc
tizen_src/ewk/efl_integration/public/ewk_object.cc
tizen_src/ewk/efl_integration/public/ewk_view.cc
tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc
tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.h
tizen_src/ewk/efl_integration/renderer/editorclient_agent.cc
tizen_src/ewk/efl_integration/renderer/editorclient_agent.h
tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.cc
tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.h
tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.cc
tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.h
tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc
tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h
tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.cc
tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc
tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.h
tizen_src/ewk/efl_integration/text_encoding_map_efl.cc
tizen_src/ewk/efl_integration/url_request_context_getter_efl.cc
tizen_src/ewk/efl_integration/url_request_context_getter_efl.h
tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc
tizen_src/ewk/efl_integration/web_contents_delegate_efl.h
tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc
tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.h
tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc
tizen_src/ewk/efl_webview_app/app.c
tizen_src/ewk/efl_webview_app/mini_browser.c
tizen_src/ewk/ubrowser/browser.cc
tizen_src/ewk/ubrowser/main.cc
ui/gfx/native_widget_types.h

index cce3bc3d770580bece7bf54662e7af2f943dc661..51b1d281592c26e373ce35452e08fbc5755f18e5 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "base/base_export.h"
 #include "base/message_loop/message_pump.h"
-#include "base/threading/non_thread_safe.h"
 
 #include <Ecore.h>
 
@@ -28,7 +27,7 @@ class BASE_EXPORT MessagePumpEcore : public MessagePump {
 
   void HandleScheduledWork();
 
-private:
+ private:
   // We may make recursive calls to Run, so we save state that needs to be
   // separate between them in this structure type.
   struct RunState;
@@ -44,4 +43,4 @@ private:
 
 }  // namespace base
 
-#endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_EFL_H_
+#endif  // BASE_MESSAGE_LOOP_MESSAGE_PUMP_EFL_H_
index 21aa6627b41a8d781f0a57471601597c8c10f26a..b6923f94ddf26266e62c556019d62ad9e946430a 100644 (file)
@@ -11,7 +11,9 @@ static_library("js_dialogs_efl") {
   ]
   deps = [
     "//base",
+    "//content/public/common",
     "//skia",
+    "//third_party/boringssl",
   ]
   include_dirs = [ ".." ]
   sources = [
index afb566ec666684e5facc29195c3f7fea819ce30c..56141c953b861b08e76fc288ea6ffc1ec17db8d7 100644 (file)
@@ -19,12 +19,12 @@ JavaScriptDialogManagerEfl::~JavaScriptDialogManagerEfl() {
 }
 
 void JavaScriptDialogManagerEfl::RunJavaScriptDialog(
-    content::WebContents* web_contents,
-    const GURL& origin_url,
-    content::JavaScriptMessageType type,
+    WebContents* web_contents,
+    RenderFrameHost* render_frame_host,
+    JavaScriptDialogType dialog_type,
     const base::string16& message_text,
     const base::string16& default_prompt_text,
-    const DialogClosedCallback& callback,
+    DialogClosedCallback callback,
     bool* did_suppress_message) {
 
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -32,38 +32,38 @@ void JavaScriptDialogManagerEfl::RunJavaScriptDialog(
 
   JavaScriptModalDialogEfl::Type efl_type;
 
-  switch (type) {
-    case JAVASCRIPT_MESSAGE_TYPE_ALERT:
+  switch (dialog_type) {
+    case JAVASCRIPT_DIALOG_TYPE_ALERT:
       efl_type = JavaScriptModalDialogEfl::ALERT;
       break;
-    case JAVASCRIPT_MESSAGE_TYPE_CONFIRM:
+    case JAVASCRIPT_DIALOG_TYPE_CONFIRM:
       efl_type = JavaScriptModalDialogEfl::CONFIRM;
       break;
-    case JAVASCRIPT_MESSAGE_TYPE_PROMPT:
+    case JAVASCRIPT_DIALOG_TYPE_PROMPT:
       efl_type = JavaScriptModalDialogEfl::PROMPT;
       break;
     default:
       NOTREACHED();
   }
 
-  CancelActiveAndPendingDialogs(web_contents);
-  open_dialogs_[web_contents] =  new JavaScriptModalDialogEfl(web_contents,
-      efl_type, message_text, default_prompt_text, callback);
-  *did_suppress_message = false;
+  CancelDialogs(web_contents, false);
+  open_dialogs_[web_contents] =
+      new JavaScriptModalDialogEfl(web_contents, efl_type, message_text,
+                                   default_prompt_text, std::move(callback));
 }
 
 void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(
     content::WebContents* web_contents,
     bool is_reload,
-    const DialogClosedCallback& callback) {
+    DialogClosedCallback callback) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
-  CancelActiveAndPendingDialogs(web_contents);
+  CancelDialogs(web_contents, false);
   open_dialogs_[web_contents] = new JavaScriptModalDialogEfl(
       web_contents, JavaScriptModalDialogEfl::NAVIGATION,
       base::UTF8ToUTF16(
           std::string(dgettext("WebKit", "IDS_WEBVIEW_BEFOREUNLOAD_MESSAGE"))),
-      base::string16(), callback);
+      base::string16(), std::move(callback));
 }
 
 bool JavaScriptDialogManagerEfl::HandleJavaScriptDialog(
@@ -74,17 +74,13 @@ bool JavaScriptDialogManagerEfl::HandleJavaScriptDialog(
   return false;
 }
 
-void JavaScriptDialogManagerEfl::CancelActiveAndPendingDialogs(
-    content::WebContents* web_contents) {
+void JavaScriptDialogManagerEfl::CancelDialogs(
+    content::WebContents* web_contents,
+    bool reset_state) {
   if (open_dialogs_.find(web_contents) != open_dialogs_.end()) {
     open_dialogs_[web_contents]->Close();
     delete open_dialogs_[web_contents];
   }
 }
 
-void JavaScriptDialogManagerEfl::ResetDialogState(
-    content::WebContents* web_contents) {
-  NOTIMPLEMENTED();
-}
-
 } // namespace content
index 4e668e10ef840814bcdc4ff4bb271dcea712b61a..fed946f59ea70158976e784651a9bc8e55584f7d 100644 (file)
 #include <map>
 #include <Evas.h>
 
+#include "base/callback.h"
+#include "base/callback_forward.h"
 #include "base/strings/string16.h"
 #include "content/public/browser/javascript_dialog_manager.h"
-#include "content/public/common/javascript_message_type.h"
+#include "content/public/common/javascript_dialog_type.h"
 #include "url/gurl.h"
 
 namespace content{
@@ -25,26 +27,34 @@ class JavaScriptDialogManagerEfl: public JavaScriptDialogManager {
   JavaScriptDialogManagerEfl();
   ~JavaScriptDialogManagerEfl() override;
 
-  void RunJavaScriptDialog(
-      content::WebContents* web_contents,
-      const GURL& origin_url,
-      content::JavaScriptMessageType type,
-      const base::string16& message_text,
-      const base::string16& default_prompt_text,
-      const DialogClosedCallback& callback,
-      bool* did_suppress_message) override;
-  void RunBeforeUnloadDialog(
-      content::WebContents* web_contents,
-      bool is_reload,
-      const DialogClosedCallback& callback) override;
-  bool HandleJavaScriptDialog(
-      content::WebContents* web_contents,
-      bool accept,
-      const base::string16* prompt_override) override;
-  void CancelActiveAndPendingDialogs(
-      content::WebContents* web_contents) override;
-  void ResetDialogState(
-      content::WebContents* web_contents) override;
+  // Displays a JavaScript dialog. |did_suppress_message| will not be nil; if
+  // |true| is returned in it, the caller will handle faking the reply.
+  void RunJavaScriptDialog(WebContents* web_contents,
+                           RenderFrameHost* render_frame_host,
+                           JavaScriptDialogType dialog_type,
+                           const base::string16& message_text,
+                           const base::string16& default_prompt_text,
+                           DialogClosedCallback callback,
+                           bool* did_suppress_message) override;
+
+  // Displays a dialog asking the user if they want to leave a page.
+  void RunBeforeUnloadDialog(WebContents* web_contents,
+                             RenderFrameHost* render_frame_host,
+                             bool is_reload,
+                             DialogClosedCallback callback) override;
+
+  // Accepts or dismisses the active JavaScript dialog, which must be owned
+  // by the given |web_contents|. If |prompt_override| is not null, the prompt
+  // text of the dialog should be set before accepting. Returns true if the
+  // dialog was handled.
+  bool HandleJavaScriptDialog(WebContents* web_contents,
+                              bool accept,
+                              const base::string16* prompt_override) override;
+
+  // Cancels all active and pending dialogs for the given WebContents. If
+  // |reset_state| is true, resets any saved state tied to |web_contents|.
+  void CancelDialogs(WebContents* web_contents,
+                     bool reset_state) override;
 
  private:
   std::map<WebContents*, JavaScriptModalDialogEfl*> open_dialogs_;
index edccc867534670842c8a089f94e5233479ccc6fb..175331b60d516c7124c5d9218ab788a39d1c1505 100644 (file)
@@ -1,9 +1,10 @@
-// Copyright 2014 Samsung Electronics. All rights reserved.
+// Copyright 2014 Samsung Electroncs. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "javascript_modal_dialog_efl.h"
 
+#include "base/callback.h"
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
@@ -34,12 +35,11 @@ JavaScriptModalDialogEfl::JavaScriptModalDialogEfl(
     Type type,
     const base::string16& message_text,
     const base::string16& default_prompt_text,
-    const content::JavaScriptDialogManager::DialogClosedCallback& callback)
-    : popup_(NULL)
-    , callback_(callback)
-    , prompt_entry_(NULL)
-    , imf_context_(NULL) {
-
+    JavaScriptDialogManager::DialogClosedCallback callback)
+    : popup_(NULL),
+      callback_(std::move(callback)),
+      prompt_entry_(NULL),
+      imf_context_(NULL) {
   Evas_Object *parent_view = static_cast<Evas_Object *>(
       web_contents->GetNativeView());
   popup_ = elm_popup_add(parent_view);
@@ -65,7 +65,7 @@ JavaScriptModalDialogEfl::~JavaScriptModalDialogEfl() {
 
 void JavaScriptModalDialogEfl::SetLabelText(const base::string16& txt) {
   std::string txt2;
-  base::ReplaceChars(UTF16ToUTF8(txt).c_str(), "\n", "</br>", &txt2);
+  base::ReplaceChars(base::UTF16ToUTF8(txt).c_str(), "\n", "</br>", &txt2);
 
   Evas_Object* label = elm_label_add(popup_);
   elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
@@ -79,7 +79,8 @@ void JavaScriptModalDialogEfl::InitContent(Type type, const base::string16& mess
 
   if (type == PROMPT) {
     DCHECK(message.length());
-    elm_object_part_text_set(popup_, "title,text", UTF16ToUTF8(message).c_str());
+    elm_object_part_text_set(popup_, "title,text",
+                             base::UTF16ToUTF8(message).c_str());
     prompt_entry_ = elm_entry_add(popup_);
     elm_entry_editable_set(prompt_entry_, EINA_TRUE);
     elm_entry_single_line_set(prompt_entry_, EINA_TRUE);
@@ -88,8 +89,7 @@ void JavaScriptModalDialogEfl::InitContent(Type type, const base::string16& mess
     evas_object_size_hint_align_set(prompt_entry_, EVAS_HINT_FILL, EVAS_HINT_FILL);
     elm_entry_input_panel_return_key_type_set(prompt_entry_,
         ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
-    elm_object_text_set(prompt_entry_,
-        UTF16ToUTF8(content).c_str());
+    elm_object_text_set(prompt_entry_, base::UTF16ToUTF8(content).c_str());
     elm_entry_cursor_end_set(prompt_entry_);
     evas_object_smart_callback_add(prompt_entry_, "activated",
         &PromptEnterKeyDownCallback, this);
@@ -106,7 +106,8 @@ void JavaScriptModalDialogEfl::InitContent(Type type, const base::string16& mess
     elm_object_part_content_set(popup_, "default", prompt_entry_);
   } else if (type == NAVIGATION) {
     if (message.length())
-      elm_object_part_text_set(popup_, "title,text", UTF16ToUTF8(message).c_str());
+      elm_object_part_text_set(popup_, "title,text",
+                               base::UTF16ToUTF8(message).c_str());
     if (content.length())
       SetLabelText(content);
   } else {
@@ -175,7 +176,7 @@ void JavaScriptModalDialogEfl::ParentViewResized(
 
 void JavaScriptModalDialogEfl::Close(bool accept, std::string reply) {
   if (popup_) {
-    callback_.Run(accept, base::UTF8ToUTF16(reply));
+    std::move(callback_).Run(accept, base::UTF8ToUTF16(reply));
     evas_object_del(popup_);
     popup_ = NULL;
     prompt_entry_ = NULL;
index 12d040c75bb5d5e3283b1f33273c9e803d78a9b5..f088fd0c5b8a5b94d5a79f448e43510018fe1103 100644 (file)
@@ -8,6 +8,8 @@
 #include <string>
 #include <Elementary.h>
 
+#include "base/callback.h"
+#include "base/callback_forward.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "content/public/browser/javascript_dialog_manager.h"
@@ -24,12 +26,11 @@ class JavaScriptModalDialogEfl {
     PROMPT
   };
 
-  JavaScriptModalDialogEfl(
-      content::WebContents* web_contents,
-      Type type,
-      const base::string16& message_text,
-      const base::string16& default_prompt_text,
-      const content::JavaScriptDialogManager::DialogClosedCallback&);
+  JavaScriptModalDialogEfl(content::WebContents* web_contents,
+                           Type type,
+                           const base::string16& message_text,
+                           const base::string16& default_prompt_text,
+                           JavaScriptDialogManager::DialogClosedCallback);
   ~JavaScriptModalDialogEfl();
 
   void Close(bool accept = false, std::string reply = std::string());
index 67d8baee539240b6be17110fafb2081f47f26f0d..5fc31d78daf029f217ded559f8e60f212ba57623 100644 (file)
@@ -4,16 +4,16 @@
 
 #include "content/browser/compositor/context_factory_efl.h"
 
-#include "cc/output/texture_mailbox_deleter.h"
 #include "cc/raster/single_thread_task_graph_runner.h"
-#include "cc/surfaces/display.h"
-#include "cc/surfaces/surface_display_output_surface.h"
-#include "components/display_compositor/gl_helper.h"
+#include "components/viz/common/gl_helper.h"
+#include "components/viz/service/display/display.h"
+#include "components/viz/service/display/texture_mailbox_deleter.h"
+#include "content/browser/browser_main_loop.h"
 #include "content/browser/compositor/mailbox_output_surface_efl.h"
 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
-#include "content/browser/gpu/gpu_surface_tracker.h"
-#include "content/common/host_shared_bitmap_manager.h"
+#include "content/renderer/render_thread_impl.h"
+#include "gpu/ipc/common/gpu_surface_tracker.h"
 #include "ui/compositor/reflector.h"
 
 namespace content {
@@ -28,12 +28,11 @@ class FakeReflector : public ui::Reflector {
   void AddMirroringLayer(ui::Layer* layer) override {}
   void RemoveMirroringLayer(ui::Layer* layer) override {}
 };
-}
+}  // namespace
 
 ContextFactoryEfl::ContextFactoryEfl()
-    : next_surface_id_namespace_(1u),
-      task_graph_runner_(new cc::SingleThreadTaskGraphRunner) {
-  surface_manager_ = base::WrapUnique(new cc::SurfaceManager);
+    : task_graph_runner_(new cc::SingleThreadTaskGraphRunner),
+      frame_sink_id_allocator_(0u) {
   task_graph_runner_->Start("CompositorTileWorker1",
                             base::SimpleThread::Options());
 }
@@ -42,184 +41,108 @@ ContextFactoryEfl::~ContextFactoryEfl() {
   task_graph_runner_->Shutdown();
 }
 
-void ContextFactoryEfl::CreateOutputSurface(
+void ContextFactoryEfl::CreateLayerTreeFrameSink(
     base::WeakPtr<ui::Compositor> compositor) {
-  gpu::gles2::ContextCreationAttribHelper attrs;
-  attrs.alpha_size = -1;
-  attrs.depth_size = 0;
-  attrs.stencil_size = 0;
-  attrs.samples = 0;
-  attrs.sample_buffers = 0;
-  attrs.bind_generates_resource = false;
-  attrs.lose_context_when_out_of_memory = true;
-
-  scoped_refptr<content::ContextProviderCommandBuffer> context_provider;
-  scoped_refptr<gpu::GpuChannelHost> gpu_channel_host(
-      BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync(
-          CAUSE_FOR_GPU_LAUNCH_BROWSER_SHARED_MAIN_THREAD_CONTEXT));
-  if (gpu_channel_host.get() && !gpu_channel_host->IsLost()) {
-    GURL url("chrome://gpu/Compositor::createContext3D");
-    constexpr bool automatic_flushes = false;
-    constexpr bool support_locking = false;
-    constexpr gl::GpuPreference gpu_preference = gl::PreferIntegratedGpu;
-    context_provider = new content::ContextProviderCommandBuffer(
-        std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT,
-        gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url,
-        gpu_preference, automatic_flushes, support_locking,
-        gpu::SharedMemoryLimits(), attrs, NULL,
-        command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT);
-  }
-  if (!context_provider.get()) {
-    LOG(ERROR) << "Failed to create 3D context for compositor.";
-    compositor->SetOutputSurface(std::unique_ptr<cc::OutputSurface>());
-  }
-
-  std::unique_ptr<cc::SyntheticBeginFrameSource> begin_frame_source;
-  if (!compositor->GetRendererSettings().disable_display_vsync) {
-    begin_frame_source.reset(new cc::DelayBasedBeginFrameSource(
-        base::MakeUnique<cc::DelayBasedTimeSource>(
-            compositor->task_runner().get())));
-  } else {
-    begin_frame_source.reset(new cc::BackToBackBeginFrameSource(
-        base::MakeUnique<cc::DelayBasedTimeSource>(
-            compositor->task_runner().get())));
-  }
-
-  std::unique_ptr<MailboxOutputSurfaceEfl> display_output_surface =
-      base::WrapUnique(
-          new MailboxOutputSurfaceEfl(context_provider, cc::RGBA_8888));
-  display_output_surface->SetCompositorClient(compositor->client());
-
-  std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
-      begin_frame_source.get(), compositor->task_runner().get(),
-      display_output_surface->capabilities().max_frames_pending));
-
-  cc::SurfaceManager* surface_manager = surface_manager_.get();
-
-  display_ = base::MakeUnique<cc::Display>(
-      surface_manager, GetSharedBitmapManager(), GetGpuMemoryBufferManager(),
-      compositor->GetRendererSettings(),
-      compositor->surface_id_allocator()->id_namespace(),
-      std::move(begin_frame_source), std::move(display_output_surface),
-      std::move(scheduler), base::MakeUnique<cc::TextureMailboxDeleter>(
-                                compositor->task_runner().get()));
-
-  std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface(
-      new cc::SurfaceDisplayOutputSurface(
-          surface_manager, compositor->surface_id_allocator(), display_.get(),
-          context_provider, nullptr));
-
-  display_->Resize(compositor->size());
-  compositor->SetOutputSurface(std::move(delegated_output_surface));
+  NOTIMPLEMENTED();
 }
 
-std::unique_ptr<ui::Reflector> ContextFactoryEfl::CreateReflector(
-    ui::Compositor* mirrored_compositor,
-    ui::Layer* mirroring_layer) {
-  return base::WrapUnique(new FakeReflector);
+scoped_refptr<viz::ContextProvider>
+ContextFactoryEfl::SharedMainThreadContextProvider() {
+  NOTIMPLEMENTED() << "Return dummy.";
+  return main_context_provider_;
 }
 
-void ContextFactoryEfl::RemoveReflector(ui::Reflector* reflector) {}
-
-scoped_refptr<cc::ContextProvider>
-ContextFactoryEfl::SharedMainThreadContextProvider() {
-  if (shared_main_thread_contexts_.get())
-    return shared_main_thread_contexts_;
-
-  gpu::gles2::ContextCreationAttribHelper attrs;
-  attrs.alpha_size = -1;
-  attrs.depth_size = 0;
-  attrs.stencil_size = 0;
-  attrs.samples = 0;
-  attrs.sample_buffers = 0;
-  attrs.bind_generates_resource = false;
-  attrs.lose_context_when_out_of_memory = true;
-
-  scoped_refptr<content::ContextProviderCommandBuffer> context_provider;
-  scoped_refptr<gpu::GpuChannelHost> gpu_channel_host(
-      BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync(
-          CAUSE_FOR_GPU_LAUNCH_BROWSER_SHARED_MAIN_THREAD_CONTEXT));
-  if (gpu_channel_host.get() && !gpu_channel_host->IsLost()) {
-    GURL url("chrome://gpu/Compositor::createContext3D");
-    constexpr bool automatic_flushes = false;
-    constexpr bool support_locking = false;
-    constexpr gl::GpuPreference gpu_preference = gl::PreferIntegratedGpu;
-    shared_main_thread_contexts_ = new content::ContextProviderCommandBuffer(
-        std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT,
-        gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url,
-        gpu_preference, automatic_flushes, support_locking,
-        gpu::SharedMemoryLimits(), attrs, NULL,
-        command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT);
-  }
+double ContextFactoryEfl::GetRefreshRate() const {
+  return 60.0;
+}
 
-  if (!shared_main_thread_contexts_->BindToCurrentThread())
-    shared_main_thread_contexts_ = NULL;
-  return shared_main_thread_contexts_;
+gpu::GpuMemoryBufferManager* ContextFactoryEfl::GetGpuMemoryBufferManager() {
+  return content::BrowserGpuMemoryBufferManager::current();
 }
 
-void ContextFactoryEfl::RemoveCompositor(ui::Compositor* compositor) {}
+cc::TaskGraphRunner* ContextFactoryEfl::GetTaskGraphRunner() {
+  return task_graph_runner_.get();
+}
 
-bool ContextFactoryEfl::DoesCreateTestContexts() {
-  return false;
+void ContextFactoryEfl::AddObserver(ui::ContextFactoryObserver* observer) {
+  observer_list_.AddObserver(observer);
 }
 
-uint32_t ContextFactoryEfl::GetImageTextureTarget(gfx::BufferFormat format,
-                                                  gfx::BufferUsage usage) {
-  return GL_TEXTURE_2D;
+void ContextFactoryEfl::RemoveObserver(ui::ContextFactoryObserver* observer) {
+  observer_list_.RemoveObserver(observer);
 }
 
-cc::SharedBitmapManager* ContextFactoryEfl::GetSharedBitmapManager() {
-  return content::HostSharedBitmapManager::current();
+std::unique_ptr<ui::Reflector> ContextFactoryEfl::CreateReflector(
+    ui::Compositor* source,
+    ui::Layer* target) {
+  NOTIMPLEMENTED();
+  return nullptr;
 }
 
-gpu::GpuMemoryBufferManager* ContextFactoryEfl::GetGpuMemoryBufferManager() {
-  return content::BrowserGpuMemoryBufferManager::current();
+void ContextFactoryEfl::RemoveReflector(ui::Reflector* reflector) {
+  NOTIMPLEMENTED();
 }
 
-cc::TaskGraphRunner* ContextFactoryEfl::GetTaskGraphRunner() {
-  return task_graph_runner_.get();
+viz::FrameSinkId ContextFactoryEfl::AllocateFrameSinkId() {
+  NOTIMPLEMENTED() << "Return dummy.";
+  return frame_sink_id_allocator_.NextFrameSinkId();
 }
 
-std::unique_ptr<cc::SurfaceIdAllocator>
-ContextFactoryEfl::CreateSurfaceIdAllocator() {
-  std::unique_ptr<cc::SurfaceIdAllocator> allocator = base::WrapUnique(
-      new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
-  if (GetSurfaceManager())
-    allocator->RegisterSurfaceIdNamespace(GetSurfaceManager());
-  return allocator;
+viz::HostFrameSinkManager* ContextFactoryEfl::GetHostFrameSinkManager() {
+  return BrowserMainLoop::GetInstance()->host_frame_sink_manager();
 }
 
+void ContextFactoryEfl::SetDisplayVisible(ui::Compositor* compositor,
+                                          bool visible) {}
+
 void ContextFactoryEfl::ResizeDisplay(ui::Compositor* compositor,
                                       const gfx::Size& size) {
-  if (display_)
-    display_->Resize(size);
+  // Do nothing and resize when a CompositorFrame with a new size arrives.
 }
 
+void ContextFactoryEfl::SetDisplayColorSpace(
+    ui::Compositor* compositor,
+    const gfx::ColorSpace& blending_color_space,
+    const gfx::ColorSpace& output_color_space) {}
+
+void ContextFactoryEfl::SetAuthoritativeVSyncInterval(
+    ui::Compositor* compositor,
+    base::TimeDelta interval) {}
+
+void ContextFactoryEfl::SetDisplayVSyncParameters(ui::Compositor* compositor,
+                                                  base::TimeTicks timebase,
+                                                  base::TimeDelta interval) {}
+
+void ContextFactoryEfl::IssueExternalBeginFrame(
+    ui::Compositor* compositor,
+    const viz::BeginFrameArgs& args) {}
+
+void ContextFactoryEfl::SetOutputIsSecure(ui::Compositor* compositor,
+                                          bool secure) {}
+
 ui::ContextFactory* ContextFactoryEfl::GetContextFactory() {
   return this;
 }
 
-cc::SurfaceManager* ContextFactoryEfl::GetSurfaceManager() {
-  return surface_manager_.get();
+ui::ContextFactoryPrivate* ContextFactoryEfl::GetContextFactoryPrivate() {
+  return this;
 }
 
-display_compositor::GLHelper* ContextFactoryEfl::GetGLHelper() {
+viz::GLHelper* ContextFactoryEfl::GetGLHelper() {
   if (!gl_helper_) {
-    scoped_refptr<cc::ContextProvider> provider =
+    scoped_refptr<viz::ContextProvider> provider =
         SharedMainThreadContextProvider();
     if (provider.get())
-      gl_helper_.reset(new display_compositor::GLHelper(
-          provider->ContextGL(), provider->ContextSupport()));
+      gl_helper_.reset(
+          new viz::GLHelper(provider->ContextGL(), provider->ContextSupport()));
   }
-  return gl_helper_.get();
-}
 
-void ContextFactoryEfl::AddObserver(ui::ContextFactoryObserver* observer) {
-  observer_list_.AddObserver(observer);
+  return gl_helper_.get();
 }
 
-void ContextFactoryEfl::RemoveObserver(ui::ContextFactoryObserver* observer) {
-  observer_list_.RemoveObserver(observer);
+void ContextFactoryEfl::SetGpuChannelEstablishFactory(
+    gpu::GpuChannelEstablishFactory* factory) {
+  NOTIMPLEMENTED();
 }
 
 }  // namespace content
index 768e7fce53e50d841cf7047eb0b2de1a72a7c830..3df65be818f22ef2d420eab93b01ed04bb9d73f2 100644 (file)
@@ -5,60 +5,78 @@
 #ifndef CONTENT_BROWSER_COMPOSITOR_CONTEXT_FACTORY_EFL_H_
 #define CONTENT_BROWSER_COMPOSITOR_CONTEXT_FACTORY_EFL_H_
 
-#include "cc/surfaces/display.h"
+#include "components/viz/common/surfaces/frame_sink_id_allocator.h"
 #include "content/browser/compositor/image_transport_factory.h"
 #include "ui/compositor/compositor.h"
 
 namespace cc {
 class SingleThreadTaskGraphRunner;
-class SurfaceManager;
+}  // namespace cc
+
+namespace gpu {
+class GpuChannelEstablishFactory;
 }
 
-namespace content {
+namespace ui {
 class ContextProviderCommandBuffer;
+}
+
+namespace content {
 
 class ContextFactoryEfl : public ui::ContextFactory,
+                          public ui::ContextFactoryPrivate,
                           public ImageTransportFactory {
  public:
   ContextFactoryEfl();
   ~ContextFactoryEfl() override;
 
   // ui::ContextFactory implementation.
-  void CreateOutputSurface(base::WeakPtr<ui::Compositor> compositor) override;
+  void CreateLayerTreeFrameSink(
+      base::WeakPtr<ui::Compositor> compositor) override;
+  scoped_refptr<viz::ContextProvider> SharedMainThreadContextProvider()
+      override;
+  double GetRefreshRate() const override;
+  gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
+  cc::TaskGraphRunner* GetTaskGraphRunner() override;
+  void AddObserver(ui::ContextFactoryObserver* observer) override;
+  void RemoveObserver(ui::ContextFactoryObserver* observer) override;
+
+  // ui::ContextFactoryPrivate implementation.
   std::unique_ptr<ui::Reflector> CreateReflector(ui::Compositor* source,
                                                  ui::Layer* target) override;
   void RemoveReflector(ui::Reflector* reflector) override;
   void RemoveCompositor(ui::Compositor* compositor) override;
-  scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
-  bool DoesCreateTestContexts() override;
-  uint32_t GetImageTextureTarget(gfx::BufferFormat format,
-                                 gfx::BufferUsage usage) override;
-  cc::SharedBitmapManager* GetSharedBitmapManager() override;
-  gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
-  cc::TaskGraphRunner* GetTaskGraphRunner() override;
-  std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() override;
+  viz::FrameSinkId AllocateFrameSinkId() override;
+  viz::HostFrameSinkManager* GetHostFrameSinkManager() override;
+  void SetDisplayVisible(ui::Compositor* compositor, bool visible) override;
   void ResizeDisplay(ui::Compositor* compositor,
                      const gfx::Size& size) override;
+  void SetDisplayColorSpace(ui::Compositor* compositor,
+                            const gfx::ColorSpace& blending_color_space,
+                            const gfx::ColorSpace& output_color_space) override;
   void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
-                                     base::TimeDelta interval) override {}
-
-  void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {}
+                                     base::TimeDelta interval) override;
+  void SetDisplayVSyncParameters(ui::Compositor* compositor,
+                                 base::TimeTicks timebase,
+                                 base::TimeDelta interval) override;
+  void IssueExternalBeginFrame(ui::Compositor* compositor,
+                               const viz::BeginFrameArgs& args) override;
+  void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override;
 
   // ImageTransportFactory implementation.
   ui::ContextFactory* GetContextFactory() override;
-  cc::SurfaceManager* GetSurfaceManager() override;
-  display_compositor::GLHelper* GetGLHelper() override;
-  void AddObserver(ui::ContextFactoryObserver* observer) override;
-  void RemoveObserver(ui::ContextFactoryObserver* observer) override;
+  ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
+  viz::GLHelper* GetGLHelper() override;
+  void SetGpuChannelEstablishFactory(
+      gpu::GpuChannelEstablishFactory* factory) override;
 
  private:
-  std::unique_ptr<display_compositor::GLHelper> gl_helper_;
+  std::unique_ptr<viz::GLHelper> gl_helper_;
   base::ObserverList<ui::ContextFactoryObserver> observer_list_;
-  std::unique_ptr<cc::SurfaceManager> surface_manager_;
-  uint32_t next_surface_id_namespace_;
-  std::unique_ptr<cc::Display> display_;
+  scoped_refptr<ui::ContextProviderCommandBuffer> main_context_provider_;
   std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_;
-  scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_;
+
+  viz::FrameSinkIdAllocator frame_sink_id_allocator_;
 
   DISALLOW_COPY_AND_ASSIGN(ContextFactoryEfl);
 };
index a83464383df413a0b97ba74df7c9270a390302d3..28f395712244deaaa7a80d417b394abf7930ee7d 100644 (file)
@@ -6,8 +6,11 @@
 
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/tizen_version.h"
-#include "cc/output/output_surface_client.h"
+//#include "cc/output/output_surface_client.h"
+#include "components/viz/service/display/output_surface_client.h"
+//#include "cc/output/output_surface_frame.h"
 #include "cc/raster/single_thread_task_graph_runner.h"
+#include "components/viz/service/display/output_surface_frame.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "gpu/command_buffer/client/context_support.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
@@ -19,9 +22,9 @@ using gpu::gles2::GLES2Interface;
 namespace content {
 
 MailboxOutputSurfaceEfl::MailboxOutputSurfaceEfl(
-    const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
-    cc::ResourceFormat format)
-    : cc::OutputSurface(context_provider, nullptr, nullptr),
+    const scoped_refptr<ui::ContextProviderCommandBuffer>& context_provider,
+    viz::ResourceFormat format)
+    : viz::OutputSurface(context_provider),
       swap_buffers_completion_callback_(
           base::Bind(&MailboxOutputSurfaceEfl::OnSwapBuffersCompleted,
                      base::Unretained(this))),
@@ -31,23 +34,10 @@ MailboxOutputSurfaceEfl::MailboxOutputSurfaceEfl(
       format_(format) {
   capabilities_.max_frames_pending = 1;
   capabilities_.uses_default_gl_framebuffer = false;
-  capabilities_.adjust_deadline_for_parent = false;
 }
 
 MailboxOutputSurfaceEfl::~MailboxOutputSurfaceEfl() {}
 
-void MailboxOutputSurfaceEfl::DetachFromClient() {
-  DiscardBackbuffer();
-  while (!pending_textures_.empty()) {
-    if (pending_textures_.front().texture_id) {
-      context_provider_->ContextGL()->DeleteTextures(
-          1, &pending_textures_.front().texture_id);
-    }
-    pending_textures_.pop_front();
-  }
-  cc::OutputSurface::DetachFromClient();
-}
-
 void MailboxOutputSurfaceEfl::EnsureBackbuffer() {
   is_backbuffer_discarded_ = false;
 
@@ -57,6 +47,10 @@ void MailboxOutputSurfaceEfl::EnsureBackbuffer() {
     // Find a texture of matching size to recycle.
     while (!returned_textures_.empty()) {
       TransferableFrame& texture = returned_textures_.front();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      // FIXME: EWK_BRINGUP definition should be removed.
+      // surface_size_ variable was removed in
+      // cc/output/output_surface.h
       if (texture.size == surface_size_) {
         current_backing_ = texture;
         if (current_backing_.sync_token.HasData())
@@ -64,6 +58,7 @@ void MailboxOutputSurfaceEfl::EnsureBackbuffer() {
         returned_textures_.pop();
         break;
       }
+#endif  // !defined(EWK_BRINGUP)
 
       gl->DeleteTextures(1, &texture.texture_id);
       returned_textures_.pop();
@@ -71,15 +66,25 @@ void MailboxOutputSurfaceEfl::EnsureBackbuffer() {
 
     if (!current_backing_.texture_id) {
       gl->GenTextures(1, &current_backing_.texture_id);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      // FIXME: EWK_BRINGUP definition should be removed.
+      // surface_size_ variable was removed in
+      // cc/output/output_surface.h
       current_backing_.size = surface_size_;
+#endif  // !defined(EWK_BRINGUP)
       gl->BindTexture(GL_TEXTURE_2D, current_backing_.texture_id);
       gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
       gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
       gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
       gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      // FIXME: EWK_BRINGUP definition should be removed.
+      // surface_size_ variable was removed in
+      // cc/output/output_surface.h
       gl->TexImage2D(GL_TEXTURE_2D, 0, GLInternalFormat(format_),
                      surface_size_.width(), surface_size_.height(), 0,
                      GLDataFormat(format_), GLDataType(format_), NULL);
+#endif  // !defined(EWK_BRINGUP)
       gl->GenMailboxCHROMIUM(current_backing_.mailbox.name);
       gl->ProduceTextureCHROMIUM(GL_TEXTURE_2D, current_backing_.mailbox.name);
       texture_upload_pending_ = true;
@@ -87,7 +92,7 @@ void MailboxOutputSurfaceEfl::EnsureBackbuffer() {
   }
 }
 
-void MailboxOutputSurfaceEfl::DiscardBackbuffer() {
+/*void MailboxOutputSurfaceEfl::fvDiscardBackbuffer() {
   is_backbuffer_discarded_ = true;
 
   GLES2Interface* gl = context_provider_->ContextGL();
@@ -108,16 +113,22 @@ void MailboxOutputSurfaceEfl::DiscardBackbuffer() {
     gl->DeleteFramebuffers(1, &fbo_);
     fbo_ = 0;
   }
-}
+}*/
 
 void MailboxOutputSurfaceEfl::Reshape(const gfx::Size& size,
                                       float scale_factor,
-                                      bool alpha) {
+                                      const gfx::ColorSpace& color_space,
+                                      bool has_alpha,
+                                      bool use_stencil) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // surface_size_ variable was removed in cc/output/output_surface.h
   if (size == surface_size_)
     return;
 
   surface_size_ = size;
   device_scale_factor_ = scale_factor;
+#endif  // !defined(EWK_BRINGUP)
   DiscardBackbuffer();
   EnsureBackbuffer();
 }
@@ -135,6 +146,9 @@ void MailboxOutputSurfaceEfl::BindFramebuffer() {
                            current_backing_.texture_id, 0);
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
+// cc::GLFrameData was removed in cc/output/gl_frame_data.h
 void MailboxOutputSurfaceEfl::DrawTexture(
     std::unique_ptr<cc::GLFrameData> gl_frame_data) {
   // Draw texture on RWHV
@@ -191,8 +205,13 @@ void MailboxOutputSurfaceEfl::OnSwapAck(
   }
   client_->DidSwapBuffersComplete();
 }
+#endif  // !defined(EWK_BRINGUP)
 
-void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame frame) {
+void MailboxOutputSurfaceEfl::SwapBuffers(viz::OutputSurfaceFrame frame) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // The type of frame was changed, so gl_frame_data isn't member of
+  // frame
   DCHECK(frame.gl_frame_data);
   DCHECK(!surface_size_.IsEmpty());
   DCHECK(surface_size_ == current_backing_.size);
@@ -200,7 +219,6 @@ void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame frame) {
   DCHECK(!current_backing_.mailbox.IsZero() ||
          context_provider_->ContextGL()->GetGraphicsResetStatusKHR() !=
              GL_NO_ERROR);
-
   frame.gl_frame_data->mailbox = current_backing_.mailbox;
 
 // Using glFinish call instead of glFlush, fixes black screen issue with
@@ -236,38 +254,42 @@ void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame frame) {
 
   pending_textures_.push_back(current_backing_);
   current_backing_ = TransferableFrame();
+#endif  // !defined(EWK_BRINGUP)
 }
 
 uint32_t MailboxOutputSurfaceEfl::GetFramebufferCopyTextureFormat() {
   auto* gl =
-      static_cast<ContextProviderCommandBuffer*>(context_provider_.get());
+      static_cast<ui::ContextProviderCommandBuffer*>(context_provider_.get());
   return gl->GetCopyTextureInternalFormat();
 }
 
-bool MailboxOutputSurfaceEfl::BindToClient(cc::OutputSurfaceClient* client) {
-  if (!OutputSurface::BindToClient(client))
-    return false;
+void MailboxOutputSurfaceEfl::BindToClient(viz::OutputSurfaceClient* client) {
+  OutputSurface::BindToClient(client);
   GetCommandBufferProxy()->SetSwapBuffersCompletionCallback(
       swap_buffers_completion_callback_.callback());
-  return true;
+  return;
 }
 
 gpu::CommandBufferProxyImpl* MailboxOutputSurfaceEfl::GetCommandBufferProxy() {
-  ContextProviderCommandBuffer* provider_command_buffer =
-      static_cast<ContextProviderCommandBuffer*>(context_provider_.get());
+  ui::ContextProviderCommandBuffer* provider_command_buffer =
+      static_cast<ui::ContextProviderCommandBuffer*>(context_provider_.get());
   gpu::CommandBufferProxyImpl* command_buffer_proxy =
       provider_command_buffer->GetCommandBufferProxy();
   DCHECK(command_buffer_proxy);
   return command_buffer_proxy;
 }
 
-void MailboxOutputSurfaceEfl::OnSwapBuffersCompleted(
+/*void MailboxOutputSurfaceEfl::OnSwapBuffersCompleted(
     const std::vector<ui::LatencyInfo>& latency_info,
     gfx::SwapResult result,
     const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
   RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // OnSwapBuffersComplete was removed in cc/output/output_surface.h
   OutputSurface::OnSwapBuffersComplete();
-}
+#endif  // !defined(EWK_BRINGUP)
+}*/
 
 MailboxOutputSurfaceEfl::TransferableFrame::TransferableFrame()
     : texture_id(0) {}
@@ -278,4 +300,36 @@ MailboxOutputSurfaceEfl::TransferableFrame::TransferableFrame(
     const gfx::Size size)
     : texture_id(texture_id), mailbox(mailbox), size(size) {}
 
+void MailboxOutputSurfaceEfl::SetDrawRectangle(const gfx::Rect& rect) {}
+
+bool MailboxOutputSurfaceEfl::HasExternalStencilTest() const {
+  NOTIMPLEMENTED();
+  return false;
+}
+
+void MailboxOutputSurfaceEfl::ApplyExternalStencil() {
+  NOTIMPLEMENTED();
+}
+
+viz::OverlayCandidateValidator*
+MailboxOutputSurfaceEfl::GetOverlayCandidateValidator() const {
+  return nullptr;
+}
+
+bool MailboxOutputSurfaceEfl::IsDisplayedAsOverlayPlane() const {
+  return false;
+}
+
+unsigned MailboxOutputSurfaceEfl::GetOverlayTextureId() const {
+  return 0;
+}
+
+gfx::BufferFormat MailboxOutputSurfaceEfl::GetOverlayBufferFormat() const {
+  return gfx::BufferFormat::RGBX_8888;
+}
+
+bool MailboxOutputSurfaceEfl::SurfaceIsSuspendForRecycle() const {
+  return false;
+}
+
 }  // namespace content
index ac3e32839ce793d73357960d6c1721435f46c67e..e1a29133c3169bd1f78e1eb4ab753c9981c56eaa 100644 (file)
@@ -6,41 +6,50 @@
 #define CONTENT_BROWSER_COMPOSITOR_MAILBOX_OUTPUT_SURFACE_EFL_H_
 
 #include "base/cancelable_callback.h"
-#include "cc/output/gl_frame_data.h"
-#include "cc/output/output_surface.h"
-#include "cc/resources/resource_format.h"
-#include "content/common/gpu/client/context_provider_command_buffer.h"
+#include "components/viz/common/resources/resource_format.h"
+#include "components/viz/service/display/output_surface.h"
 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
-#include "ui/gfx/swap_result.h"
+#include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
 #include "ui/compositor/compositor.h"
+#include "ui/gfx/swap_result.h"
 
 namespace content {
 
-class MailboxOutputSurfaceEfl : public cc::OutputSurface {
+class MailboxOutputSurfaceEfl : public viz::OutputSurface {
  public:
   MailboxOutputSurfaceEfl(
-      const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
-      cc::ResourceFormat format);
+      const scoped_refptr<ui::ContextProviderCommandBuffer>& context_provider,
+      viz::ResourceFormat format);
   ~MailboxOutputSurfaceEfl() override;
 
-  // cc::OutputSurface implementation.
-  bool BindToClient(cc::OutputSurfaceClient* client) override;
-  void DetachFromClient() override;
+  // viz::OutputSurface implementation.
+  void BindToClient(viz::OutputSurfaceClient* client) override;
   void EnsureBackbuffer() override;
   void DiscardBackbuffer() override;
-  void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override;
   void BindFramebuffer() override;
-  void SwapBuffers(cc::CompositorFrame frame) override;
-
-  void SetCompositorClient(ui::CompositorClient* client) {
-    compositor_client_ = client;
-  }
-
+  void SetDrawRectangle(const gfx::Rect& rect) override;
+  void Reshape(const gfx::Size& size,
+               float scale_factor,
+               const gfx::ColorSpace& color_space,
+               bool has_alpha,
+               bool use_stencil) override;
+  void SwapBuffers(viz::OutputSurfaceFrame frame) override;
+  bool HasExternalStencilTest() const override;
+  void ApplyExternalStencil() override;
   uint32_t GetFramebufferCopyTextureFormat() override;
+  viz::OverlayCandidateValidator* GetOverlayCandidateValidator() const override;
+  bool IsDisplayedAsOverlayPlane() const override;
+  unsigned GetOverlayTextureId() const override;
+  gfx::BufferFormat GetOverlayBufferFormat() const override;
+  bool SurfaceIsSuspendForRecycle() const override;
 
  private:
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // cc::GLFrameData was removed in cc/output/gl_frame_data.h
   void OnSwapAck(std::unique_ptr<cc::GLFrameData> gl_frame_data);
   void DrawTexture(std::unique_ptr<cc::GLFrameData> gl_frame_data);
+#endif  // !defined(EWK_BRINGUP)
   gpu::CommandBufferProxyImpl* GetCommandBufferProxy();
   void OnSwapBuffersCompleted(
       const std::vector<ui::LatencyInfo>& latency_info,
@@ -74,7 +83,7 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface {
   uint32_t fbo_;
   bool is_backbuffer_discarded_;
   bool texture_upload_pending_;
-  cc::ResourceFormat format_;
+  viz::ResourceFormat format_;
 };
 
 }  // namespace content
index b2e6d63fe4cc66512507c9353fb7706fd105efd8..e0d06ba68d1c2e3b9799a84f2036fe8b58dc5202 100644 (file)
@@ -11,7 +11,7 @@
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "media/base/efl/media_player_manager_efl.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
 
 namespace content {
 
old mode 100755 (executable)
new mode 100644 (file)
index a6940c3..6a6fb16
@@ -14,7 +14,6 @@
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_view_efl.h"
 #include "third_party/icu/source/common/unicode/uchar.h"
-#include "wtf/text/icu/UnicodeIcu.h"
 
 #ifdef IM_CTX_DEBUG
 #define IM_CTX_LOG_CHANNEL LOG(ERROR)
@@ -25,7 +24,8 @@
 #define IM_CTX_LOG IM_CTX_LOG_CHANNEL << "## IMCTX ## " << __FUNCTION__ << " "
 
 // FIXME: we do not handle text compositing correctly yet.
-// Limit the functinality of this class to the handling of virtual keyboard for now.
+// Limit the functinality of this class to the handling of virtual keyboard for
+// now.
 #define USE_IM_COMPOSITING 1
 
 namespace {
@@ -51,11 +51,11 @@ Ecore_IMF_Context* CreateIMFContext(Evas* evas) {
 }
 
 Eina_Bool IsIMFVisible(Ecore_IMF_Context* context_) {
-  return ecore_imf_context_input_panel_state_get(context_)
-      == ECORE_IMF_INPUT_PANEL_STATE_SHOW;
+  return ecore_imf_context_input_panel_state_get(context_) ==
+         ECORE_IMF_INPUT_PANEL_STATE_SHOW;
 }
 
-} // namespace
+}  // namespace
 
 namespace content {
 
@@ -68,7 +68,8 @@ IMContextEfl* IMContextEfl::Create(RenderWidgetHostViewEfl* view) {
   return new IMContextEfl(view, context);
 }
 
-IMContextEfl::IMContextEfl(RenderWidgetHostViewEfl* view, Ecore_IMF_Context* context)
+IMContextEfl::IMContextEfl(RenderWidgetHostViewEfl* view,
+                           Ecore_IMF_Context* context)
     : view_(view),
       context_(context),
       is_focused_(false),
@@ -83,22 +84,38 @@ IMContextEfl::IMContextEfl(RenderWidgetHostViewEfl* view, Ecore_IMF_Context* con
 }
 
 void IMContextEfl::InitializeIMFContext(Ecore_IMF_Context* context) {
-  // FIXME: IME was not shown when this value was set as false on Wayland.
-  // So temporarily block the code until find root cause.
+// FIXME: IME was not shown when this value was set as false on Wayland.
+// So temporarily block the code until find root cause.
 #if !defined(USE_WAYLAND)
   ecore_imf_context_input_panel_enabled_set(context, false);
 #endif
   ecore_imf_context_use_preedit_set(context, false);
 
-  ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, &IMFPreeditChangedCallback, this);
-  ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_COMMIT, &IMFCommitCallback, this);
-  ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, &IMFInputPanelStateChangedCallback, this);
-  ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, &IMFInputPanelGeometryChangedCallback, this);
-  ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, &IMFCandidatePanelStateChangedCallback, this);
-  ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT, &IMFCandidatePanelGeometryChangedCallback, this);
-  ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, &IMFCandidatePanelLanguageChangedCallback, this);
-  ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, &IMFDeleteSurroundingCallback, this);
-  ecore_imf_context_retrieve_surrounding_callback_set(context, &IMFRetrieveSurroundingCallback, this);
+  ecore_imf_context_event_callback_add(context,
+                                       ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
+                                       &IMFPreeditChangedCallback, this);
+  ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_COMMIT,
+                                       &IMFCommitCallback, this);
+  ecore_imf_context_input_panel_event_callback_add(
+      context, ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+      &IMFInputPanelStateChangedCallback, this);
+  ecore_imf_context_input_panel_event_callback_add(
+      context, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT,
+      &IMFInputPanelGeometryChangedCallback, this);
+  ecore_imf_context_input_panel_event_callback_add(
+      context, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT,
+      &IMFCandidatePanelStateChangedCallback, this);
+  ecore_imf_context_input_panel_event_callback_add(
+      context, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT,
+      &IMFCandidatePanelGeometryChangedCallback, this);
+  ecore_imf_context_input_panel_event_callback_add(
+      context, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT,
+      &IMFCandidatePanelLanguageChangedCallback, this);
+  ecore_imf_context_event_callback_add(context,
+                                       ECORE_IMF_CALLBACK_DELETE_SURROUNDING,
+                                       &IMFDeleteSurroundingCallback, this);
+  ecore_imf_context_retrieve_surrounding_callback_set(
+      context, &IMFRetrieveSurroundingCallback, this);
 }
 
 IMContextEfl::~IMContextEfl() {
@@ -106,13 +123,16 @@ IMContextEfl::~IMContextEfl() {
 }
 
 void IMContextEfl::HandleKeyDownEvent(const Evas_Event_Key_Down* event,
-    bool* wasFiltered, std::string* utf8_key) {
+                                      bool* wasFiltered,
+                                      std::string* utf8_key) {
 #if USE_IM_COMPOSITING
   Ecore_IMF_Event im_event;
   is_handling_keydown_ = true;
   utf8_key_ = event->keyname;
-  ecore_imf_evas_event_key_down_wrap(const_cast<Evas_Event_Key_Down*>(event), &im_event.key_down);
-  *wasFiltered = ecore_imf_context_filter_event(context_, ECORE_IMF_EVENT_KEY_DOWN, &im_event);
+  ecore_imf_evas_event_key_down_wrap(const_cast<Evas_Event_Key_Down*>(event),
+                                     &im_event.key_down);
+  *wasFiltered = ecore_imf_context_filter_event(
+      context_, ECORE_IMF_EVENT_KEY_DOWN, &im_event);
   // In November 2003, UTF-8 was restricted by RFC 3629 to end at U+10FFFF,
   // in order to match the constraints of the UTF-16 character encoding.
   // This removed all 5- and 6-byte sequences, and about half of the 4-byte
@@ -122,11 +142,14 @@ void IMContextEfl::HandleKeyDownEvent(const Evas_Event_Key_Down* event,
 #endif
 }
 
-void IMContextEfl::HandleKeyUpEvent(const Evas_Event_Key_Up* event, bool* wasFiltered) {
+void IMContextEfl::HandleKeyUpEvent(const Evas_Event_Key_Up* event,
+                                    bool* wasFiltered) {
 #if USE_IM_COMPOSITING
   Ecore_IMF_Event im_event;
-  ecore_imf_evas_event_key_up_wrap(const_cast<Evas_Event_Key_Up*>(event), &im_event.key_up);
-  *wasFiltered = ecore_imf_context_filter_event(context_, ECORE_IMF_EVENT_KEY_UP, &im_event);
+  ecore_imf_evas_event_key_up_wrap(const_cast<Evas_Event_Key_Up*>(event),
+                                   &im_event.key_up);
+  *wasFiltered = ecore_imf_context_filter_event(
+      context_, ECORE_IMF_EVENT_KEY_UP, &im_event);
 #endif
 }
 
@@ -141,7 +164,8 @@ void IMContextEfl::UpdateInputMethodType(ui::TextInputType type,
   }
 
   Ecore_IMF_Input_Panel_Layout layout;
-  Ecore_IMF_Input_Panel_Return_Key_Type return_key_type = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+  Ecore_IMF_Input_Panel_Return_Key_Type return_key_type =
+      ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
   Ecore_IMF_Autocapital_Type cap_type = ECORE_IMF_AUTOCAPITAL_TYPE_NONE;
   bool allow_prediction = true;
 
@@ -231,13 +255,14 @@ void IMContextEfl::UpdateInputMethodState(ui::TextInputType type,
                                           bool can_compose_inline,
                                           bool show_if_needed) {
   if (current_type_ != type || can_compose_inline_ != can_compose_inline) {
-    UpdateInputMethodType(type, ui::TEXT_INPUT_MODE_DEFAULT, can_compose_inline);
+    UpdateInputMethodType(type, ui::TEXT_INPUT_MODE_DEFAULT,
+                          can_compose_inline);
     // Workaround on platform issue:
     // http://107.108.218.239/bugzilla/show_bug.cgi?id=11494
     // Keyboard layout doesn't update after change.
     if (IsIMFVisible(context_) && type != ui::TEXT_INPUT_TYPE_NONE) {
-        HidePanel();
-        ShowPanel();
+      HidePanel();
+      ShowPanel();
     }
   }
 
@@ -246,12 +271,12 @@ void IMContextEfl::UpdateInputMethodState(ui::TextInputType type,
   bool show = type != ui::TEXT_INPUT_TYPE_NONE;
   if (show && !IsIMFVisible(context_) && show_if_needed) {
     ShowPanel();
-  // TODO(youngsoo): workaround on tizen v3.0 platform issue
-  // Even if virtual keyboard is shown,
-  // the API 'ecore_imf_context_input_panel_state_get()'
-  // returns '1' which means the keyboard is not shown.
-  // It makes the 'HidePanel()' unreachable.
-#if TIZEN_VERSION_EQ(3,0,0)
+// TODO(youngsoo): workaround on tizen v3.0 platform issue
+// Even if virtual keyboard is shown,
+// the API 'ecore_imf_context_input_panel_state_get()'
+// returns '1' which means the keyboard is not shown.
+// It makes the 'HidePanel()' unreachable.
+#if TIZEN_VERSION_EQ(3, 0, 0)
   } else if (!show) {
 #else
   } else if (!show && IsIMFVisible(context_)) {
@@ -320,7 +345,7 @@ void IMContextEfl::CancelComposition() {
   if (composition_.text.length() > 0) {
     base::string16 empty;
     view_->ConfirmComposition(empty);
-    composition_.Clear();
+    composition_.text = base::UTF8ToUTF16("");
   }
 }
 
@@ -339,16 +364,16 @@ void IMContextEfl::SetIsInFormTag(bool is_in_form_tag) {
     return;
 
   if (is_in_form_tag_)
-    ecore_imf_context_input_panel_return_key_type_set(context_,
-    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO);
+    ecore_imf_context_input_panel_return_key_type_set(
+        context_, ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO);
   else {
     if (current_type_ == ui::TEXT_INPUT_TYPE_TEXT ||
         current_type_ == ui::TEXT_INPUT_TYPE_NUMBER)
-      ecore_imf_context_input_panel_return_key_type_set(context_,
-      ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
+      ecore_imf_context_input_panel_return_key_type_set(
+          context_, ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
     else
-      ecore_imf_context_input_panel_return_key_type_set(context_,
-      ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT);
+      ecore_imf_context_input_panel_return_key_type_set(
+          context_, ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT);
   }
 }
 
@@ -359,7 +384,7 @@ void IMContextEfl::OnCommit(void* event_info) {
 
 #if USE_IM_COMPOSITING
   IM_CTX_LOG;
-  composition_.Clear();
+  composition_.text = base::UTF8ToUTF16("");
 
   char* text = static_cast<char*>(event_info);
 
@@ -382,7 +407,7 @@ void IMContextEfl::SendFakeCompositionKeyEvent(const base::string16& buf) {
   if (!buf.length())
     return;
 
-  std::string str = base::UTF16ToUTF8(buf.substr(buf.length() -1));
+  std::string str = base::UTF16ToUTF8(buf.substr(buf.length() - 1));
 
   Evas_Event_Key_Down downEvent;
   memset(&downEvent, 0, sizeof(Evas_Event_Key_Down));
@@ -390,22 +415,23 @@ void IMContextEfl::SendFakeCompositionKeyEvent(const base::string16& buf) {
   downEvent.string = str.c_str();
 
   NativeWebKeyboardEvent n_event = MakeWebKeyboardEvent(true, &downEvent);
-  n_event.isSystemKey = true;
+  n_event.is_system_key = true;
 
   if (!view_->GetRenderWidgetHost())
     return;
 
-  PushToKeyUpEventQueue(n_event.windowsKeyCode);
+  PushToKeyUpEventQueue(n_event.windows_key_code);
   view_->GetRenderWidgetHost()->ForwardKeyboardEvent(n_event);
 }
 
-void IMContextEfl::OnPreeditChanged(void* data, Ecore_IMF_Context* context, void* event_info) {
+void IMContextEfl::OnPreeditChanged(void* data,
+                                    Ecore_IMF_Context* context,
+                                    void* event_info) {
   if (is_ime_ctx_reset_)
     return;
 
 #if USE_IM_COMPOSITING
-  composition_.Clear();
-
+  composition_.text = base::UTF8ToUTF16("");
   char* buffer = 0;
 
   ecore_imf_context_preedit_string_get(context, &buffer, 0);
@@ -422,13 +448,16 @@ void IMContextEfl::OnPreeditChanged(void* data, Ecore_IMF_Context* context, void
   // Add empty commit to stop processing commits.
   commit_queue_.push(base::string16());
 
+  composition_.text = base::UTF8ToUTF16("");
   base::string16 text16 = base::UTF8ToUTF16(buffer);
   if (!text16.empty())
     SendFakeCompositionKeyEvent(text16);
-  composition_.Clear();
   composition_.text = text16;
 
-  composition_.underlines.push_back(ui::CompositionUnderline(0, composition_.text.length(), SK_ColorBLACK, false));
+  ui::ImeTextSpan text_underline(ui::ImeTextSpan::Type::kComposition, 0,
+                                 composition_.text.length(), SK_ColorBLACK,
+                                 false, SK_ColorTRANSPARENT);
+  composition_.ime_text_spans.push_back(text_underline);
   composition_.selection = gfx::Range(composition_.text.length());
 
   // Only add preedit to queue, till we dont know if key event
@@ -452,13 +481,13 @@ void IMContextEfl::OnInputPanelStateChanged(int state) {
     IM_CTX_LOG << ": show";
     if (view_->smart_parent())
       evas_object_smart_callback_call(view_->smart_parent(),
-          "editorclient,ime,opened", 0);
+                                      "editorclient,ime,opened", 0);
     view_->ScrollFocusedEditableNode();
   } else if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
     IM_CTX_LOG << ": hide";
     if (view_->smart_parent())
       evas_object_smart_callback_call(view_->smart_parent(),
-          "editorclient,ime,closed", 0);
+                                      "editorclient,ime,closed", 0);
   }
 
   // ignore ECORE_IMF_INPUT_PANEL_WILL_SHOW value
@@ -466,10 +495,12 @@ void IMContextEfl::OnInputPanelStateChanged(int state) {
 
 void IMContextEfl::OnInputPanelGeometryChanged() {
   Eina_Rectangle rect;
-  ecore_imf_context_input_panel_geometry_get(context_, &rect.x, &rect.y, &rect.w, &rect.h);
+  ecore_imf_context_input_panel_geometry_get(context_, &rect.x, &rect.y,
+                                             &rect.w, &rect.h);
   if (view_->smart_parent())
     evas_object_smart_callback_call(view_->smart_parent(),
-        "inputmethod,changed", static_cast<void*>(&rect));
+                                    "inputmethod,changed",
+                                    static_cast<void*>(&rect));
   // Scroll to focused editable node if virtual keyboard
   // changed geometry
   if (rect.w > 0 || rect.h > 0)
@@ -481,27 +512,25 @@ void IMContextEfl::OnCandidateInputPanelStateChanged(int state) {
   if (state == ECORE_IMF_CANDIDATE_PANEL_SHOW) {
     if (view_->smart_parent())
       evas_object_smart_callback_call(view_->smart_parent(),
-          "editorclient,candidate,opened", 0);
-  }
-  else {
+                                      "editorclient,candidate,opened", 0);
+  } else {
     if (view_->smart_parent())
       evas_object_smart_callback_call(view_->smart_parent(),
-          "editorclient,candidate,closed", 0);
+                                      "editorclient,candidate,closed", 0);
   }
 }
 
-void IMContextEfl::OnCandidateInputPanelGeometryChanged() {
-}
+void IMContextEfl::OnCandidateInputPanelGeometryChanged() {}
 
 bool IMContextEfl::OnRetrieveSurrounding(char** text, int* offset) {
   return false;
 }
 
-void IMContextEfl::OnDeleteSurrounding(void* event_info) {
-}
+void IMContextEfl::OnDeleteSurrounding(void* event_info) {}
 
-void IMContextEfl::OnCandidateInputPanelLanguageChanged(Ecore_IMF_Context*, int) {
-  RenderWidgetHostImpl *rwhi = GetRenderWidgetHostImpl();
+void IMContextEfl::OnCandidateInputPanelLanguageChanged(Ecore_IMF_Context*,
+                                                        int) {
+  RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
 
   if (!rwhi || composition_.text.length() == 0)
     return;
@@ -524,58 +553,68 @@ void IMContextEfl::ClearQueues() {
   keydown_event_queue_ = KeyDownEventQueue();
 }
 
-void IMContextEfl::IMFCommitCallback(
-    void* data, Ecore_IMF_Context*, void* event_info) {
+void IMContextEfl::IMFCommitCallback(void* data,
+                                     Ecore_IMF_Context*,
+                                     void* event_info) {
   static_cast<IMContextEfl*>(data)->OnCommit(event_info);
 }
 
-void IMContextEfl::IMFPreeditChangedCallback(
-    void* data, Ecore_IMF_Context* context, void* event_info) {
-  static_cast<IMContextEfl*>(data)->
-      OnPreeditChanged(data, context, event_info);
+void IMContextEfl::IMFPreeditChangedCallback(void* data,
+                                             Ecore_IMF_Context* context,
+                                             void* event_info) {
+  static_cast<IMContextEfl*>(data)->OnPreeditChanged(data, context, event_info);
 }
 
-void IMContextEfl::IMFInputPanelStateChangedCallback(
-    void* data, Ecore_IMF_Context*, int state) {
+void IMContextEfl::IMFInputPanelStateChangedCallback(void* data,
+                                                     Ecore_IMF_Context*,
+                                                     int state) {
   static_cast<IMContextEfl*>(data)->OnInputPanelStateChanged(state);
 }
 
-void IMContextEfl::IMFInputPanelGeometryChangedCallback(
-    void* data, Ecore_IMF_Context*, int state) {
+void IMContextEfl::IMFInputPanelGeometryChangedCallback(void* data,
+                                                        Ecore_IMF_Context*,
+                                                        int state) {
   static_cast<IMContextEfl*>(data)->OnInputPanelGeometryChanged();
 }
 
-void IMContextEfl::IMFCandidatePanelStateChangedCallback(
-    void* data, Ecore_IMF_Context*, int state) {
+void IMContextEfl::IMFCandidatePanelStateChangedCallback(void* data,
+                                                         Ecore_IMF_Context*,
+                                                         int state) {
   static_cast<IMContextEfl*>(data)->OnCandidateInputPanelStateChanged(state);
 }
 
-void IMContextEfl::IMFCandidatePanelGeometryChangedCallback(
-    void* data, Ecore_IMF_Context*, int state) {
+void IMContextEfl::IMFCandidatePanelGeometryChangedCallback(void* data,
+                                                            Ecore_IMF_Context*,
+                                                            int state) {
   static_cast<IMContextEfl*>(data)->OnCandidateInputPanelGeometryChanged();
 }
 
-Eina_Bool IMContextEfl::IMFRetrieveSurroundingCallback(
-    void* data, Ecore_IMF_Context*, char** text, int* offset) {
+Eina_Bool IMContextEfl::IMFRetrieveSurroundingCallback(void* data,
+                                                       Ecore_IMF_Context*,
+                                                       char** text,
+                                                       int* offset) {
   return static_cast<IMContextEfl*>(data)->OnRetrieveSurrounding(text, offset);
 }
 
-void IMContextEfl::IMFDeleteSurroundingCallback(
-    void* data, Ecore_IMF_Context*, void* event_info) {
+void IMContextEfl::IMFDeleteSurroundingCallback(void* data,
+                                                Ecore_IMF_Context*,
+                                                void* event_info) {
   static_cast<IMContextEfl*>(data)->OnDeleteSurrounding(event_info);
 }
 
 void IMContextEfl::IMFCandidatePanelLanguageChangedCallback(
-    void* data, Ecore_IMF_Context* context, int value) {
-  static_cast<IMContextEfl*>(data)->
-      OnCandidateInputPanelLanguageChanged(context, value);
+    void* data,
+    Ecore_IMF_Context* context,
+    int value) {
+  static_cast<IMContextEfl*>(data)->OnCandidateInputPanelLanguageChanged(
+      context, value);
 }
 
 void IMContextEfl::HandleKeyEvent(bool processed) {
-    ProcessNextCommitText(processed);
-    ProcessNextPreeditText(processed);
-    ProcessNextKeyDownEvent();
-    ProcessNextKeyUpEvent();
+  ProcessNextCommitText(processed);
+  ProcessNextPreeditText(processed);
+  ProcessNextKeyDownEvent();
+  ProcessNextKeyUpEvent();
 }
 
 void IMContextEfl::ProcessNextCommitText(bool processed) {
@@ -603,8 +642,7 @@ void IMContextEfl::ProcessNextKeyDownEvent() {
   if (keydown_event_queue_.empty())
     return;
 
-  GetRenderWidgetHostImpl()
-      ->ForwardKeyboardEvent(keydown_event_queue_.front());
+  GetRenderWidgetHostImpl()->ForwardKeyboardEvent(keydown_event_queue_.front());
   keydown_event_queue_.pop();
 }
 
@@ -616,13 +654,16 @@ void IMContextEfl::ProcessNextKeyUpEvent() {
   keyup_event_queue_.pop();
 }
 
-void IMContextEfl::SendCompositionKeyUpEvent(char c) {
-  NativeWebKeyboardEvent event;
-  event.windowsKeyCode = c;
-  event.skip_in_browser = false;
-  event.type = blink::WebInputEvent::KeyUp;
+// #if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// TODO: Changes made for M63 bring-up. Check its working.
+void IMContextEfl::SendCompositionKeyUpEvent(int code) {
+  blink::WebKeyboardEvent keyboard_event(
+      blink::WebInputEvent::kKeyUp, blink::WebInputEvent::kNoModifiers, 0.0);
+  keyboard_event.windows_key_code = code;
 
-  GetRenderWidgetHostImpl()->ForwardKeyboardEvent(event);
+  gfx::NativeView native_view;
+  GetRenderWidgetHostImpl()->ForwardKeyboardEvent(
+      NativeWebKeyboardEvent(keyboard_event, native_view));
 }
 
 void IMContextEfl::PushToKeyUpEventQueue(int key) {
@@ -639,4 +680,4 @@ RenderWidgetHostImpl* IMContextEfl::GetRenderWidgetHostImpl() const {
     return NULL;
   return RenderWidgetHostImpl::From(rwh);
 }
-} // namespace content
+}  // namespace content
old mode 100755 (executable)
new mode 100644 (file)
index 0e6e319..dc9beb6
@@ -7,8 +7,8 @@
 
 #include <Evas.h>
 
-#include "content/public/browser/native_web_keyboard_event.h"
 #include "content/browser/renderer_host/web_event_factory_efl.h"
+#include "content/public/browser/native_web_keyboard_event.h"
 #include "ui/base/ime/composition_text.h"
 #include "ui/gfx/geometry/rect.h"
 
@@ -25,13 +25,16 @@ class IMContextEfl {
 
   ~IMContextEfl();
 
-  void HandleKeyDownEvent(const Evas_Event_Key_Down* event, bool* wasFiltered,
-      std::string* utf8_key);
+  void HandleKeyDownEvent(const Evas_Event_Key_Down* event,
+                          bool* wasFiltered,
+                          std::string* utf8_key);
   void HandleKeyUpEvent(const Evas_Event_Key_Up* event, bool* wasFiltered);
 
-  void UpdateInputMethodType(ui::TextInputType, ui::TextInputMode,
+  void UpdateInputMethodType(ui::TextInputType,
+                             ui::TextInputMode,
                              bool can_compose_inline);
-  void UpdateInputMethodState(ui::TextInputType, bool can_compose_inline,
+  void UpdateInputMethodState(ui::TextInputType,
+                              bool can_compose_inline,
                               bool show_if_needed);
   void UpdateCaretBounds(const gfx::Rect& caret_bounds);
 
@@ -66,19 +69,41 @@ class IMContextEfl {
   void InitializeIMFContext(Ecore_IMF_Context*);
 
   // callbacks
-  static void IMFCommitCallback(void* data, Ecore_IMF_Context*, void* event_info);
-  static void IMFPreeditChangedCallback(void* data, Ecore_IMF_Context* context, void* event_info);
-  static void IMFInputPanelStateChangedCallback(void* data, Ecore_IMF_Context*, int state);
-  static void IMFInputPanelGeometryChangedCallback(void* data, Ecore_IMF_Context*, int state);
-  static void IMFCandidatePanelStateChangedCallback(void* data, Ecore_IMF_Context*, int state);
-  static void IMFCandidatePanelGeometryChangedCallback(void* data, Ecore_IMF_Context*, int state);
-  static Eina_Bool IMFRetrieveSurroundingCallback(void* data, Ecore_IMF_Context*, char** text, int* offset);
-  static void IMFDeleteSurroundingCallback(void* data, Ecore_IMF_Context*, void* event_info);
-  static void IMFCandidatePanelLanguageChangedCallback(void* data, Ecore_IMF_Context* context, int value);
+  static void IMFCommitCallback(void* data,
+                                Ecore_IMF_Context*,
+                                void* event_info);
+  static void IMFPreeditChangedCallback(void* data,
+                                        Ecore_IMF_Context* context,
+                                        void* event_info);
+  static void IMFInputPanelStateChangedCallback(void* data,
+                                                Ecore_IMF_Context*,
+                                                int state);
+  static void IMFInputPanelGeometryChangedCallback(void* data,
+                                                   Ecore_IMF_Context*,
+                                                   int state);
+  static void IMFCandidatePanelStateChangedCallback(void* data,
+                                                    Ecore_IMF_Context*,
+                                                    int state);
+  static void IMFCandidatePanelGeometryChangedCallback(void* data,
+                                                       Ecore_IMF_Context*,
+                                                       int state);
+  static Eina_Bool IMFRetrieveSurroundingCallback(void* data,
+                                                  Ecore_IMF_Context*,
+                                                  char** text,
+                                                  int* offset);
+  static void IMFDeleteSurroundingCallback(void* data,
+                                           Ecore_IMF_Context*,
+                                           void* event_info);
+  static void IMFCandidatePanelLanguageChangedCallback(
+      void* data,
+      Ecore_IMF_Context* context,
+      int value);
 
   // callback handlers
   void OnCommit(void* event_info);
-  void OnPreeditChanged(void* data, Ecore_IMF_Context* context, void* event_info);
+  void OnPreeditChanged(void* data,
+                        Ecore_IMF_Context* context,
+                        void* event_info);
 
   void OnInputPanelStateChanged(int state);
   void OnInputPanelGeometryChanged();
@@ -88,13 +113,14 @@ class IMContextEfl {
 
   bool OnRetrieveSurrounding(char** text, int* offset);
   void OnDeleteSurrounding(void* event_info);
-  void OnCandidateInputPanelLanguageChanged(Ecore_IMF_Context* context, int value);
+  void OnCandidateInputPanelLanguageChanged(Ecore_IMF_Context* context,
+                                            int value);
 
   void ProcessNextCommitText(bool processed);
   void ProcessNextPreeditText(bool processed);
   void ProcessNextKeyDownEvent();
   void ProcessNextKeyUpEvent();
-  void SendCompositionKeyUpEvent(char c);
+  void SendCompositionKeyUpEvent(int code);
 
   RenderWidgetHostImpl* GetRenderWidgetHostImpl() const;
 
@@ -132,6 +158,6 @@ class IMContextEfl {
   std::string utf8_key_;
 };
 
-} // namespace content
+}  // namespace content
 
 #endif
index 9680461f8a8faeb1e63a3e76195ee21a6b18a800..a57368c031edc0acfd2c1f0c5d43a6471d366e6c 100644 (file)
@@ -5,7 +5,10 @@
 
 #include "content/public/browser/native_web_keyboard_event.h"
 
+#include "ui/events/base_event_utils.h"
+#include "ui/events/blink/web_input_event.h"
 #include "ui/events/event.h"
+#include "ui/events/keycodes/dom/keycode_converter.h"
 
 namespace content {
 
@@ -13,28 +16,50 @@ ui::Event* CopyEvent(ui::Event* event) {
   return event ? ui::Event::Clone(*event).release() : nullptr;
 }
 
-NativeWebKeyboardEvent::NativeWebKeyboardEvent()
-    : os_event(NULL),
-      skip_in_browser(false) {
-}
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(blink::WebInputEvent::Type type,
+                                               int modifiers,
+                                               base::TimeTicks timestamp)
+    : NativeWebKeyboardEvent(type,
+                             modifiers,
+                             ui::EventTimeStampToSeconds(timestamp)) {}
 
-NativeWebKeyboardEvent::NativeWebKeyboardEvent(const NativeWebKeyboardEvent& other)
-    : WebKeyboardEvent(other)
-    , os_event(CopyEvent(other.os_event))
-    , skip_in_browser(other.skip_in_browser) {
-}
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(blink::WebInputEvent::Type type,
+                                               int modifiers,
+                                               double timestampSeconds)
+    : WebKeyboardEvent(type, modifiers, timestampSeconds),
+      os_event(nullptr),
+      skip_in_browser(false) {}
 
-NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
-  delete os_event;
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(
+    const blink::WebKeyboardEvent& web_event,
+    gfx::NativeView native_view)
+    : WebKeyboardEvent(web_event), os_event(nullptr), skip_in_browser(false) {}
+
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event)
+    : NativeWebKeyboardEvent(static_cast<ui::KeyEvent&>(*native_event)) {}
+
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(const ui::KeyEvent& key_event)
+    : WebKeyboardEvent(ui::MakeWebKeyboardEvent(key_event)),
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      os_event(CopyEvent(&key_event)),
+#else
+      os_event(nullptr),
+#endif
+      skip_in_browser(false) {
 }
 
 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
-  const NativeWebKeyboardEvent& other) {
+    const NativeWebKeyboardEvent& other) {
   WebKeyboardEvent::operator=(other);
   delete os_event;
   os_event = CopyEvent(other.os_event);
   skip_in_browser = other.skip_in_browser;
+
   return *this;
 }
 
+NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
+  delete os_event;
 }
+
+}  // namespace content
index d7205b67fd33c5a87c3a875aa840622b6049df08..b7f570b7d395166f8bd5eddd865e706e7382e055 100644 (file)
@@ -8,72 +8,73 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_Input.h>
-#include "ecore_x_wayland_wrapper.h"
 #include <Elementary.h>
+#include "ecore_x_wayland_wrapper.h"
 
 #include "base/auto_reset.h"
 #include "base/bind.h"
-#include "base/command_line.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
-#include "base/trace_event/trace_event.h"
+#include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_number_conversions.h"
-#include "base/threading/thread_task_runner_handle.h"
-#include "base/logging.h"
 #include "base/strings/utf_string_conversions.h"
-#include "components/display_compositor/gl_helper.h"
+#include "base/threading/thread_task_runner_handle.h"
+#include "base/trace_event/trace_event.h"
 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
 #include "content/browser/gpu/compositor_util.h"
-#include "content/browser/renderer_host/render_widget_host_impl.h"
-#include "content/browser/renderer_host/resize_lock.h"
-#include "content/browser/renderer_host/ui_events_helper.h"
-#include "content/browser/renderer_host/im_context_efl.h"
+#include "content/browser/gpu/gpu_process_host.h"
+#include "content/browser/renderer_host/compositor_resize_lock.h"
+#include "content/browser/renderer_host/disambiguation_popup_efl.h"
 #include "content/browser/renderer_host/edge_effect.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
-#include "content/browser/renderer_host/disambiguation_popup_efl.h"
-#include "content/browser/renderer_host/web_event_factory_efl.h"
-#include "content/browser/renderer_host/input/web_input_event_util.h"
+#include "content/browser/renderer_host/im_context_efl.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
-#include "content/browser/gpu/gpu_process_host.h"
-#include "content/common/input/did_overscroll_params.h"
-#include "content/common/input_messages.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/browser/renderer_host/ui_events_helper.h"
+#include "content/browser/renderer_host/web_event_factory_efl.h"
 #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/render_widget_host_view_frame_subscriber.h"
-#include "content/public/browser/screen_orientation_dispatcher_host.h"
-#include "content/public/browser/web_contents_delegate.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/context_factory.h"
 #include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents_delegate.h"
 #include "content/public/common/content_switches.h"
 #include "gpu/command_buffer/service/mailbox_manager.h"
 #include "gpu/ipc/common/gpu_messages.h"
 #include "media/base/video_frame.h"
 #include "media/base/video_util.h"
 #include "skia/ext/image_operations.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
-#include "third_party/WebKit/public/platform/WebScreenInfo.h"
-#include "third_party/WebKit/public/web/WebTouchPoint.h"
+#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/platform/WebScreenInfo.h"
+#include "third_party/blink/public/platform/WebTouchPoint.h"
 #include "ui/base/clipboard/clipboard_helper_efl.h"
 #include "ui/base/layout.h"
 #include "ui/events/blink/blink_event_util.h"
+#include "ui/events/blink/did_overscroll_params.h"
 #include "ui/events/event_switches.h"
 #include "ui/events/event_utils.h"
 #define private public
 #include "ui/events/gestures/gesture_provider_aura.h"
 #undef private
-#include "ui/events/gestures/gesture_recognizer_impl_efl.h"
 #include "ui/compositor/compositor.h"
+#include "ui/display/device_display_info_efl.h"
 #include "ui/display/display.h"
 #include "ui/display/screen.h"
-#include "ui/display/device_display_info_efl.h"
+#include "ui/events/gestures/gesture_recognizer_impl_efl.h"
 #include "ui/gfx/geometry/dip_util.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/selection_bound.h"
 #include "ui/gl/gl_shared_context_efl.h"
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+#include "components/display_compositor/gl_helper.h"
+#include "content/browser/renderer_host/resize_lock.h"
+#endif
+
 #if defined(OS_TIZEN_MOBILE)
 #include <efl_extension.h>
 #endif
@@ -81,8 +82,8 @@
 #define EFL_MAX_WIDTH 10000
 #define EFL_MAX_HEIGHT 10000  // borrowed from GTK+ port
 
-#define MAX_SURFACE_WIDTH_EGL 4096 //max supported Framebuffer width
-#define MAX_SURFACE_HEIGHT_EGL 4096 //max supported Framebuffer height
+#define MAX_SURFACE_WIDTH_EGL 4096   // max supported Framebuffer width
+#define MAX_SURFACE_HEIGHT_EGL 4096  // max supported Framebuffer height
 
 // These two constants are redefinitions of the original constants defined
 // in evas_common.c. These are not supposed to be used directly by apps,
@@ -94,7 +95,7 @@ namespace content {
 
 namespace {
 
-bool IsShiftKey(const char * key) {
+bool IsShiftKey(const char* key) {
   if (!key)
     return false;
   return !strcmp(key, "Shift_L") || !strcmp(key, "Shift_R");
@@ -110,12 +111,12 @@ blink::WebGestureEvent MakeWebGestureEventFromUIEvent(
       event.root_location_f(), event.flags(), event.unique_touch_event_id());
 }
 
-} // namespace
+}  // namespace
 
 class ScreenshotCapturedCallback {
  public:
-      ScreenshotCapturedCallback(Screenshot_Captured_Callback func, void *user_data)
-          : func_(func), user_data_(user_data) {}
+  ScreenshotCapturedCallback(Screenshot_Captured_Callback func, void* user_data)
+      : func_(func), user_data_(user_data) {}
   void Run(Evas_Object* image) {
     if (func_ != NULL)
       (func_)(image, user_data_);
@@ -123,12 +124,17 @@ class ScreenshotCapturedCallback {
 
  private:
   Screenshot_Captured_Callback func_;
-  void *user_data_;
+  voiduser_data_;
 };
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
+// GetDefaultScreenInfo was removed in
+// content/browser/renderer_host/render_widget_host_view_base.h
 void RenderWidgetHostViewBase::GetDefaultScreenInfo(
     blink::WebScreenInfo* results) {
-  const display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay();
+  const display::Display display =
+      display::Screen::GetScreen()->GetPrimaryDisplay();
 
   results->rect = display.bounds();
   results->availableRect = display.work_area();
@@ -136,60 +142,69 @@ void RenderWidgetHostViewBase::GetDefaultScreenInfo(
   results->orientationAngle = display.RotationAsDegree();
 #if defined(OS_TIZEN_MOBILE)
   results->orientationType =
-      RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
+// RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
 #else
   results->orientationType =
-      RenderWidgetHostViewBase::GetOrientationTypeForDesktop(display);
+// RenderWidgetHostViewBase::GetOrientationTypeForDesktop(display);
 #endif
 
-  // TODO(derat|oshima): Don't hardcode this. Get this from display object.
-  results->depth = 24;
+      // TODO(derat|oshima): Don't hardcode this. Get this from display object.
+      results->depth = 24;
   results->depthPerComponent = 8;
 }
+#endif  // !defined(EWK_BRINGUP)
 
 RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget,
-    WebContents& web_contents)
-  : host_(RenderWidgetHostImpl::From(widget)),
-    im_context_(NULL),
-    evas_(NULL),
-    parent_view_(NULL),
-    smart_parent_(NULL),
-    content_image_(NULL),
-    content_image_elm_host_(NULL),
-    evas_gl_initialized_(false),
-    device_scale_factor_(1.0f),
-    magnifier_(false),
-    is_loading_(false),
-    gesture_recognizer_(ui::GestureRecognizer::Create()),
-    current_orientation_(0),
-    evas_gl_(NULL),
-    evas_gl_api_(NULL),
-    evas_gl_context_(NULL),
-    evas_gl_surface_(NULL),
-    evas_gl_config_(NULL),
-    egl_image_(NULL),
-    current_pixmap_id_(0),
-    next_pixmap_id_(0),
-    texture_id_(0),
-    surface_id_(0),
-    is_modifier_key_(false),
-    touch_events_enabled_(false),
-    handling_disambiguation_popup_gesture_(false),
-    web_contents_(web_contents),
-    compositor_(NULL),
-    root_layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)),
-    delegated_frame_host_(new DelegatedFrameHost(this)),
-    weak_factory_(this) {
+                                                 WebContents& web_contents)
+    : host_(RenderWidgetHostImpl::From(widget)),
+      im_context_(NULL),
+      evas_(NULL),
+      parent_view_(NULL),
+      smart_parent_(NULL),
+      content_image_(NULL),
+      content_image_elm_host_(NULL),
+      evas_gl_initialized_(false),
+      device_scale_factor_(1.0f),
+      magnifier_(false),
+      is_loading_(false),
+      gesture_recognizer_(ui::GestureRecognizer::Create()),
+      current_orientation_(0),
+      evas_gl_(NULL),
+      evas_gl_api_(NULL),
+      evas_gl_context_(NULL),
+      evas_gl_surface_(NULL),
+      evas_gl_config_(NULL),
+      egl_image_(NULL),
+      current_pixmap_id_(0),
+      next_pixmap_id_(0),
+      texture_id_(0),
+      surface_id_(0),
+      is_modifier_key_(false),
+      touch_events_enabled_(false),
+      handling_disambiguation_popup_gesture_(false),
+      web_contents_(web_contents),
+      compositor_(NULL),
+      root_layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)),
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      // FIXME: EWK_BRINGUP definition should be removed.
+      // DelegatedFrameHost was changed. we need to fix it.
+      delegated_frame_host_(new DelegatedFrameHost(this)),
+#endif  // !defined(EWK_BRINGUP)
+      weak_factory_(this) {
   EnsureDeviceDisplayInfoInitialized();
 
   SetDoubleTapSupportEnabled(touch_events_enabled_);
 
-  device_scale_factor_ = display::Screen::GetScreen()->
-      GetPrimaryDisplay().device_scale_factor();
+  device_scale_factor_ =
+      display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
 
   host_->SetView(this);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it.
   set_layer_owner_delegate(delegated_frame_host_.get());
+#endif  // !defined(EWK_BRINGUP)
 
   static bool scale_factor_initialized = false;
   if (!scale_factor_initialized) {
@@ -209,12 +224,13 @@ void RenderWidgetHostViewEfl::InitAsChild(gfx::NativeView parent_view) {
   evas_ = evas_object_evas_get(parent_view_);
 
   // Update rotation degrees in device display info.
-  UpdateRotationDegrees(ecore_evas_rotation_get(ecore_evas_ecore_evas_get(evas_)));
+  UpdateRotationDegrees(
+      ecore_evas_rotation_get(ecore_evas_ecore_evas_get(evas_)));
 
   content_image_elm_host_ = elm_bg_add(parent_view_);
   content_image_ = evas_object_image_filled_add(evas_);
-  elm_object_part_content_set(content_image_elm_host_,
-                              "overlay", content_image_);
+  elm_object_part_content_set(content_image_elm_host_, "overlay",
+                              content_image_);
   elm_object_focus_allow_set(content_image_elm_host_, EINA_TRUE);
 
   Evas_Object* smart_parent = evas_object_smart_parent_get(parent_view_);
@@ -233,39 +249,39 @@ void RenderWidgetHostViewEfl::InitAsChild(gfx::NativeView parent_view) {
   evas_object_geometry_set(content_image_elm_host_, x, y, width, height);
 
   evas_object_event_callback_add(parent_view_, EVAS_CALLBACK_RESIZE,
-      OnParentViewResize, this);
+                                 OnParentViewResize, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_FOCUS_IN,
-      OnFocusIn, this);
+                                 OnFocusIn, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_FOCUS_OUT,
-      OnFocusOut, this);
-  evas_object_smart_callback_add(content_image_elm_host_,
-      "focused", OnHostFocusIn, this);
-  evas_object_smart_callback_add(content_image_elm_host_,
-      "unfocused", OnHostFocusOut, this);
+                                 OnFocusOut, this);
+  evas_object_smart_callback_add(content_image_elm_host_, "focused",
+                                 OnHostFocusIn, this);
+  evas_object_smart_callback_add(content_image_elm_host_, "unfocused",
+                                 OnHostFocusOut, this);
 
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MOUSE_DOWN,
-      OnMouseDown, this);
+                                 OnMouseDown, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MOUSE_UP,
-      OnMouseUp, this);
+                                 OnMouseUp, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MOUSE_MOVE,
-      OnMouseMove, this);
+                                 OnMouseMove, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MOUSE_WHEEL,
-      OnMouseWheel, this);
+                                 OnMouseWheel, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_KEY_DOWN,
-      OnKeyDown, this);
-  evas_object_event_callback_add(content_image_, EVAS_CALLBACK_KEY_UP,
-      OnKeyUp, this);
+                                 OnKeyDown, this);
+  evas_object_event_callback_add(content_image_, EVAS_CALLBACK_KEY_UP, OnKeyUp,
+                                 this);
 
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MULTI_DOWN,
-      OnMultiTouchDownEvent, this);
+                                 OnMultiTouchDownEvent, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MULTI_MOVE,
-      OnMultiTouchMoveEvent, this);
+                                 OnMultiTouchMoveEvent, this);
   evas_object_event_callback_add(content_image_, EVAS_CALLBACK_MULTI_UP,
-      OnMultiTouchUpEvent, this);
+                                 OnMultiTouchUpEvent, this);
 
 #if defined(OS_TIZEN_MOBILE)
   eext_object_event_callback_add(content_image_, EEXT_CALLBACK_BACK,
-      OnHWBackEvent, this);
+                                 OnHWBackEvent, this);
 #endif
 
   // IMContext calls evas() getter on 'this' so it needs to be
@@ -275,13 +291,13 @@ void RenderWidgetHostViewEfl::InitAsChild(gfx::NativeView parent_view) {
 }
 
 #if defined(NDEBUG)
-#define GL_CHECK_HELPER(code, msg) \
-  ((code), false)
+#define GL_CHECK_HELPER(code, msg) ((code), false)
 #else
 static GLenum g_gl_err;
-#define GL_CHECK_HELPER(code, msg) \
-  (((void)(code), ((g_gl_err = evas_gl_api_->glGetError()) == GL_NO_ERROR)) ? false : \
-      ((LOG(ERROR) << "GL Error: " << g_gl_err << "    " << msg), true))
+#define GL_CHECK_HELPER(code, msg)                                          \
+  (((void)(code), ((g_gl_err = evas_gl_api_->glGetError()) == GL_NO_ERROR)) \
+       ? false                                                              \
+       : ((LOG(ERROR) << "GL Error: " << g_gl_err << "    " << msg), true))
 #endif
 
 #define GL_CHECK(code) GL_CHECK_HELPER(code, "")
@@ -292,35 +308,34 @@ RenderWidgetHostViewEfl::~RenderWidgetHostViewEfl() {
     delete im_context_;
 
   evas_object_event_callback_del_full(parent_view_, EVAS_CALLBACK_RESIZE,
-      OnParentViewResize, this);
+                                      OnParentViewResize, this);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_FOCUS_IN,
-      OnFocusIn);
+                                 OnFocusIn);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_FOCUS_OUT,
-      OnFocusOut);
-  evas_object_smart_callback_del(content_image_elm_host_,
-      "focused", OnHostFocusIn);
-  evas_object_smart_callback_del(content_image_elm_host_,
-      "unfocused", OnHostFocusOut);
+                                 OnFocusOut);
+  evas_object_smart_callback_del(content_image_elm_host_, "focused",
+                                 OnHostFocusIn);
+  evas_object_smart_callback_del(content_image_elm_host_, "unfocused",
+                                 OnHostFocusOut);
 
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MOUSE_DOWN,
-      OnMouseDown);
+                                 OnMouseDown);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MOUSE_UP,
-      OnMouseUp);
+                                 OnMouseUp);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MOUSE_MOVE,
-      OnMouseMove);
+                                 OnMouseMove);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MOUSE_WHEEL,
-      OnMouseWheel);
+                                 OnMouseWheel);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_KEY_DOWN,
-      OnKeyDown);
-  evas_object_event_callback_del(content_image_, EVAS_CALLBACK_KEY_UP,
-      OnKeyUp);
+                                 OnKeyDown);
+  evas_object_event_callback_del(content_image_, EVAS_CALLBACK_KEY_UP, OnKeyUp);
 
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MULTI_DOWN,
-      OnMultiTouchDownEvent);
+                                 OnMultiTouchDownEvent);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MULTI_MOVE,
-      OnMultiTouchMoveEvent);
+                                 OnMultiTouchMoveEvent);
   evas_object_event_callback_del(content_image_, EVAS_CALLBACK_MULTI_UP,
-      OnMultiTouchUpEvent);
+                                 OnMultiTouchUpEvent);
 
   evas_object_del(content_image_elm_host_);
   content_image_elm_host_ = NULL;
@@ -335,7 +350,8 @@ RenderWidgetHostViewEfl::~RenderWidgetHostViewEfl() {
 }
 
 gfx::Point RenderWidgetHostViewEfl::ConvertPointInViewPix(gfx::Point point) {
-  return gfx::ToFlooredPoint(gfx::ScalePoint(gfx::PointF(point), device_scale_factor_));
+  return gfx::ToFlooredPoint(
+      gfx::ScalePoint(gfx::PointF(point), device_scale_factor_));
 }
 
 gfx::Rect RenderWidgetHostViewEfl::GetViewBoundsInPix() const {
@@ -345,24 +361,26 @@ gfx::Rect RenderWidgetHostViewEfl::GetViewBoundsInPix() const {
 }
 
 static const char kVertexShaderSourceSimple[] =
-  "attribute vec4 a_position;   \n"
-  "attribute vec2 a_texCoord;   \n"
-  "varying vec2 v_texCoord;     \n"
-  "void main() {                \n"
-  "  gl_Position = a_position;  \n"
-  "  v_texCoord = a_texCoord;   \n"
-  "}                            \n";
+    "attribute vec4 a_position;   \n"
+    "attribute vec2 a_texCoord;   \n"
+    "varying vec2 v_texCoord;     \n"
+    "void main() {                \n"
+    "  gl_Position = a_position;  \n"
+    "  v_texCoord = a_texCoord;   \n"
+    "}                            \n";
 
 static const char kFragmentShaderSourceSimple[] =
-  "precision mediump float;                            \n"
-  "varying vec2 v_texCoord;                            \n"
-  "uniform sampler2D s_texture;                        \n"
-  "void main() {                                       \n"
-  "  gl_FragColor = texture2D( s_texture, v_texCoord );\n"
-  "}                                                   \n";
-
-static void GLCheckProgramHelper(Evas_GL_API* api, GLuint program,
-                                 const char* file, int line) {
+    "precision mediump float;                            \n"
+    "varying vec2 v_texCoord;                            \n"
+    "uniform sampler2D s_texture;                        \n"
+    "void main() {                                       \n"
+    "  gl_FragColor = texture2D( s_texture, v_texCoord );\n"
+    "}                                                   \n";
+
+static void GLCheckProgramHelper(Evas_GL_API* api,
+                                 GLuint program,
+                                 const char* file,
+                                 int line) {
   GLint status;
   api->glGetProgramiv(program, GL_LINK_STATUS, &status);
   if (!status) {
@@ -370,17 +388,19 @@ static void GLCheckProgramHelper(Evas_GL_API* api, GLuint program,
     std::unique_ptr<GLchar[]> log(new GLchar[buf_length]);
     GLsizei length = 0;
     api->glGetProgramInfoLog(program, buf_length, &length, log.get());
-    LOG(ERROR) << "GL program link failed in: " << file << ":" << line
-               << ": " << log.get();
+    LOG(ERROR) << "GL program link failed in: " << file << ":" << line << ": "
+               << log.get();
     api->glDeleteProgram(program);
   }
 }
 
 #define GLCheckProgram(api, program) \
-    GLCheckProgramHelper(api, program, __FILE__, __LINE__)
+  GLCheckProgramHelper(api, program, __FILE__, __LINE__)
 
-static void GLCheckShaderHelper(
-    Evas_GL_API* api, GLuint shader, const char* file, int line) {
+static void GLCheckShaderHelper(Evas_GL_API* api,
+                                GLuint shader,
+                                const char* file,
+                                int line) {
   GLint status;
   api->glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
   if (!status) {
@@ -388,14 +408,14 @@ static void GLCheckShaderHelper(
     std::unique_ptr<GLchar[]> log(new GLchar[buf_length]);
     GLsizei length = 0;
     api->glGetShaderInfoLog(shader, buf_length, &length, log.get());
-    LOG(ERROR) << "GL shader compile failed in " << file << ":" << line
-               << ": " << log.get();
+    LOG(ERROR) << "GL shader compile failed in " << file << ":" << line << ": "
+               << log.get();
     api->glDeleteShader(shader);
   }
 }
 
 #define GLCheckShader(api, shader) \
-    GLCheckShaderHelper((api), (shader), __FILE__, __LINE__)
+  GLCheckShaderHelper((api), (shader), __FILE__, __LINE__)
 
 void RenderWidgetHostViewEfl::initializeProgram() {
   evas_gl_make_current(evas_gl_, evas_gl_surface_, evas_gl_context_);
@@ -410,10 +430,8 @@ void RenderWidgetHostViewEfl::initializeProgram() {
   GL_CHECK_STATUS("fragment shader");
 
   const GLfloat vertex_attributes[] = {
-      -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
-      -1.0f,  1.0f, 0.0f, 0.0f, 1.0f,
-       1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
-       1.0f, -1.0f, 0.0f, 1.0f, 0.0f};
+      -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f,  0.0f, 0.0f, 1.0f,
+      1.0f,  1.0f,  0.0f, 1.0f, 1.0f, 1.0f,  -1.0f, 0.0f, 1.0f, 0.0f};
 
   GL_CHECK(evas_gl_api_->glGenBuffers(1, &vertex_buffer_obj_));
   GL_CHECK(evas_gl_api_->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_));
@@ -429,8 +447,10 @@ void RenderWidgetHostViewEfl::initializeProgram() {
                                       sizeof(index_attributes),
                                       index_attributes, GL_STATIC_DRAW));
 
-  GL_CHECK(evas_gl_api_->glShaderSource(vertexShader, 1, &vertexShaderSourceProgram, 0));
-  GL_CHECK(evas_gl_api_->glShaderSource(fragmentShader, 1, &fragmentShaderSourceProgram, 0));
+  GL_CHECK(evas_gl_api_->glShaderSource(vertexShader, 1,
+                                        &vertexShaderSourceProgram, 0));
+  GL_CHECK(evas_gl_api_->glShaderSource(fragmentShader, 1,
+                                        &fragmentShaderSourceProgram, 0));
   GL_CHECK(program_id_ = evas_gl_api_->glCreateProgram());
   GL_CHECK(evas_gl_api_->glCompileShader(vertexShader));
   GLCheckShader(evas_gl_api_, vertexShader);
@@ -445,11 +465,19 @@ void RenderWidgetHostViewEfl::initializeProgram() {
   GL_CHECK(evas_gl_api_->glDeleteShader(vertexShader));
   GL_CHECK(evas_gl_api_->glDeleteShader(fragmentShader));
 
-  GL_CHECK(position_attrib_ = evas_gl_api_->glGetAttribLocation(program_id_, "a_position"));
-  GL_CHECK(texcoord_attrib_ = evas_gl_api_->glGetAttribLocation(program_id_, "a_texCoord"));
-  GL_CHECK(source_texture_location_ = evas_gl_api_->glGetUniformLocation (program_id_, "s_texture" ));
+  GL_CHECK(position_attrib_ =
+               evas_gl_api_->glGetAttribLocation(program_id_, "a_position"));
+  GL_CHECK(texcoord_attrib_ =
+               evas_gl_api_->glGetAttribLocation(program_id_, "a_texCoord"));
+  GL_CHECK(source_texture_location_ =
+               evas_gl_api_->glGetUniformLocation(program_id_, "s_texture"));
 }
 
+viz::LocalSurfaceId RenderWidgetHostViewEfl::GetLocalSurfaceId() const {
+
+}
+void RenderWidgetHostViewEfl::OnBeginFrame() {
+}
 bool RenderWidgetHostViewEfl::MakeCurrent() {
   return evas_gl_make_current(evas_gl_, evas_gl_surface_, evas_gl_context_);
 }
@@ -477,9 +505,9 @@ void RenderWidgetHostViewEfl::EnsureDeviceDisplayInfoInitialized() {
 #if defined(USE_WAYLAND)
   ecore_wl_screen_size_get(&display_width, &display_height);
   dpi = static_cast<double>(ecore_wl_dpi_get());
-#else // X11
-  ecore_x_screen_size_get(ecore_x_default_screen_get(),
-                          &display_width, &display_height);
+#else  // X11
+  ecore_x_screen_size_get(ecore_x_default_screen_get(), &display_width,
+                          &display_height);
   dpi = static_cast<double>(ecore_x_dpi_get());
 #endif
 
@@ -499,12 +527,14 @@ void RenderWidgetHostViewEfl::PaintTextureToSurface(GLuint texture_id) {
 
   gfx::Rect bounds = GetViewBoundsInPix();
   gfx::Size surface = surface_size_;
-  GL_CHECK(gl_api->glViewport(0, bounds.height() - surface.height(), surface.width(), surface.height()));
+  GL_CHECK(gl_api->glViewport(0, bounds.height() - surface.height(),
+                              surface.width(), surface.height()));
   GL_CHECK(gl_api->glClearColor(1.0, 1.0, 1.0, 1.0));
   GL_CHECK(gl_api->glClear(GL_COLOR_BUFFER_BIT));
   GL_CHECK(gl_api->glUseProgram(program_id_));
 
-  current_orientation_ = ecore_evas_rotation_get(ecore_evas_ecore_evas_get(evas_));
+  current_orientation_ =
+      ecore_evas_rotation_get(ecore_evas_ecore_evas_get(evas_));
 
   GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_));
 
@@ -530,8 +560,11 @@ void RenderWidgetHostViewEfl::PaintTextureToSurface(GLuint texture_id) {
   evas_gl_make_current(evas_gl_, 0, 0);
 }
 
-void RenderWidgetHostViewEfl::EvasObjectImagePixelsGetCallback(void* data, Evas_Object* obj) {
-  RenderWidgetHostViewEfl* rwhv_efl = reinterpret_cast<RenderWidgetHostViewEfl*>(data);
+void RenderWidgetHostViewEfl::EvasObjectImagePixelsGetCallback(
+    void* data,
+    Evas_Object* obj) {
+  RenderWidgetHostViewEfl* rwhv_efl =
+      reinterpret_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv_efl->texture_id_)
     rwhv_efl->PaintTextureToSurface(rwhv_efl->texture_id_);
 }
@@ -549,8 +582,8 @@ void RenderWidgetHostViewEfl::Init_EvasGL(int width, int height) {
 
   evas_gl_ = evas_gl_new(evas_);
   evas_gl_api_ = evas_gl_api_get(evas_gl_);
-  evas_gl_context_ = evas_gl_context_create(
-      evas_gl_, GLSharedContextEfl::GetEvasGLContext());
+  evas_gl_context_ =
+      evas_gl_context_create(evas_gl_, GLSharedContextEfl::GetEvasGLContext());
   if (!evas_gl_context_)
     LOG(FATAL) << "Failed to create evas gl context";
 
@@ -565,6 +598,9 @@ void RenderWidgetHostViewEfl::Init_EvasGL(int width, int height) {
 
   evas_gl_initialized_ = true;
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it.
   compositor_ = new ui::Compositor(GetContextFactory(),
                                    base::ThreadTaskRunnerHandle::Get());
   compositor_->SetAcceleratedWidget(GetNativeViewId());
@@ -576,6 +612,7 @@ void RenderWidgetHostViewEfl::Init_EvasGL(int width, int height) {
   root_layer_->SetBounds(gfx::Rect(0, 0, size.width(), size.height()));
   compositor_->SetScaleAndSize(device_scale_factor_, size);
   compositor_->SetVisible(true);
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderWidgetHostViewEfl::ResizeCompositorLayer(int width, int height) {
@@ -594,32 +631,34 @@ void RenderWidgetHostViewEfl::CreateNativeSurface(int width, int height) {
     evas_gl_surface_destroy(evas_gl_, evas_gl_surface_);
   }
 
-  evas_gl_surface_ = evas_gl_surface_create(
-      evas_gl_, evas_gl_config_, width, height);
+  evas_gl_surface_ =
+      evas_gl_surface_create(evas_gl_, evas_gl_config_, width, height);
   if (!evas_gl_surface_)
     LOG(FATAL) << "Failed to create evas gl surface";
 
   Evas_Native_Surface nativeSurface;
   if (evas_gl_native_surface_get(evas_gl_, evas_gl_surface_, &nativeSurface)) {
     evas_object_image_native_surface_set(content_image_, &nativeSurface);
-    evas_object_image_pixels_get_callback_set(content_image_,
-        EvasObjectImagePixelsGetCallback, this);
+    evas_object_image_pixels_get_callback_set(
+        content_image_, EvasObjectImagePixelsGetCallback, this);
     evas_object_image_pixels_dirty_set(content_image_, true);
   } else {
     LOG(FATAL) << "Failed to get natvie surface";
   }
 }
 
-void RenderWidgetHostViewEfl::SetEvasHandler(scoped_refptr<EvasEventHandler> evas_event_handler) {
+void RenderWidgetHostViewEfl::SetEvasHandler(
+    scoped_refptr<EvasEventHandler> evas_event_handler) {
   evas_event_handler_ = evas_event_handler;
 }
 
 bool RenderWidgetHostViewEfl::OnMessageReceived(const IPC::Message& message) {
   bool handled = true;
   IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewEfl, message)
-    IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputInFormStateChanged, OnTextInputInFormStateChanged)
-    IPC_MESSAGE_HANDLER(ViewHostMsg_SnapshotDataReceived, OnSnapshotDataReceived)
-    IPC_MESSAGE_UNHANDLED(handled = false)
+  IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputInFormStateChanged,
+                      OnTextInputInFormStateChanged)
+  IPC_MESSAGE_HANDLER(ViewHostMsg_SnapshotDataReceived, OnSnapshotDataReceived)
+  IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
   return handled;
 }
@@ -628,9 +667,8 @@ bool RenderWidgetHostViewEfl::Send(IPC::Message* message) {
   return host_->Send(message);
 }
 
-void RenderWidgetHostViewEfl::OnSnapshotDataReceived(
-    SkBitmap bitmap,
-    int snapshotId) {
+void RenderWidgetHostViewEfl::OnSnapshotDataReceived(SkBitmap bitmap,
+                                                     int snapshotId) {
   Evas_Object* image = NULL;
   if (!bitmap.empty()) {
     image = evas_object_image_filled_add(evas_);
@@ -638,7 +676,8 @@ void RenderWidgetHostViewEfl::OnSnapshotDataReceived(
     evas_object_image_data_copy_set(image, bitmap.getPixels());
   }
 
-  ScreenshotCapturedCallback* callback = screen_capture_cb_map_.Lookup(snapshotId);
+  ScreenshotCapturedCallback* callback =
+      screen_capture_cb_map_.Lookup(snapshotId);
   if (!callback) {
     return;
   }
@@ -646,7 +685,8 @@ void RenderWidgetHostViewEfl::OnSnapshotDataReceived(
   screen_capture_cb_map_.Remove(snapshotId);
 }
 
-void RenderWidgetHostViewEfl::InitAsPopup(RenderWidgetHostView*, const gfx::Rect&) {
+void RenderWidgetHostViewEfl::InitAsPopup(RenderWidgetHostView*,
+                                          const gfx::Rect&) {
   NOTIMPLEMENTED();
 }
 
@@ -674,28 +714,32 @@ void RenderWidgetHostViewEfl::SetSize(const gfx::Size& size) {
   // This is a hack. See WebContentsView::SizeContents
   int width = std::min(size.width(), EFL_MAX_WIDTH);
   int height = std::min(size.height(), EFL_MAX_HEIGHT);
-  if (popup_type_ != blink::WebPopupTypeNone) {
+  if (popup_type_ != blink::kWebPopupTypeNone) {
     // We're a popup, honor the size request.
     Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_);
     ecore_evas_resize(ee, width, height);
   }
 
   // Update the size of the RWH.
-  //if (requested_size_.width() != width ||
+  // if (requested_size_.width() != width ||
   //    requested_size_.height() != height) {
-    // Disabled for now, will enable it while implementing InitAsPopUp (P1) API
-   //equested_size_ = gfx::Size(width, height);
-    host_->SendScreenRects();
-    host_->WasResized();
+  // Disabled for now, will enable it while implementing InitAsPopUp (P1) API
+  // equested_size_ = gfx::Size(width, height);
+  host_->SendScreenRects();
+  host_->WasResized();
   //}
-    gfx::Size bounds = GetViewBoundsInPix().size();
-    root_layer_->SetBounds(gfx::Rect(0, 0, bounds.width(), bounds.height()));
-    compositor_->SetScaleAndSize(device_scale_factor_, bounds);
+  gfx::Size bounds = GetViewBoundsInPix().size();
+  root_layer_->SetBounds(gfx::Rect(0, 0, bounds.width(), bounds.height()));
+  compositor_->SetScaleAndSize(device_scale_factor_, bounds);
 }
 
 void RenderWidgetHostViewEfl::SetBounds(const gfx::Rect& rect) {
   host_->WasResized();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it
   delegated_frame_host_->WasResized();
+#endif  // !defined(EWK_BRINGUP)
 }
 
 gfx::Vector2dF RenderWidgetHostViewEfl::GetLastScrollOffset() const {
@@ -718,13 +762,21 @@ gfx::NativeViewAccessible RenderWidgetHostViewEfl::GetNativeViewAccessible() {
 }
 
 bool RenderWidgetHostViewEfl::IsSurfaceAvailableForCopy() const {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it
   return delegated_frame_host_->CanCopyToBitmap();
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderWidgetHostViewEfl::Show() {
   evas_object_show(content_image_elm_host_);
   host_->WasShown(ui::LatencyInfo());
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it
   delegated_frame_host_->WasShown(ui::LatencyInfo());
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderWidgetHostViewEfl::Hide() {
@@ -759,37 +811,39 @@ bool RenderWidgetHostViewEfl::HasFocus() const {
 }
 
 void RenderWidgetHostViewEfl::OnDidHandleKeyEvent(
-    const blink::WebInputEvent* input_event, bool processed) {
+    const blink::WebInputEvent* input_event,
+    bool processed) {
   if (!im_context_)
     return;
 
-  if (input_event->type == blink::WebInputEvent::KeyDown)
+  if (input_event->GetType() == blink::WebInputEvent::kKeyDown)
     im_context_->HandleKeyEvent(processed);
 }
 
 void RenderWidgetHostViewEfl::UpdateCursor(const WebCursor& webcursor) {
   if (is_loading_) {
-    // Setting native Loading cursor
+// Setting native Loading cursor
 #if defined(USE_WAYLAND)
     ecore_wl_window_cursor_from_name_set(GetEcoreWlWindow(), "watch");
 #else
-    ecore_x_window_cursor_set(GetEcoreXWindow(), ecore_x_cursor_shape_get(ECORE_X_CURSOR_CLOCK));
+    ecore_x_window_cursor_set(GetEcoreXWindow(),
+                              ecore_x_cursor_shape_get(ECORE_X_CURSOR_CLOCK));
 #endif
   } else {
-    WebCursor::CursorInfo cursor_info;
+    CursorInfo cursor_info;
     webcursor.GetCursorInfo(&cursor_info);
 
 #if defined(USE_WAYLAND)
-    ecore_wl_window_cursor_from_name_set(
-        GetEcoreWlWindow(), GetCursorName(cursor_info.type));
+    ecore_wl_window_cursor_from_name_set(GetEcoreWlWindow(),
+                                         GetCursorName(cursor_info.type));
 #else
     int cursor_type = GetCursorType(cursor_info.type);
-    ecore_x_window_cursor_set(GetEcoreXWindow(), ecore_x_cursor_shape_get(cursor_type));
+    ecore_x_window_cursor_set(GetEcoreXWindow(),
+                              ecore_x_cursor_shape_get(cursor_type));
 #endif
   }
   // Need to check for cursor visibility
-  //ecore_x_window_cursor_show(GetEcoreXWindow(), true);
-
+  // ecore_x_window_cursor_show(GetEcoreXWindow(), true);
 }
 
 void RenderWidgetHostViewEfl::SetIsLoading(bool is_loading) {
@@ -797,6 +851,37 @@ void RenderWidgetHostViewEfl::SetIsLoading(bool is_loading) {
   if (disambiguation_popup_)
     disambiguation_popup_->Dismiss();
 }
+void RenderWidgetHostViewEfl::SetBackgroundColor(SkColor color) {
+  // The renderer will feed its color back to us with the first CompositorFrame.
+  // We short-cut here to show a sensible color before that happens.
+  UpdateBackgroundColorFromRenderer(color);
+
+  DCHECK(SkColorGetA(color) == SK_AlphaOPAQUE ||
+         SkColorGetA(color) == SK_AlphaTRANSPARENT);
+  host_->SetBackgroundOpaque(SkColorGetA(color) == SK_AlphaOPAQUE);
+}
+SkColor RenderWidgetHostViewEfl::background_color() const {
+  return background_color_;
+}
+
+void RenderWidgetHostViewEfl::UpdateBackgroundColorFromRenderer(
+    SkColor color) {
+  if (color == background_color())
+    return;
+  background_color_ = color;
+}
+
+std::unique_ptr<ui::CompositorLock> RenderWidgetHostViewEfl::GetCompositorLock(
+    ui::CompositorLockClient* client) {
+  return compositor_->GetCompositorLock(client);
+}
+
+void RenderWidgetHostViewEfl::CompositorResizeLockEnded() {
+  // FIXME: M63 Bring-up
+  // auto* window_host = render_widget_host_view_->window_->GetHost();
+  // window_host->dispatcher()->ReleasePointerMoves();
+  host_->WasResized();
+}
 
 void RenderWidgetHostViewEfl::TextInputStateChanged(
     const TextInputState& params) {
@@ -805,7 +890,7 @@ void RenderWidgetHostViewEfl::TextInputStateChanged(
     WebContentsViewEfl* wcve = static_cast<WebContentsViewEfl*>(wci->GetView());
     if (!wcve->UseKeyPadWithoutUserAction())
       return;
-  } else { // Prevent scroll and zoom for autofocus'ed elements.
+  } else {  // Prevent scroll and zoom for autofocus'ed elements.
     ScrollFocusedEditableNode();
   }
 
@@ -817,7 +902,8 @@ void RenderWidgetHostViewEfl::TextInputStateChanged(
                                         params.show_ime_if_needed);
 }
 
-void RenderWidgetHostViewEfl::OnTextInputInFormStateChanged(bool is_in_form_tag) {
+void RenderWidgetHostViewEfl::OnTextInputInFormStateChanged(
+    bool is_in_form_tag) {
   if (im_context_)
     im_context_->SetIsInFormTag(is_in_form_tag);
 }
@@ -828,17 +914,19 @@ void RenderWidgetHostViewEfl::ImeCancelComposition() {
 }
 
 void RenderWidgetHostViewEfl::ImeCompositionRangeChanged(
-  const gfx::Range& range,
-  const std::vector<gfx::Rect>& character_bounds) {
+    const gfx::Range& range,
+    const std::vector<gfx::Rect>& character_bounds) {
   NOTIMPLEMENTED();
 }
 
-void RenderWidgetHostViewEfl::FocusedNodeChanged(bool is_editable_node) {
+void RenderWidgetHostViewEfl::FocusedNodeChanged(
+    bool is_editable_node,
+    const gfx::Rect& node_bounds_in_screen) {
   if (GetSelectionController())
     GetSelectionController()->HideHandleAndContextMenu();
 
   if (im_context_ && im_context_->IsShow() &&
-    ClipboardHelperEfl::GetInstance()->IsClipboardWindowOpened()) {
+      ClipboardHelperEfl::GetInstance()->IsClipboardWindowOpened()) {
     ClipboardHelperEfl::GetInstance()->CloseClipboardWindow();
   }
 }
@@ -847,12 +935,11 @@ void RenderWidgetHostViewEfl::Destroy() {
   delete this;
 }
 
-void RenderWidgetHostViewEfl::SetTooltipText(const base::string16& text) {
-}
+void RenderWidgetHostViewEfl::SetTooltipText(const base::string16& text) {}
 
 void RenderWidgetHostViewEfl::SelectionChanged(const base::string16& text,
-  size_t offset,
-  const gfx::Range& range) {
+                                               size_t offset,
+                                               const gfx::Range& range) {
   RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
 
   if (!GetSelectionController())
@@ -866,13 +953,16 @@ void RenderWidgetHostViewEfl::SelectionChanged(const base::string16& text,
 }
 
 void RenderWidgetHostViewEfl::SelectionBoundsChanged(
-  const ViewHostMsg_SelectionBounds_Params& params) {
+    const ViewHostMsg_SelectionBounds_Params& params) {
   ViewHostMsg_SelectionBounds_Params guest_params(params);
-  guest_params.anchor_rect = ConvertRectToPixel(device_scale_factor_, params.anchor_rect);
-  guest_params.focus_rect = ConvertRectToPixel(device_scale_factor_, params.focus_rect);
+  guest_params.anchor_rect =
+      ConvertRectToPixel(device_scale_factor_, params.anchor_rect);
+  guest_params.focus_rect =
+      ConvertRectToPixel(device_scale_factor_, params.focus_rect);
 
   if (im_context_)
-    im_context_->UpdateCaretBounds(gfx::UnionRects(guest_params.anchor_rect, guest_params.focus_rect));
+    im_context_->UpdateCaretBounds(
+        gfx::UnionRects(guest_params.anchor_rect, guest_params.focus_rect));
 
   if (GetSelectionController())
     GetSelectionController()->SetIsAnchorFirst(guest_params.is_anchor_first);
@@ -889,11 +979,10 @@ void RenderWidgetHostViewEfl::DidStopFlinging() {
   controller->SetControlsTemporarilyHidden(false);
 }
 
-uint32_t RenderWidgetHostViewEfl::GetSurfaceIdNamespace() {
-  return delegated_frame_host_->GetSurfaceIdNamespace();
-}
-
-void RenderWidgetHostViewEfl::EvasToBlinkCords(int x, int y, int* view_x, int* view_y) {
+void RenderWidgetHostViewEfl::EvasToBlinkCords(int x,
+                                               int y,
+                                               int* view_x,
+                                               int* view_y) {
   Evas_Coord tmpX, tmpY;
   evas_object_geometry_get(smart_parent(), &tmpX, &tmpY, NULL, NULL);
 
@@ -912,20 +1001,22 @@ void RenderWidgetHostViewEfl::SelectClosestWord(const gfx::Point& touch_point) {
   int view_x, view_y;
   EvasToBlinkCords(touch_point.x(), touch_point.y(), &view_x, &view_y);
 
-#if !defined(EWK_BRINGUP)
-// [M53_2785] The SelectClosestWord function was removed by
-//            commit 9720a4494c8bcd24d1f496feec5cfac7582103d2 in s-chromium
-//            It will be fixed by webview team.
-//            FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2122
-  Send(new ViewMsg_SelectClosestWord(
-      host_->GetRoutingID(), view_x, view_y));
-#endif // EWK_BRINGUP
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: The SelectClosestWord function was removed by
+  // commit 9720a4494c8bcd24d1f496feec5cfac7582103d2 in s-chromium
+  // It will be fixed by webview team.
+  // FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2122
+  Send(new ViewMsg_SelectClosestWord(host_->GetRoutingID(), view_x, view_y));
+#endif  // EWK_BRINGUP
 }
 
-void RenderWidgetHostViewEfl::ShowDisambiguationPopup(const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap) {
+void RenderWidgetHostViewEfl::ShowDisambiguationPopup(
+    const gfx::Rect& rect_pixels,
+    const SkBitmap& zoomed_bitmap) {
   handling_disambiguation_popup_gesture_ = true;
   if (!disambiguation_popup_)
-    disambiguation_popup_.reset(new DisambiguationPopupEfl(content_image_, this));
+    disambiguation_popup_.reset(
+        new DisambiguationPopupEfl(content_image_, this));
 
   disambiguation_popup_->Show(rect_pixels, zoomed_bitmap);
 }
@@ -937,25 +1028,22 @@ void RenderWidgetHostViewEfl::DisambiguationPopupDismissed() {
 void RenderWidgetHostViewEfl::HandleDisambiguationPopupMouseDownEvent(
     Evas_Event_Mouse_Down* evas_event) {
   blink::WebGestureEvent tap_down_event = MakeGestureEvent(
-      blink::WebInputEvent::GestureTapDown,
-      content_image_,
-      evas_event);
+      blink::WebInputEvent::kGestureTapDown, content_image_, evas_event);
   tap_down_event.data.tap.width = 0;
-  tap_down_event.data.tap.tapCount = 1;
+  tap_down_event.data.tap.tap_count = 1;
   SendGestureEvent(tap_down_event);
 }
 
 void RenderWidgetHostViewEfl::HandleDisambiguationPopupMouseUpEvent(
     Evas_Event_Mouse_Up* evas_event) {
   blink::WebGestureEvent tap_event = MakeGestureEvent(
-      blink::WebInputEvent::GestureTap,
-      content_image_,
-      evas_event);
+      blink::WebInputEvent::kGestureTap, content_image_, evas_event);
   tap_event.data.tap.width = 0;
-  tap_event.data.tap.tapCount = 1;
+  tap_event.data.tap.tap_count = 1;
   SendGestureEvent(tap_event);
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 void RenderWidgetHostViewEfl::LockCompositingSurface() {
   NOTIMPLEMENTED();
 }
@@ -963,13 +1051,15 @@ void RenderWidgetHostViewEfl::LockCompositingSurface() {
 void RenderWidgetHostViewEfl::UnlockCompositingSurface() {
   NOTIMPLEMENTED();
 }
+#endif  // !defined(EWK_BRINGUP)
 
-bool RenderWidgetHostViewEfl::CanDispatchToConsumer(ui::GestureConsumer* consumer) {
+bool RenderWidgetHostViewEfl::CanDispatchToConsumer(
+    ui::GestureConsumer* consumer) {
   return this == consumer;
 }
 
-void RenderWidgetHostViewEfl::DispatchSyntheticTouchEvent(ui::TouchEvent* event) {
-}
+void RenderWidgetHostViewEfl::DispatchSyntheticTouchEvent(
+    ui::TouchEvent* event) {}
 
 void RenderWidgetHostViewEfl::DispatchGestureEvent(
     GestureConsumer* raw_input_consumer,
@@ -977,53 +1067,62 @@ void RenderWidgetHostViewEfl::DispatchGestureEvent(
   HandleGesture(event);
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 void RenderWidgetHostViewEfl::CopyFromCompositingSurface(
     const gfx::Rect& src_subrect,
     const gfx::Size& output_size,
     const ReadbackRequestCallback& callback,
     const SkColorType color_type) {
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it
   // FIXME(venu.musham): should find a way to do it effectively.
   delegated_frame_host_->CopyFromCompositingSurface(src_subrect, output_size,
                                                     callback, color_type);
 }
+#endif  // !defined(EWK_BRINGUP)
 
 void RenderWidgetHostViewEfl::CopyOutputCallback(
     int request_id,
-    std::unique_ptr<cc::CopyOutputResult> result) {
-  if (!result->HasBitmap())
-    return;
-
+    std::unique_ptr<viz::CopyOutputResult> result) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   std::unique_ptr<SkBitmap> snapshot = std::move(result->TakeBitmap());
 
   Evas_Object* image = NULL;
   if (!snapshot.get()->empty()) {
     image = evas_object_image_filled_add(evas_);
-    evas_object_image_size_set(image,
-                               snapshot.get()->width(),
+    evas_object_image_size_set(image, snapshot.get()->width(),
                                snapshot.get()->height());
     evas_object_image_data_copy_set(image, snapshot.get()->getPixels());
   }
 
-  ScreenshotCapturedCallback* callback = screen_capture_cb_map_.Lookup(request_id);
+  ScreenshotCapturedCallback* callback =
+      screen_capture_cb_map_->Lookup(request_id);
 
   if (!callback)
     return;
 
   callback->Run(image);
-  screen_capture_cb_map_.Remove(request_id);
+  screen_capture_cb_map_->Remove(request_id);
+#endif  // !defined(EWK_BRINGUP)
 }
 
-void RenderWidgetHostViewEfl::GetSnapshotAsync(const gfx::Rect& snapshot_area, int request_id) {
+void RenderWidgetHostViewEfl::GetSnapshotAsync(const gfx::Rect& snapshot_area,
+                                               int request_id) {
   if (!compositor_)
     return;
 
-  std::unique_ptr<cc::CopyOutputRequest> request = cc::CopyOutputRequest::CreateBitmapRequest(
-      base::Bind(&RenderWidgetHostViewEfl::CopyOutputCallback, weak_factory_.GetWeakPtr(), request_id));
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  std::unique_ptr<viz::CopyOutputRequest> request =
+      viz::CopyOutputRequest::CreateBitmapRequest(
+          base::Bind(&RenderWidgetHostViewEfl::CopyOutputCallback,
+                     weak_factory_.GetWeakPtr(), request_id));
   request->set_area(snapshot_area);
   compositor_->root_layer()->RequestCopyOfOutput(std::move(request));
+#endif  // !defined(EWK_BRINGUP)
 }
 
-bool RenderWidgetHostViewEfl::RequestSnapshotAsync(const Eina_Rectangle rect,
+bool RenderWidgetHostViewEfl::RequestSnapshotAsync(
+    const Eina_Rectangle rect,
     Screenshot_Captured_Callback callback,
     void* user_data) {
   int width = rect.w;
@@ -1034,11 +1133,7 @@ bool RenderWidgetHostViewEfl::RequestSnapshotAsync(const Eina_Rectangle rect,
   int device_x, device_y;
   int view_x, view_y;
 
-  evas_object_geometry_get(smart_parent(),
-                           &device_x,
-                           &device_y,
-                           NULL,
-                           NULL);
+  evas_object_geometry_get(smart_parent(), &device_x, &device_y, NULL, NULL);
 
   if (width > device_x + GetViewBoundsInPix().width() - rect.x)
     width = device_x + GetViewBoundsInPix().width() - rect.x;
@@ -1053,24 +1148,19 @@ bool RenderWidgetHostViewEfl::RequestSnapshotAsync(const Eina_Rectangle rect,
   ScreenshotCapturedCallback* cb =
       new ScreenshotCapturedCallback(callback, user_data);
 
-  int cbId = screen_capture_cb_map_.Add(cb);
+  int cbId = screen_capture_cb_map_.Add(base::WrapUnique(cb));
 
   GetSnapshotAsync(gfx::Rect(view_x, view_y, width, height), cbId);
   return true;
 }
 
-void RenderWidgetHostViewEfl::BeginFrameSubscription(
-    std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) {
-  delegated_frame_host_->BeginFrameSubscription(std::move(subscriber));
-}
-
-void RenderWidgetHostViewEfl::EndFrameSubscription() {
-  delegated_frame_host_->EndFrameSubscription();
-}
+void RenderWidgetHostViewEfl::SetNeedsBeginFrames(bool needs_begin_frames) {}
 
-void RenderWidgetHostViewEfl::DidOverscroll(const DidOverscrollParams& params) {
+void RenderWidgetHostViewEfl::DidOverscroll(
+    const ui::DidOverscrollParams& params) {
   const gfx::Vector2dF& accumulated_overscroll = params.accumulated_overscroll;
-  const gfx::Vector2dF& latest_overscroll_delta = params.latest_overscroll_delta;
+  const gfx::Vector2dF& latest_overscroll_delta =
+      params.latest_overscroll_delta;
 
   if (!touch_events_enabled_)
     return;
@@ -1093,11 +1183,14 @@ void RenderWidgetHostViewEfl::ReturnSubscriberTexture(
     return;
   if (!rwhvefl)
     return;
-  DCHECK_NE(
-      rwhvefl->active_frame_subscriber_textures_.count(subscriber_texture.get()),
-      0u);
+  DCHECK_NE(rwhvefl->active_frame_subscriber_textures_.count(
+                subscriber_texture.get()),
+            0u);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   subscriber_texture->UpdateSyncToken(sync_token);
+#endif  // !defined(EWK_BRINGUP)
 
   rwhvefl->active_frame_subscriber_textures_.erase(subscriber_texture.get());
   if (rwhvefl->frame_subscriber_ && subscriber_texture->texture_id())
@@ -1108,11 +1201,14 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceFinishedForVideo(
     base::WeakPtr<RenderWidgetHostViewEfl> rwhvefl,
     const base::Callback<void(bool)>& callback,
     scoped_refptr<OwnedMailbox> subscriber_texture,
-    std::unique_ptr<cc::SingleReleaseCallback> release_callback,
+    std::unique_ptr<viz::SingleReleaseCallback> release_callback,
     bool result) {
   callback.Run(result);
 
-  display_compositor::GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  display_compositor::GLHelper* gl_helper =
+      ImageTransportFactory::GetInstance()->GetGLHelper();
   gpu::SyncToken sync_token;
   if (gl_helper)
     gl_helper->GenerateSyncToken(&sync_token);
@@ -1123,6 +1219,7 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceFinishedForVideo(
     release_callback->Run(sync_token, false);
   }
   ReturnSubscriberTexture(rwhvefl, subscriber_texture, sync_token);
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
@@ -1130,12 +1227,11 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
     scoped_refptr<OwnedMailbox> subscriber_texture,
     scoped_refptr<media::VideoFrame> video_frame,
     const base::Callback<void(const gfx::Rect&, bool)>& callback,
-    std::unique_ptr<cc::CopyOutputResult> result) {
+    std::unique_ptr<viz::CopyOutputResult> result) {
   base::ScopedClosureRunner scoped_callback_runner(
       base::Bind(callback, gfx::Rect(), false));
-  base::ScopedClosureRunner scoped_return_subscriber_texture(
-      base::Bind(&ReturnSubscriberTexture, rwhvefl, subscriber_texture,
-      gpu::SyncToken()));
+  base::ScopedClosureRunner scoped_return_subscriber_texture(base::Bind(
+      &ReturnSubscriberTexture, rwhvefl, subscriber_texture, gpu::SyncToken()));
 
   if (!rwhvefl)
     return;
@@ -1150,16 +1246,15 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
   // line up correctly.
   // The video frame's coded_size() and the result's size() are both physical
   // pixels.
-  gfx::Rect region_in_frame =
-      media::ComputeLetterboxRegion(gfx::Rect(video_frame->coded_size()),
-                                    result->size());
-  region_in_frame = gfx::Rect(region_in_frame.x() & ~1,
-                              region_in_frame.y() & ~1,
-                              region_in_frame.width() & ~1,
-                              region_in_frame.height() & ~1);
+  gfx::Rect region_in_frame = media::ComputeLetterboxRegion(
+      gfx::Rect(video_frame->coded_size()), result->size());
+  region_in_frame =
+      gfx::Rect(region_in_frame.x() & ~1, region_in_frame.y() & ~1,
+                region_in_frame.width() & ~1, region_in_frame.height() & ~1);
   if (region_in_frame.IsEmpty())
     return;
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (!result->HasTexture()) {
     DCHECK(result->HasBitmap());
     std::unique_ptr<SkBitmap> bitmap = result->TakeBitmap();
@@ -1181,15 +1276,14 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
 
       media::CopyRGBToVideoFrame(
           reinterpret_cast<uint8_t*>(scaled_bitmap.getPixels()),
-          scaled_bitmap.rowBytes(),
-          region_in_frame,
-          video_frame.get());
+          scaled_bitmap.rowBytes(), region_in_frame, video_frame.get());
     }
     ignore_result(scoped_callback_runner.Release());
     callback.Run(gfx::Rect(), false);
     return;
   }
 
+  // FIXME: EWK_BRINGUP definition should be removed.
   ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
   display_compositor::GLHelper* gl_helper = factory->GetGLHelper();
   if (!gl_helper)
@@ -1198,7 +1292,7 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
     return;
 
   cc::TextureMailbox texture_mailbox;
-  std::unique_ptr<cc::SingleReleaseCallback> release_callback;
+  std::unique_ptr<viz::SingleReleaseCallback> release_callback;
   result->TakeTexture(&texture_mailbox, &release_callback);
   DCHECK(texture_mailbox.IsTexture());
   if (!texture_mailbox.IsTexture())
@@ -1206,25 +1300,22 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
 
   gfx::Rect result_rect(result->size());
 
-  display_compositor::ReadbackYUVInterface* yuv_readback_pipeline =
+  viz::ReadbackYUVInterface* yuv_readback_pipeline =
       rwhvefl->yuv_readback_pipeline_.get();
   if (yuv_readback_pipeline == NULL ||
       yuv_readback_pipeline->scaler()->SrcSize() != result_rect.size() ||
       yuv_readback_pipeline->scaler()->SrcSubrect() != result_rect ||
       yuv_readback_pipeline->scaler()->DstSize() != region_in_frame.size()) {
-    display_compositor::GLHelper::ScalerQuality quality = display_compositor::GLHelper::SCALER_QUALITY_FAST;
+    display_compositor::GLHelper::ScalerQuality quality =
+        display_compositor::GLHelper::SCALER_QUALITY_FAST;
     // If we're scaling up, we can use the "best" quality.
     if (result_rect.size().width() < region_in_frame.size().width() &&
         result_rect.size().height() < region_in_frame.size().height())
       quality = display_compositor::GLHelper::SCALER_QUALITY_BEST;
 
-    rwhvefl->yuv_readback_pipeline_.reset(
-        gl_helper->CreateReadbackPipelineYUV(quality,
-                                             result_rect.size(),
-                                             result_rect,
-                                             video_frame->coded_size(),
-                                             true,
-                                             true));
+    rwhvefl->yuv_readback_pipeline_.reset(gl_helper->CreateReadbackPipelineYUV(
+        quality, result_rect.size(), result_rect, video_frame->coded_size(),
+        true, true));
     yuv_readback_pipeline = rwhvefl->yuv_readback_pipeline_.get();
   }
 
@@ -1232,10 +1323,8 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
   ignore_result(scoped_return_subscriber_texture.Release());
   base::Callback<void(bool result)> finished_callback = base::Bind(
       &RenderWidgetHostViewEfl::CopyFromCompositingSurfaceFinishedForVideo,
-      rwhvefl->AsWeakPtr(),
-      base::Bind(callback, video_frame->visible_rect()),
-      subscriber_texture,
-      base::Passed(&release_callback));
+      rwhvefl->AsWeakPtr(), base::Bind(callback, video_frame->visible_rect()),
+      subscriber_texture, base::Passed(&release_callback));
   yuv_readback_pipeline->ReadbackYUV(
       texture_mailbox.mailbox(), texture_mailbox.sync_token(),
       video_frame->visible_rect(),
@@ -1246,30 +1335,33 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo(
       video_frame->stride(media::VideoFrame::kVPlane),
       video_frame->data(media::VideoFrame::kVPlane), region_in_frame.origin(),
       finished_callback);
+#endif  // !defined(EWK_BRINGUP)
 }
 
-// Efl port - Implementation done, will enable this function after getting video test site to verify
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// Efl port - Implementation done, will enable this function after getting video
+// test site to verify
 void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceToVideoFrame(
-  const gfx::Rect& src_subrect,
-  const scoped_refptr<media::VideoFrame>& target,
-  const base::Callback<void(const gfx::Rect&, bool)>& callback) {
+    const gfx::Rect& src_subrect,
+    const scoped_refptr<media::VideoFrame>& target,
+    const base::Callback<void(const gfx::Rect&, bool)>& callback) {
   NOTIMPLEMENTED();
   callback.Run(gfx::Rect(), false);
 }
+#endif  // !defined(EWK_BRINGUP)
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 bool RenderWidgetHostViewEfl::CanCopyToVideoFrame() const {
+  // FIXME: EWK_BRINGUP definition should be removed.
+  //            DelegatedFrameHost was changed. we need to fix it
   return delegated_frame_host_->CanCopyToVideoFrame();
 }
+#endif  // !defined(EWK_BRINGUP)
 
 bool RenderWidgetHostViewEfl::HasAcceleratedSurface(const gfx::Size&) {
   return false;
 }
 
-void RenderWidgetHostViewEfl::GetScreenInfo(
-    blink::WebScreenInfo* results) {
-  RenderWidgetHostViewBase::GetDefaultScreenInfo(results);
-}
-
 gfx::Rect RenderWidgetHostViewEfl::GetBoundsInRootWindow() {
   Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_);
   int x, y, w, h;
@@ -1279,12 +1371,15 @@ gfx::Rect RenderWidgetHostViewEfl::GetBoundsInRootWindow() {
   return gfx::ConvertRectToDIP(device_scale_factor_, gfx::Rect(x, y, w, h));
 }
 
-void RenderWidgetHostViewEfl::RenderProcessGone(base::TerminationStatus, int error_code) {
+void RenderWidgetHostViewEfl::RenderProcessGone(base::TerminationStatus,
+                                                int error_code) {
   Destroy();
 }
 
-void RenderWidgetHostViewEfl::OnParentViewResize(
-    void* data, Evas*, Evas_Object* obj, void*) {
+void RenderWidgetHostViewEfl::OnParentViewResize(void* data,
+                                                 Evas*,
+                                                 Evas_Object* obj,
+                                                 void*) {
   RenderWidgetHostViewEfl* thiz = static_cast<RenderWidgetHostViewEfl*>(data);
   int x, y, width, height;
   evas_object_geometry_get(obj, &x, &y, &width, &height);
@@ -1295,8 +1390,10 @@ void RenderWidgetHostViewEfl::OnParentViewResize(
   thiz->host_->WasResized();
 }
 
-void RenderWidgetHostViewEfl::OnFocusIn(
-    void* data, Evas*, Evas_Object*, void*) {
+void RenderWidgetHostViewEfl::OnFocusIn(void* data,
+                                        Evas*,
+                                        Evas_Object*,
+                                        void*) {
   RenderWidgetHostViewEfl* thiz = static_cast<RenderWidgetHostViewEfl*>(data);
   if (thiz->evas_event_handler_.get())
     if (thiz->evas_event_handler_->HandleEvent_FocusIn())
@@ -1314,8 +1411,10 @@ void RenderWidgetHostViewEfl::OnFocusIn(
   DCHECK(r) << "Failed to grab arrow keys!";
 }
 
-void RenderWidgetHostViewEfl::OnFocusOut(
-    void* data, Evas*, Evas_Object*, void*) {
+void RenderWidgetHostViewEfl::OnFocusOut(void* data,
+                                         Evas*,
+                                         Evas_Object*,
+                                         void*) {
   RenderWidgetHostViewEfl* thiz = static_cast<RenderWidgetHostViewEfl*>(data);
   if (thiz->evas_event_handler_.get())
     if (thiz->evas_event_handler_->HandleEvent_FocusOut())
@@ -1331,31 +1430,32 @@ void RenderWidgetHostViewEfl::OnFocusOut(
   evas_object_key_ungrab(thiz->content_image_, "Down", 0, 0);
 }
 
-void RenderWidgetHostViewEfl::OnHostFocusIn(
-    void* data, Evas_Object*, void*) {
+void RenderWidgetHostViewEfl::OnHostFocusIn(void* data, Evas_Object*, void*) {
   RenderWidgetHostViewEfl* thiz = static_cast<RenderWidgetHostViewEfl*>(data);
   thiz->Focus();
 }
 
-void RenderWidgetHostViewEfl::OnHostFocusOut(
-    void* data, Evas_Object*, void*) {
+void RenderWidgetHostViewEfl::OnHostFocusOut(void* data, Evas_Object*, void*) {
   RenderWidgetHostViewEfl* thiz = static_cast<RenderWidgetHostViewEfl*>(data);
   thiz->host_->Blur();
 }
 
-void RenderWidgetHostViewEfl::OnMouseDown(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMouseDown(void* data,
+                                          Evas* evas,
+                                          Evas_Object* obj,
+                                          void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv->evas_event_handler_.get())
-    if (rwhv->evas_event_handler_->HandleEvent_MouseDown(static_cast<Evas_Event_Mouse_Down*>(event_info)))
+    if (rwhv->evas_event_handler_->HandleEvent_MouseDown(
+            static_cast<Evas_Event_Mouse_Down*>(event_info)))
       return;
 
   rwhv->Focus();
 
   if (!rwhv->touch_events_enabled_) {
-    blink::WebMouseEvent event = MakeWebMouseEvent(
-        blink::WebInputEvent::MouseDown, obj,
-        static_cast<Evas_Event_Mouse_Down*>(event_info));
+    blink::WebMouseEvent event =
+        MakeWebMouseEvent(blink::WebInputEvent::kMouseDown, obj,
+                          static_cast<Evas_Event_Mouse_Down*>(event_info));
     rwhv->host_->ForwardMouseEvent(event);
   } else {
     rwhv->ProcessTouchEvents(
@@ -1363,17 +1463,20 @@ void RenderWidgetHostViewEfl::OnMouseDown(
   }
 }
 
-void RenderWidgetHostViewEfl::OnMouseUp(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMouseUp(void* data,
+                                        Evas* evas,
+                                        Evas_Object* obj,
+                                        void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv->evas_event_handler_.get())
-    if (rwhv->evas_event_handler_->HandleEvent_MouseUp(static_cast<Evas_Event_Mouse_Up*>(event_info)))
+    if (rwhv->evas_event_handler_->HandleEvent_MouseUp(
+            static_cast<Evas_Event_Mouse_Up*>(event_info)))
       return;
 
   if (!rwhv->touch_events_enabled_) {
-    blink::WebMouseEvent event = MakeWebMouseEvent(
-        blink::WebInputEvent::MouseUp, obj,
-        static_cast<Evas_Event_Mouse_Up*>(event_info));
+    blink::WebMouseEvent event =
+        MakeWebMouseEvent(blink::WebInputEvent::kMouseUp, obj,
+                          static_cast<Evas_Event_Mouse_Up*>(event_info));
     rwhv->host_->ForwardMouseEvent(event);
   } else {
     rwhv->ProcessTouchEvents(
@@ -1381,16 +1484,19 @@ void RenderWidgetHostViewEfl::OnMouseUp(
   }
 }
 
-void RenderWidgetHostViewEfl::OnMouseMove(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMouseMove(void* data,
+                                          Evas* evas,
+                                          Evas_Object* obj,
+                                          void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv->evas_event_handler_.get())
-    if (rwhv->evas_event_handler_->HandleEvent_MouseMove(static_cast<Evas_Event_Mouse_Move*>(event_info)))
+    if (rwhv->evas_event_handler_->HandleEvent_MouseMove(
+            static_cast<Evas_Event_Mouse_Move*>(event_info)))
       return;
 
   if (!rwhv->touch_events_enabled_) {
-    blink::WebMouseEvent event = MakeWebMouseEvent(obj,
-        static_cast<Evas_Event_Mouse_Move*>(event_info));
+    blink::WebMouseEvent event =
+        MakeWebMouseEvent(obj, static_cast<Evas_Event_Mouse_Move*>(event_info));
     rwhv->host_->ForwardMouseEvent(event);
   } else {
     rwhv->ProcessTouchEvents(
@@ -1398,39 +1504,47 @@ void RenderWidgetHostViewEfl::OnMouseMove(
   }
 }
 
-void RenderWidgetHostViewEfl::OnMultiTouchDownEvent(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMultiTouchDownEvent(void* data,
+                                                    Evas* evas,
+                                                    Evas_Object* obj,
+                                                    void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   CHECK(rwhv->touch_events_enabled_);
   rwhv->ProcessTouchEvents(
       static_cast<Evas_Event_Multi_Down*>(event_info)->timestamp);
 }
 
-void RenderWidgetHostViewEfl::OnMultiTouchMoveEvent(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMultiTouchMoveEvent(void* data,
+                                                    Evas* evas,
+                                                    Evas_Object* obj,
+                                                    void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   CHECK(rwhv->touch_events_enabled_);
   rwhv->ProcessTouchEvents(
       static_cast<Evas_Event_Multi_Move*>(event_info)->timestamp);
 }
 
-void RenderWidgetHostViewEfl::OnMultiTouchUpEvent(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMultiTouchUpEvent(void* data,
+                                                  Evas* evas,
+                                                  Evas_Object* obj,
+                                                  void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   CHECK(rwhv->touch_events_enabled_);
   rwhv->ProcessTouchEvents(
       static_cast<Evas_Event_Multi_Up*>(event_info)->timestamp);
 }
 
-void RenderWidgetHostViewEfl::OnKeyDown(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
-
+void RenderWidgetHostViewEfl::OnKeyDown(void* data,
+                                        Evas* evas,
+                                        Evas_Object* obj,
+                                        void* event_info) {
   if (!event_info)
     return;
 
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv->evas_event_handler_.get())
-    if (rwhv->evas_event_handler_->HandleEvent_KeyDown(static_cast<Evas_Event_Key_Down*>(event_info)))
+    if (rwhv->evas_event_handler_->HandleEvent_KeyDown(
+            static_cast<Evas_Event_Key_Down*>(event_info)))
       return;
 
   // When upper case letter is entered there are two events
@@ -1439,8 +1553,8 @@ void RenderWidgetHostViewEfl::OnKeyDown(
   if (IsShiftKey(static_cast<Evas_Event_Key_Down*>(event_info)->key))
     return;
 
-  NativeWebKeyboardEvent n_event = MakeWebKeyboardEvent(
-      true, static_cast<Evas_Event_Key_Down*>(event_info));
+  NativeWebKeyboardEvent n_event =
+      MakeWebKeyboardEvent(true, static_cast<Evas_Event_Key_Down*>(event_info));
 
   if (!rwhv->im_context_) {
     rwhv->host_->ForwardKeyboardEvent(n_event);
@@ -1450,25 +1564,27 @@ void RenderWidgetHostViewEfl::OnKeyDown(
   // Do not forward keyevent now if there is fake key event
   // handling at the moment to preserve orders of events as in Webkit
   if (rwhv->im_context_->IsPreeditQueueEmpty() ||
-      rwhv->im_context_->IsKeyUpQueueEmpty() ) {
+      rwhv->im_context_->IsKeyUpQueueEmpty()) {
     rwhv->host_->ForwardKeyboardEvent(n_event);
-    rwhv->im_context_->PushToKeyUpEventQueue(n_event.windowsKeyCode);
+    rwhv->im_context_->PushToKeyUpEventQueue(n_event.windows_key_code);
     return;
   }
 
   rwhv->im_context_->PushToKeyDownEventQueue(n_event);
-  rwhv->im_context_->PushToKeyUpEventQueue(n_event.windowsKeyCode);
+  rwhv->im_context_->PushToKeyUpEventQueue(n_event.windows_key_code);
 }
 
-void RenderWidgetHostViewEfl::OnKeyUp(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
-
+void RenderWidgetHostViewEfl::OnKeyUp(void* data,
+                                      Evas* evas,
+                                      Evas_Object* obj,
+                                      void* event_info) {
   if (!event_info)
     return;
 
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv->evas_event_handler_.get())
-    if (rwhv->evas_event_handler_->HandleEvent_KeyUp(static_cast<Evas_Event_Key_Up*>(event_info)))
+    if (rwhv->evas_event_handler_->HandleEvent_KeyUp(
+            static_cast<Evas_Event_Key_Up*>(event_info)))
       return;
 
   // When upper case letter is entered there are two events
@@ -1477,23 +1593,27 @@ void RenderWidgetHostViewEfl::OnKeyUp(
   if (IsShiftKey(static_cast<Evas_Event_Key_Up*>(event_info)->key))
     return;
 
-  rwhv->host_->ForwardKeyboardEvent(MakeWebKeyboardEvent(
-      false, static_cast<Evas_Event_Key_Up*>(event_info)));
+  rwhv->host_->ForwardKeyboardEvent(
+      MakeWebKeyboardEvent(false, static_cast<Evas_Event_Key_Up*>(event_info)));
 }
 
 #if defined(OS_TIZEN_MOBILE)
-void RenderWidgetHostViewEfl::OnHWBackEvent(void* data, Evas_Object* obj,
-    void* event_info) {
+void RenderWidgetHostViewEfl::OnHWBackEvent(void* data,
+                                            Evas_Object* obj,
+                                            void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   rwhv->evas_event_handler_->HandleEvent_HWBack();
 }
 #endif
 
-void RenderWidgetHostViewEfl::OnMouseWheel(
-    void* data, Evas* evas, Evas_Object* obj, void* event_info) {
+void RenderWidgetHostViewEfl::OnMouseWheel(void* data,
+                                           Evas* evas,
+                                           Evas_Object* obj,
+                                           void* event_info) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(data);
   if (rwhv->evas_event_handler_.get())
-    if (rwhv->evas_event_handler_->HandleEvent_MouseWheel(static_cast<Evas_Event_Mouse_Wheel*>(event_info)))
+    if (rwhv->evas_event_handler_->HandleEvent_MouseWheel(
+            static_cast<Evas_Event_Mouse_Wheel*>(event_info)))
       return;
 
   if (!rwhv->touch_events_enabled_) {
@@ -1508,7 +1628,8 @@ void RenderWidgetHostViewEfl::ProcessTouchEvents(unsigned int timestamp) {
   // The poorly-written Tizen API document says:
   //  "0 for Mouse Event and device id for Multi Event."
   //  "The point which comes from Mouse Event has id 0 and"
-  //  "The point which comes from Multi Event has id that is same as Multi Event's device id."
+  //  "The point which comes from Multi Event has id that is same as Multi
+  //  Event's device id."
   // This constant is to map touch id 0 to 0, or [0] -> [0]
   static const int kMultiTouchIDMapPart0SingleIndex = 0;
   // This constant is to map [13, 23] -> [1, 11]
@@ -1540,7 +1661,8 @@ void RenderWidgetHostViewEfl::ProcessTouchEvents(unsigned int timestamp) {
       id -= kMultiTouchIDMapPart1DiffValue;
     } else if (id > kMultiTouchIDMapPart1EndIndex) {
       LOG(WARNING) << "evas_touch_point_list_nth_id_get() returned a value "
-                     "greater than (" << kMultiTouchIDMapPart1EndIndex << ").";
+                      "greater than ("
+                   << kMultiTouchIDMapPart1EndIndex << ").";
     }
     evas_touch_point_list_nth_xy_get(evas_, i, &pt.x, &pt.y);
     state = evas_touch_point_list_nth_state_get(evas_, i);
@@ -1557,7 +1679,8 @@ void RenderWidgetHostViewEfl::SetDoubleTapSupportEnabled(bool enabled) {
   DCHECK(gesture_recognizer_efl);
   ui::GestureProviderAura* gesture_provider_aura =
       gesture_recognizer_efl->GetGestureProviderForConsumer(this);
-  gesture_provider_aura->filtered_gesture_provider_.SetDoubleTapSupportForPlatformEnabled(enabled);
+  gesture_provider_aura->filtered_gesture_provider_
+      .SetDoubleTapSupportForPlatformEnabled(enabled);
 }
 
 void RenderWidgetHostViewEfl::SetTouchEventsEnabled(bool enabled) {
@@ -1568,39 +1691,36 @@ void RenderWidgetHostViewEfl::SetTouchEventsEnabled(bool enabled) {
   SetDoubleTapSupportEnabled(enabled);
 
   if (enabled) {
-    selection_controller_.reset(new SelectionControllerEfl(
-        smart_parent_, web_contents_));
+    selection_controller_.reset(
+        new SelectionControllerEfl(smart_parent_, web_contents_));
   } else {
     selection_controller_.reset();
   }
 }
 
 void RenderWidgetHostViewEfl::set_magnifier(bool status) {
-   magnifier_ = status;
+  magnifier_ = status;
 }
 
 ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& event) {
   ui::LatencyInfo latency_info;
   // The latency number should only be added if the timestamp is valid.
-  if (event.timeStampSeconds) {
+  if (event.TimeStampSeconds()) {
     const int64_t time_micros = static_cast<int64_t>(
-        event.timeStampSeconds * base::Time::kMicrosecondsPerSecond);
+        event.TimeStampSeconds() * base::Time::kMicrosecondsPerSecond);
     latency_info.AddLatencyNumberWithTimestamp(
-        ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
-        0,
-        0,
-        base::TimeTicks() + base::TimeDelta::FromMicroseconds(time_micros),
-        1);
+        ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0,
+        base::TimeTicks() + base::TimeDelta::FromMicroseconds(time_micros), 1);
   }
   return latency_info;
 }
 
-void RenderWidgetHostViewEfl::SendGestureEvent(
-    blink::WebGestureEvent& event) {
+void RenderWidgetHostViewEfl::SendGestureEvent(blink::WebGestureEvent& event) {
   HandleGesture(event);
-  if (magnifier_ && event.type == blink::WebInputEvent::GestureScrollUpdate)
+  blink::WebInputEvent::Type event_type = event.GetType();
+  if (magnifier_ && event_type == blink::WebInputEvent::kGestureScrollUpdate)
     return;
-  if (host_ && event.type != blink::WebInputEvent::Undefined)
+  if (host_ && event_type != blink::WebInputEvent::kUndefined)
     host_->ForwardGestureEventWithLatencyInfo(event, CreateLatencyInfo(event));
 }
 
@@ -1614,24 +1734,24 @@ void RenderWidgetHostViewEfl::HandleGestureEnd() {
   EnsureEdgeEffect().Disable();
 }
 
-void RenderWidgetHostViewEfl::HandleGesture(
-    blink::WebGestureEvent& event) {
+void RenderWidgetHostViewEfl::HandleGesture(blink::WebGestureEvent& event) {
   SelectionControllerEfl* controller = GetSelectionController();
   if (controller)
     controller->HandleGesture(event);
 
-  if (event.type == blink::WebInputEvent::GestureDoubleTap ||
-      event.type == blink::WebInputEvent::GesturePinchBegin ||
-      event.type == blink::WebInputEvent::GesturePinchEnd) {
+  blink::WebInputEvent::Type event_type = event.GetType();
+  if (event_type == blink::WebInputEvent::kGestureDoubleTap ||
+      event_type == blink::WebInputEvent::kGesturePinchBegin ||
+      event_type == blink::WebInputEvent::kGesturePinchEnd) {
     WebContentsImpl* wci = static_cast<WebContentsImpl*>(&web_contents_);
     WebContentsViewEfl* wcve = static_cast<WebContentsViewEfl*>(wci->GetView());
     wcve->HandleZoomGesture(event);
   }
 
-  if ((event.type == blink::WebInputEvent::GestureTap ||
-      event.type  == blink::WebInputEvent::GestureTapCancel) &&
+  if ((event_type == blink::WebInputEvent::kGestureTap ||
+       event_type == blink::WebInputEvent::kGestureTapCancel) &&
       !handling_disambiguation_popup_gesture_) {
-    float size = 32.0f; // Default value
+    float size = 32.0f;  // Default value
 #if defined(OS_TIZEN_MOBILE)
     size = elm_config_finger_size_get() / device_scale_factor_;
 #endif
@@ -1639,38 +1759,37 @@ void RenderWidgetHostViewEfl::HandleGesture(
     event.data.tap.height = size;
   }
 
-  if (event.type == blink::WebInputEvent::GestureTapDown) {
+  if (event_type == blink::WebInputEvent::kGestureTapDown) {
     // Webkit does not stop a fling-scroll on tap-down. So explicitly send an
     // event to stop any in-progress flings.
     blink::WebGestureEvent fling_cancel = event;
-    fling_cancel.type = blink::WebInputEvent::GestureFlingCancel;
-    fling_cancel.sourceDevice = blink::WebGestureDeviceTouchscreen;
+    fling_cancel.SetType(blink::WebInputEvent::kGestureFlingCancel);
+    fling_cancel.source_device = blink::kWebGestureDeviceTouchscreen;
     SendGestureEvent(fling_cancel);
-  } else if (event.type == blink::WebInputEvent::GestureScrollUpdate) {
-    if (event.data.scrollUpdate.deltaX < 0)
+  } else if (event_type == blink::WebInputEvent::kGestureScrollUpdate) {
+    if (event.data.scroll_update.delta_x < 0)
       EnsureEdgeEffect().Hide("edge,left");
-    else if (event.data.scrollUpdate.deltaX > 0)
+    else if (event.data.scroll_update.delta_x > 0)
       EnsureEdgeEffect().Hide("edge,right");
-    if (event.data.scrollUpdate.deltaY < 0)
+    if (event.data.scroll_update.delta_y < 0)
       EnsureEdgeEffect().Hide("edge,top");
-    else if (event.data.scrollUpdate.deltaY > 0)
+    else if (event.data.scroll_update.delta_y > 0)
       EnsureEdgeEffect().Hide("edge,bottom");
-  } else if (event.type == blink::WebInputEvent::GesturePinchBegin) {
+  } else if (event_type == blink::WebInputEvent::kGesturePinchBegin) {
     EnsureEdgeEffect().Disable();
-  } else if (event.type == blink::WebInputEvent::GesturePinchEnd) {
+  } else if (event_type == blink::WebInputEvent::kGesturePinchEnd) {
     EnsureEdgeEffect().Enable();
   }
 }
 
 void RenderWidgetHostViewEfl::HandleGesture(ui::GestureEvent* event) {
-  blink::WebGestureEvent gesture =
-      MakeWebGestureEventFromUIEvent(*event);
+  blink::WebGestureEvent gesture = MakeWebGestureEventFromUIEvent(*event);
   gesture.x = event->x();
   gesture.y = event->y();
 
   const gfx::Point root_point = event->root_location();
-  gesture.globalX = root_point.x();
-  gesture.globalY = root_point.y();
+  gesture.global_x = root_point.x();
+  gesture.global_y = root_point.y();
 
   if (event->type() == ui::ET_GESTURE_BEGIN)
     HandleGestureBegin();
@@ -1705,19 +1824,22 @@ void RenderWidgetHostViewEfl::HandleTouchEvent(ui::TouchEvent* event) {
 void RenderWidgetHostViewEfl::ProcessAckedTouchEvent(
     const TouchEventWithLatencyInfo& touch,
     InputEventAckState ack_result) {
-  ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) ?
-      ui::ER_HANDLED : ui::ER_UNHANDLED;
+  ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
+                               ? ui::ER_HANDLED
+                               : ui::ER_UNHANDLED;
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   std::unique_ptr<ui::GestureRecognizer::Gestures> gestures;
   gestures.reset(gesture_recognizer_->AckTouchEvent(
-      touch.event.uniqueTouchEventId, result, this));
+      touch.event.unique_touch_event_id, result, this));
 
   if (gestures) {
     for (size_t j = 0; j < gestures->size(); ++j) {
-      ui::GestureEvent* event = gestures->get().at(j);
+      ui::GestureEvent* event = gestures.at(j);
       HandleGesture(event);
     }
   }
+#endif  // !defined(EWK_BRINGUP)
 }
 
 EdgeEffect& RenderWidgetHostViewEfl::EnsureEdgeEffect() {
@@ -1732,41 +1854,53 @@ void RenderWidgetHostViewEfl::OnOrientationChangeEvent(int orientation) {
 }
 
 void RenderWidgetHostViewEfl::MoveCaret(const gfx::Point& point) {
-  host_->MoveCaret(gfx::Point(point.x() / device_scale_factor_, point.y() / device_scale_factor_));
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  host_->MoveCaret(gfx::Point(point.x() / device_scale_factor_,
+                              point.y() / device_scale_factor_));
+#endif  // !defined(EWK_BRINGUP)
 }
 
-void RenderWidgetHostViewEfl::SetComposition(const ui::CompositionText& composition_text) {
+void RenderWidgetHostViewEfl::SetComposition(
+    const ui::CompositionText& composition_text) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   const std::vector<blink::WebCompositionUnderline>& underlines =
       reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>(
-      composition_text.underlines);
+          composition_text.underlines);
 
   host_->ImeSetComposition(
       composition_text.text, underlines, gfx::Range::InvalidRange(),
       composition_text.selection.start(), composition_text.selection.end());
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderWidgetHostViewEfl::ConfirmComposition(base::string16& text) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  //            ImeConfirmComposition was removed
   host_->ImeConfirmComposition(text, gfx::Range::InvalidRange(), false);
+#endif  // !defined(EWK_BRINGUP)
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
 // Defined in gl_current_context_efl.cc because of conflicts of
 // texture_manager.h with efl GL API wrappers.
 extern GLuint GetTextureIdFromTexture(gpu::gles2::Texture* texture);
-
-void RenderWidgetHostViewEfl::GetTextureFromMailbox(gpu::Mailbox* mailbox,
-                                                    gfx::Size surface_size) {
-  gpu::gles2::MailboxManager* manager = SharedMailboxManager::GetMailboxManager();
-  gpu::gles2::Texture* texture = manager->ConsumeTexture(*mailbox);
-  if (texture != NULL) {
-    surface_size_ = surface_size;
-    texture_id_ = GetTextureIdFromTexture(texture);
-    evas_object_image_pixels_dirty_set(content_image_, true);
-    evas_render(evas_);
+#endif  // !defined(EWK_BRINGUP)
+void RenderWidgetHostViewEfl::DidCreateNewRendererCompositorFrameSink(
+    viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  renderer_compositor_frame_sink_ = renderer_compositor_frame_sink;
+  if (delegated_frame_host_) {
+    delegated_frame_host_->DidCreateNewRendererCompositorFrameSink(
+        renderer_compositor_frame_sink_);
   }
+#endif  // !defined(EWK_BRINGUP)
 }
-
-void RenderWidgetHostViewEfl::OnSwapCompositorFrame(
-    uint32_t output_surface_id, cc::CompositorFrame frame) {
+void RenderWidgetHostViewEfl::SubmitCompositorFrame(
+    const viz::LocalSurfaceId& local_surface_id,
+    viz::CompositorFrame frame) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   last_scroll_offset_ = frame.metadata.root_scroll_offset;
 
   if (GetSelectionController()) {
@@ -1775,11 +1909,12 @@ void RenderWidgetHostViewEfl::OnSwapCompositorFrame(
     GetSelectionController()->SetSelectionEmpty(
         frame.metadata.selection.is_empty_text_form_control);
 
-    GetSelectionController()->OnSelectionChanged(
-        frame.metadata.selection.start, frame.metadata.selection.end);
+    GetSelectionController()->OnSelectionChanged(frame.metadata.selection.start,
+                                                 frame.metadata.selection.end);
   }
 
   if (frame.delegated_frame_data) {
+    // FIXME: EWK_BRINGUP definition should be removed.
     // ack is sent by delegated frame host
     delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
                                               std::move(frame));
@@ -1787,22 +1922,33 @@ void RenderWidgetHostViewEfl::OnSwapCompositorFrame(
     LOG(ERROR) << "Non-delegated renderer path (software or gl) is no longer "
                << "supported. With this black screen will occur.";
   }
+#endif  // !defined(EWK_BRINGUP)
 }
 
-void RenderWidgetHostViewEfl::ClearCompositorFrame () {
+void RenderWidgetHostViewEfl::ClearCompositorFrame() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  // DelegatedFrameHost was changed. we need to fix it
   delegated_frame_host_->ClearDelegatedFrame();
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderWidgetHostViewEfl::ScrollFocusedEditableNode() {
   // If long-pressing, do not perform zoom to focused element.
   if (GetSelectionController() && !GetSelectionController()->GetLongPressed()) {
-    // The empty rect is ignored by WebViewImpl::scrollFocusedNodeIntoRect().
+// The empty rect is ignored by WebViewImpl::scrollFocusedNodeIntoRect().
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
     host_->ScrollFocusedEditableNodeIntoRect(gfx::Rect());
+#endif  // !defined(EWK_BRINGUP)
   }
 }
 
 bool RenderWidgetHostViewEfl::IsLastAvailableTextEmpty() const {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   return RenderWidgetHostViewBase::selection_text_.empty();
+#else
+  return false;
+#endif
 }
 
 bool RenderWidgetHostViewEfl::IsIMEShow() const {
@@ -1822,10 +1968,6 @@ gfx::Rect RenderWidgetHostViewEfl::GetIMERect() const {
 ///////////////////////////////////////////////////////////////////////////
 // DelegatedFrameHost, public:
 
-int RenderWidgetHostViewEfl::DelegatedFrameHostGetGpuMemoryBufferClientId() const {
-  return host_->GetProcess()->GetID();
-}
-
 ui::Layer* RenderWidgetHostViewEfl::DelegatedFrameHostGetLayer() const {
   return root_layer_.get();
 }
@@ -1834,7 +1976,8 @@ bool RenderWidgetHostViewEfl::DelegatedFrameHostIsVisible() const {
   return !host_->is_hidden();
 }
 
-SkColor RenderWidgetHostViewEfl::DelegatedFrameHostGetGutterColor(SkColor color) const {
+SkColor RenderWidgetHostViewEfl::DelegatedFrameHostGetGutterColor(
+    SkColor color) const {
   // When making an element on the page fullscreen the element's background
   // may not match the page's, so use black as the gutter color to avoid
   // flashes of brighter colors during the transition.
@@ -1843,7 +1986,7 @@ SkColor RenderWidgetHostViewEfl::DelegatedFrameHostGetGutterColor(SkColor color)
   return color;
 }
 
-gfx::Size RenderWidgetHostViewEfl::DelegatedFrameHostDesiredSizeInDIP() const{
+gfx::Size RenderWidgetHostViewEfl::DelegatedFrameHostDesiredSizeInDIP() const {
   gfx::Rect bounds = GetViewBoundsInPix();
   return bounds.size();
 }
@@ -1857,41 +2000,33 @@ bool RenderWidgetHostViewEfl::DelegatedFrameCanCreateResizeLock() const {
   return false;
 }
 
-std::unique_ptr<ResizeLock>
-RenderWidgetHostViewEfl::DelegatedFrameHostCreateResizeLock(
-    bool defer_compositor_lock) {
-  ResizeLock* lock = NULL;
-  return std::unique_ptr<ResizeLock>(lock);
+std::unique_ptr<CompositorResizeLock>
+RenderWidgetHostViewEfl::DelegatedFrameHostCreateResizeLock() {
+  //  auto* host = host_->window_->GetHost();
+  //  host->dispatcher()->HoldPointerMoves();
+
+  // FIXME: M63 Bring-up.
+  gfx::Rect desired_rect = GetBoundsInRootWindow();
+  return std::make_unique<CompositorResizeLock>(this, desired_rect.size());
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 void RenderWidgetHostViewEfl::DelegatedFrameHostResizeLockWasReleased() {
   host_->WasResized();
 }
 
-void RenderWidgetHostViewEfl::DelegatedFrameHostSendCompositorSwapAck(
-    int output_surface_id,
-    const cc::CompositorFrameAck& ack) {
-  host_->Send(new ViewMsg_SwapCompositorFrameAck(host_->GetRoutingID(),
-                                                 output_surface_id, ack));
-}
-
 void RenderWidgetHostViewEfl::DelegatedFrameHostSendReclaimCompositorResources(
-    int output_surface_id,
-    const cc::CompositorFrameAck& ack) {
-  host_->Send(new ViewMsg_ReclaimCompositorResources(host_->GetRoutingID(),
-                                                    output_surface_id, ack));
-}
-
-void RenderWidgetHostViewEfl::DelegatedFrameHostOnLostCompositorResources() {
-  host_->ScheduleComposite();
-}
-
-void RenderWidgetHostViewEfl::DelegatedFrameHostUpdateVSyncParameters(
-    const base::TimeTicks& timebase,
-    const base::TimeDelta& interval) {
-  host_->UpdateVSyncParameters(timebase, interval);
+    int compositor_frame_sink_id,
+    bool is_swap_ack,
+    const viz::ReturnedResourceArray& resources) {
+  host_->Send(new ViewMsg_ReclaimCompositorResources(
+      host_->GetRoutingID(), compositor_frame_sink_id, is_swap_ack, resources));
 }
+#endif
+#if 0
+void RenderWidgetHostViewEfl::SetBeginFrameSource(
+    viz::BeginFrameSource* source) {}
+#endif
+bool RenderWidgetHostViewEfl::IsAutoResizeEnabled() const {}
 
-void RenderWidgetHostViewEfl::SetBeginFrameSource(cc::BeginFrameSource* source) {
-}
 }  // namespace content
index 4ffed64aa8fa69619359670eb3ac1eb118abe907..a597517863ea190dc2f9525bf267b49692d47d96 100644 (file)
@@ -6,48 +6,51 @@
 #ifndef RENDER_WIDGET_HOST_VIEW_EFL
 #define RENDER_WIDGET_HOST_VIEW_EFL
 
-#include <Evas.h>
 #include <Ecore_Evas.h>
-#include <Evas_GL.h>
 #include <Ecore_IMF_Evas.h>
+#include <Evas.h>
+#include <Evas_GL.h>
 
 #include "base/format_macros.h"
-#include "base/id_map.h"
-#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "base/containers/id_map.h"
 #include "content/browser/renderer_host/evas_event_handler.h"
+#include "content/browser/renderer_host/render_widget_host_view_base.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/browser/web_contents/web_contents_view_efl.h"
 #include "content/common/content_export.h"
-#include "cc/output/compositor_frame.h"
-#include "cc/output/compositor_frame_ack.h"
-#include "cc/output/copy_output_request.h"
-#include "cc/output/copy_output_result.h"
-#include "cc/resources/single_release_callback.h"
-#include "cc/resources/texture_mailbox.h"
+#include "components/viz/common/quads/compositor_frame.h"
+#include "components/viz/common/frame_sinks/copy_output_request.h"
+#include "components/viz/common/frame_sinks/copy_output_result.h"
+#include "components/viz/common/resources/single_release_callback.h"
+#include "components/viz/common/quads/texture_mailbox.h"
 #include "content/browser/accessibility/browser_accessibility_manager.h"
 #include "content/browser/compositor/image_transport_factory.h"
 #include "content/browser/compositor/owned_mailbox.h"
+#include "content/browser/renderer_host/compositor_resize_lock.h"
 #include "content/browser/renderer_host/delegated_frame_host.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h"
 #include "content/browser/selection/selection_controller_efl.h"
 #include "gpu/command_buffer/common/mailbox.h"
+#include "ipc/ipc_sender.h"
 #include "ui/base/ime/composition_text.h"
 #include "ui/base/ime/text_input_client.h"
 #include "ui/compositor/layer_owner.h"
-#include "ui/events/gestures/gesture_types.h"
 #include "ui/events/gestures/gesture_recognizer.h"
+#include "ui/events/gestures/gesture_types.h"
 #include "ui/events/gestures/motion_event_aura.h"
-#include "ipc/ipc_sender.h"
 
 #if (EVAS_GL_API_VERSION == 1)
 // For desktop build using efl-1.9.x ~ efl-1.11.x
 // GLsync, GL*64, EvasGL*64 are not defined by Evas_GL.h
-typedef struct __GLsync*     GLsync;
-typedef signed long long     GLint64;
-typedef unsigned long long   GLuint64;
+typedef struct __GLsync* GLsync;
+typedef signed long long GLint64;
+typedef unsigned long long GLuint64;
 #else
-typedef EvasGLint64          GLint64;
-typedef EvasGLuint64         GLuint64;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+typedef EvasGLint64 GLint64;
+typedef EvasGLuint64 GLuint64;
+#endif
 #endif
 
 struct TextInputState;
@@ -56,7 +59,8 @@ namespace ui {
 class Compositor;
 class GestureEvent;
 class TouchEvent;
-}
+struct DidOverscrollParams;
+}  // namespace ui
 
 namespace blink {
 struct WebScreenInfo;
@@ -64,7 +68,8 @@ struct WebScreenInfo;
 
 namespace content {
 
-typedef void (*Screenshot_Captured_Callback)(Evas_Object* image, void* user_data);
+typedef void (*Screenshot_Captured_Callback)(Evas_Object* image,
+                                             void* user_data);
 
 class DisambiguationPopupEfl;
 class EdgeEffect;
@@ -78,6 +83,7 @@ class ScreenshotCapturedCallback;
 class CONTENT_EXPORT RenderWidgetHostViewEfl
     : public RenderWidgetHostViewBase,
       public DelegatedFrameHostClient,
+      public CompositorResizeLockClient,
       public ui::LayerOwner,
       public ui::GestureConsumer,
       public ui::GestureEventHelper,
@@ -85,7 +91,8 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
       public base::SupportsWeakPtr<RenderWidgetHostViewEfl>,
       public IPC::Sender {
  public:
-  explicit RenderWidgetHostViewEfl(RenderWidgetHost*, WebContents& web_contents);
+  explicit RenderWidgetHostViewEfl(RenderWidgetHost*,
+                                   WebContents& web_contents);
 
   // RenderWidgetHostViewBase implementation.
   void InitAsChild(gfx::NativeView) override;
@@ -108,6 +115,14 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
   bool HasFocus() const override;
   void UpdateCursor(const WebCursor&) override;
   void SetIsLoading(bool) override;
+  void SetBackgroundColor(SkColor color) override;
+  SkColor background_color() const override;
+  void UpdateBackgroundColorFromRenderer(SkColor color);
+
+  // CompositorResizeLockClient implementation.
+  std::unique_ptr<ui::CompositorLock> GetCompositorLock(
+      ui::CompositorLockClient* client) override;
+  void CompositorResizeLockEnded() override;
 
 #if defined(EWK_BRINGUP)
   // [M51_2704] TextInputStateChanged() should be removed and its functionality
@@ -121,53 +136,54 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
   void OnTextInputInFormStateChanged(bool is_in_form_tag);
 
   void ImeCancelComposition() override;
-  void ImeCompositionRangeChanged(const gfx::Range&, const std::vector<gfx::Rect>&) override;
-  void FocusedNodeChanged(bool is_editable_node) override;
+  void ImeCompositionRangeChanged(const gfx::Range&,
+                                  const std::vector<gfx::Rect>&) override;
+  void FocusedNodeChanged(bool is_editable_node,
+                          const gfx::Rect& node_bounds_in_screen) override;
 
   void Destroy() override;
   void SetTooltipText(const base::string16&) override;
-  void SelectionChanged(const base::string16&, size_t, const gfx::Range&) override;
-  void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params&) override;
-  void CopyFromCompositingSurface(
-    const gfx::Rect&,
-    const gfx::Size& /* dst_size */,
-    const ReadbackRequestCallback&,
-    const SkColorType) override;
-
+  void SelectionChanged(const base::string16&,
+                        size_t,
+                        const gfx::Range&) override;
+  void SelectionBoundsChanged(
+      const ViewHostMsg_SelectionBounds_Params&) override;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  void CopyFromCompositingSurface(const gfx::Rect&,
+                                  const gfx::Size& /* dst_size */,
+                                  const ReadbackRequestCallback&,
+                                  const SkColorType) override;
   void CopyFromCompositingSurfaceToVideoFrame(
-    const gfx::Rect&,
-    const scoped_refptr<media::VideoFrame>&,
-    const base::Callback<void(const gfx::Rect&, bool)>&) override;
-
-  bool CanCopyToVideoFrame() const override;
-  void BeginFrameSubscription(
-      std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
-  void EndFrameSubscription() override;
-  void DidOverscroll(const DidOverscrollParams& params) override;
+      const gfx::Rect&,
+      const scoped_refptr<media::VideoFrame>&,
+      const base::Callback<void(const gfx::Rect&, bool)>&) override;
+#endif
+  void SetNeedsBeginFrames(bool needs_begin_frames) override;
+  void DidOverscroll(const ui::DidOverscrollParams& params) override;
   bool HasAcceleratedSurface(const gfx::Size&) override;
-  void GetScreenInfo(blink::WebScreenInfo*) override;
   gfx::Rect GetBoundsInRootWindow() override;
   void RenderProcessGone(base::TerminationStatus, int) override;
   bool OnMessageReceived(const IPC::Message&) override;
 
   void OnFilteredMessageReceived(const IPC::Message&);
 
-  void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo&, InputEventAckState) override;
+  void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo&,
+                              InputEventAckState) override;
   void DidStopFlinging() override;
-  uint32_t GetSurfaceIdNamespace() override;
 
   void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
                                const SkBitmap& zoomed_bitmap) override;
   void DisambiguationPopupDismissed();
   void HandleDisambiguationPopupMouseDownEvent(Evas_Event_Mouse_Down*);
   void HandleDisambiguationPopupMouseUpEvent(Evas_Event_Mouse_Up*);
-  void LockCompositingSurface() override;
-  void UnlockCompositingSurface() override;
 
-  void OnSwapCompositorFrame(
-      uint32_t output_surface_id, cc::CompositorFrame frame) override;
+  void DidCreateNewRendererCompositorFrameSink(
+      viz::mojom::CompositorFrameSinkClient*
+          renderer_compositor_frame_sink) override;
+  void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id,
+                             viz::CompositorFrame frame) override;
 
-  void ClearCompositorFrame () override;
+  void ClearCompositorFrame() override;
 
   // ui::GestureEventHelper implementation.
   bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override;
@@ -223,33 +239,30 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
   gfx::Rect GetIMERect() const;
   void GetSnapshotAsync(const gfx::Rect& snapshot_area, int request_id);
   bool RequestSnapshotAsync(const Eina_Rectangle rect,
-    Screenshot_Captured_Callback callback,
-    void* user_data);
+                            Screenshot_Captured_Callback callback,
+                            void* user_data);
   void OnSnapshotDataReceived(SkBitmap bitmap, int snapshotId);
   void CopyOutputCallback(int request_id,
-                          std::unique_ptr<cc::CopyOutputResult> result);
+                          std::unique_ptr<viz::CopyOutputResult> result);
 
   // DelegatedFrameHostClient implementation.
-  int DelegatedFrameHostGetGpuMemoryBufferClientId() const override;
   ui::Layer* DelegatedFrameHostGetLayer() const override;
   bool DelegatedFrameHostIsVisible() const override;
   SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
-  std::unique_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock(
-      bool defer_compositor_lock) override;
+  std::unique_ptr<CompositorResizeLock> DelegatedFrameHostCreateResizeLock()
+      override;
   bool DelegatedFrameCanCreateResizeLock() const override;
   gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   void DelegatedFrameHostResizeLockWasReleased() override;
-  void DelegatedFrameHostSendCompositorSwapAck(
-      int output_surface_id,
-      const cc::CompositorFrameAck& ack) override;
   void DelegatedFrameHostSendReclaimCompositorResources(
-      int output_surface_id,
-      const cc::CompositorFrameAck& ack) override;
-  void DelegatedFrameHostOnLostCompositorResources() override;
-  void DelegatedFrameHostUpdateVSyncParameters(
-      const base::TimeTicks& timebase,
-      const base::TimeDelta& interval) override;
-  void SetBeginFrameSource(cc::BeginFrameSource* source) override;
+      int compositor_frame_sink_id,
+      bool is_swap_ack,
+      const viz::ReturnedResourceArray& resources) override;
+#endif
+  viz::LocalSurfaceId GetLocalSurfaceId() const override;
+  void OnBeginFrame() override;
+  bool IsAutoResizeEnabled() const override;
   bool MakeCurrent();
 
   SelectionControllerEfl* GetSelectionController() const {
@@ -300,19 +313,20 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
   void SetDoubleTapSupportEnabled(bool enabled);
 
   void OnOrientationChangeEvent(int);
-  void OnDidHandleKeyEvent(const blink::WebInputEvent* input_event, bool processed);
+  void OnDidHandleKeyEvent(const blink::WebInputEvent* input_event,
+                           bool processed);
 
   static void CopyFromCompositingSurfaceHasResultForVideo(
       base::WeakPtr<RenderWidgetHostViewEfl> rwhvefl,
       scoped_refptr<OwnedMailbox> subscriber_texture,
       scoped_refptr<media::VideoFrame> video_frame,
       const base::Callback<void(const gfx::Rect&, bool)>& callback,
-      std::unique_ptr<cc::CopyOutputResult> result);
+      std::unique_ptr<viz::CopyOutputResult> result);
   static void CopyFromCompositingSurfaceFinishedForVideo(
       base::WeakPtr<RenderWidgetHostViewEfl> rwhvefl,
       const base::Callback<void(bool)>& callback,
       scoped_refptr<OwnedMailbox> subscriber_texture,
-      std::unique_ptr<cc::SingleReleaseCallback> release_callback,
+      std::unique_ptr<viz::SingleReleaseCallback> release_callback,
       bool result);
   static void ReturnSubscriberTexture(
       base::WeakPtr<RenderWidgetHostViewEfl> rwhvefl,
@@ -332,10 +346,6 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
 
   void PaintTextureToSurface(GLuint texture_id);
 
-  // overrides CompositorClient
-  void GetTextureFromMailbox(gpu::Mailbox* mailbox,
-                             gfx::Size surface_size) override;
-
   RenderWidgetHostImpl* host_;
   IMContextEfl* im_context_;
   Evas* evas_;
@@ -354,12 +364,12 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
   scoped_refptr<EvasEventHandler> evas_event_handler_;
 
   // YUV readback pipeline.
-  std::unique_ptr<display_compositor::ReadbackYUVInterface>
-      yuv_readback_pipeline_;
+  // std::unique_ptr<viz::ReadbackYUVInterface>
+  //    yuv_readback_pipeline_;
 
   // Subscriber that listens to frame presentation events.
   std::unique_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
-  std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_;
+  std::vector<scoped_refptr<OwnedMailbox>> idle_frame_subscriber_textures_;
   std::set<OwnedMailbox*> active_frame_subscriber_textures_;
 
   // Stores the current state of the active pointers targeting this
@@ -397,6 +407,8 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
 
   bool touch_events_enabled_;
   bool handling_disambiguation_popup_gesture_;
+  // The background color of the web content.
+  SkColor background_color_;
 
   // The last scroll offset of the view.
   gfx::Vector2dF last_scroll_offset_;
@@ -405,7 +417,8 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
 
   WebContents& web_contents_;
 
-  IDMap<ScreenshotCapturedCallback, IDMapOwnPointer> screen_capture_cb_map_;
+  base::IDMap<std::unique_ptr<ScreenshotCapturedCallback>>
+      screen_capture_cb_map_;
   ui::Compositor* compositor_;
   std::unique_ptr<ui::Layer> root_layer_;
   std::unique_ptr<DelegatedFrameHost> delegated_frame_host_;
@@ -417,6 +430,6 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEfl);
 };
 
-} // namespace content
+}  // namespace content
 
 #endif
index d0d33c45cc99ecbd470555bbc1787d765ccc676b..4756c5bbf9f55348ea58b94f1321515c0aecdeca 100644 (file)
@@ -8,12 +8,12 @@
 
 #include <Ecore.h>
 
-#include "base/time/time.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/time/time.h"
 #include "ui/display/screen.h"
 #include "ui/events/event_utils.h"
-#include "ui/events/keycodes/keyboard_codes.h"
 #include "ui/events/keycodes/keyboard_code_conversion_x.h"
+#include "ui/events/keycodes/keyboard_codes.h"
 
 using namespace blink;
 
@@ -23,249 +23,252 @@ namespace {
 
 static const float kDefaultScrollStep = 20;
 
-static void TranslateEvasCoordToWebKitCoord(Evas_Object *web_view, int& x, int& y) {
+static void TranslateEvasCoordToWebKitCoord(Evas_Object* web_view,
+                                            blink::WebPoint* point) {
   Evas_Coord tmpX, tmpY;
   evas_object_geometry_get(web_view, &tmpX, &tmpY, 0, 0);
-  x -= tmpX;
-  y -= tmpY;
+  point->x -= tmpX;
+  point->y -= tmpY;
 }
 
 float GetDeviceScaleFactor() {
   static float device_scale_factor = 0.0f;
   if (!device_scale_factor) {
-    device_scale_factor = display::Screen::GetScreen()->
-        GetPrimaryDisplay().device_scale_factor();
+    device_scale_factor =
+        display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
   }
   return device_scale_factor;
 }
 
-inline bool string_ends_with(std::string const & value, std::string const & match) {
+inline bool string_ends_with(std::string const& value,
+                             std::string const& match) {
   if (match.size() > value.size()) {
     return false;
   }
   return std::equal(match.rbegin(), match.rend(), value.rbegin());
 }
 
-inline bool string_starts_with(std::string const & value, std::string const & match) {
+inline bool string_starts_with(std::string const& value,
+                               std::string const& match) {
   if (match.size() > value.size()) {
     return false;
   }
   return std::equal(match.begin(), match.end(), value.begin());
 }
 
-static ui::KeyboardCode WindowsKeyCodeFromEflKey(const char* key) {
-  static std::unordered_map<std::string,ui::KeyboardCode> code_from_key_map ({
-    {"Shift_L", ui::VKEY_LSHIFT},
-    {"Shift_R", ui::VKEY_RSHIFT},
-    {"Control_L", ui::VKEY_LCONTROL},
-    {"Control_R", ui::VKEY_RCONTROL},
-    {"Alt_L", ui::VKEY_LMENU},
-    {"Alt_R", ui::VKEY_RMENU},
-    {"Meta_L", ui::VKEY_LMENU},
-    {"Meta_R", ui::VKEY_RMENU},
-
-    // comes from KeyboardCodeFromXKeysym
-    {"BackSpace", ui::VKEY_BACK},
-    {"Delete", ui::VKEY_DELETE},
-    {"Tab", ui::VKEY_TAB},
-    {"Return", ui::VKEY_RETURN},
-    {"KP_Enter", ui::VKEY_RETURN},
-    {"Clear", ui::VKEY_CLEAR},
-    {"space", ui::VKEY_SPACE},
-    {"Home", ui::VKEY_HOME},
-    {"KP_Home", ui::VKEY_HOME},
-    {"End", ui::VKEY_END},
-    {"KP_End", ui::VKEY_END},
-    {"Prior", ui::VKEY_PRIOR},
-    {"KP_Prior", ui::VKEY_PRIOR},
-    {"Next", ui::VKEY_NEXT},
-    {"KP_Next", ui::VKEY_NEXT},
-    {"Left", ui::VKEY_LEFT},
-    {"KP_Left", ui::VKEY_LEFT},
-    {"Right", ui::VKEY_RIGHT},
-    {"KP_Right", ui::VKEY_RIGHT},
-    {"Down", ui::VKEY_DOWN},
-    {"KP_Down", ui::VKEY_DOWN},
-    {"Up", ui::VKEY_UP},
-    {"KP_Up", ui::VKEY_UP},
-    {"Escape", ui::VKEY_ESCAPE},
-    {"Kana_Lock", ui::VKEY_KANA},
-    {"Kana_Shift", ui::VKEY_KANA},
-    {"Hangul", ui::VKEY_HANGUL},
-    {"Hangul_Hanja", ui::VKEY_HANJA},
-    {"Kanji", ui::VKEY_KANJI},
-    {"Henkan", ui::VKEY_CONVERT},
-    {"Muhenkan", ui::VKEY_NONCONVERT},
-    {"Zenkaku_Hankaku", ui::VKEY_DBE_DBCSCHAR},
-    {"KP_0", ui::VKEY_NUMPAD0},
-    {"KP_1", ui::VKEY_NUMPAD1},
-    {"KP_2", ui::VKEY_NUMPAD2},
-    {"KP_3", ui::VKEY_NUMPAD3},
-    {"KP_4", ui::VKEY_NUMPAD4},
-    {"KP_5", ui::VKEY_NUMPAD5},
-    {"KP_6", ui::VKEY_NUMPAD6},
-    {"KP_7", ui::VKEY_NUMPAD7},
-    {"KP_8", ui::VKEY_NUMPAD8},
-    {"KP_9", ui::VKEY_NUMPAD9},
-    {"KP_Multiply", ui::VKEY_MULTIPLY},
-    {"KP_Add", ui::VKEY_ADD},
-    {"KP_Separator", ui::VKEY_SEPARATOR},
-    {"KP_Subtract", ui::VKEY_SUBTRACT},
-    {"KP_Decimal", ui::VKEY_DECIMAL},
-    {"KP_Divide", ui::VKEY_DIVIDE},
-
-    {"ISO_Level5_Shift", ui::VKEY_OEM_8},
-    {"ISO_Level3_Shift", ui::VKEY_ALTGR},
-    {"Mode_switch", ui::VKEY_ALTGR},
-    {"Multi_key", ui::VKEY_COMPOSE},
-    {"Pause", ui::VKEY_PAUSE},
-    {"Caps_Lock", ui::VKEY_CAPITAL},
-    {"Num_Lock", ui::VKEY_NUMLOCK},
-    {"Scroll_Lock", ui::VKEY_SCROLL},
-    {"Select", ui::VKEY_SELECT},
-    {"Print", ui::VKEY_PRINT},
-    {"Execute", ui::VKEY_EXECUTE},
-    {"Insert", ui::VKEY_INSERT},
-    {"KP_Insert", ui::VKEY_INSERT},
-    {"Help", ui::VKEY_HELP},
-    {"Super_L", ui::VKEY_LWIN},
-    {"Super_R", ui::VKEY_RWIN},
-    {"Menu", ui::VKEY_APPS},
-    {"F1", ui::VKEY_F1},
-    {"KP_F1", ui::VKEY_F1},
-    {"F2", ui::VKEY_F2},
-    {"KP_F2", ui::VKEY_F2},
-    {"F3", ui::VKEY_F3},
-    {"KP_F3", ui::VKEY_F3},
-    {"F4", ui::VKEY_F4},
-    {"KP_F4", ui::VKEY_F4},
-    {"F5", ui::VKEY_F5},
-    {"F6", ui::VKEY_F6},
-    {"F7", ui::VKEY_F7},
-    {"F8", ui::VKEY_F8},
-    {"F9", ui::VKEY_F9},
-    {"F10", ui::VKEY_F10},
-    {"F11", ui::VKEY_F11},
-    {"F12", ui::VKEY_F12},
-    {"F13", ui::VKEY_F13},
-    {"F14", ui::VKEY_F14},
-    {"F15", ui::VKEY_F15},
-    {"F16", ui::VKEY_F16},
-    {"F17", ui::VKEY_F17},
-    {"F18", ui::VKEY_F18},
-    {"F19", ui::VKEY_F19},
-    {"F20", ui::VKEY_F20},
-    {"F21", ui::VKEY_F21},
-    {"F22", ui::VKEY_F22},
-    {"F23", ui::VKEY_F23},
-    {"F24", ui::VKEY_F24},
-    {"guillemotleft", ui::VKEY_OEM_102},
-    {"guillemotright", ui::VKEY_OEM_102},
-    {"degree", ui::VKEY_OEM_102},
-    {"ugrave", ui::VKEY_OEM_102},
-    {"Ugrave", ui::VKEY_OEM_102},
-    {"brokenbar", ui::VKEY_OEM_102},
-    {"XF86Back", ui::VKEY_BROWSER_BACK},
-    {"XF86Forward", ui::VKEY_BROWSER_FORWARD},
-    {"XF86Reload", ui::VKEY_BROWSER_REFRESH},
-    {"XF86Stop", ui::VKEY_BROWSER_STOP},
-    {"XF86Search", ui::VKEY_BROWSER_SEARCH},
-    {"XF86Favorites", ui::VKEY_BROWSER_FAVORITES},
-    {"XF86HomePage", ui::VKEY_BROWSER_HOME},
-    {"XF86AudioMute", ui::VKEY_VOLUME_MUTE},
-    {"XF86AudioLowerVolume", ui::VKEY_VOLUME_DOWN},
-    {"XF86AudioRaiseVolume", ui::VKEY_VOLUME_UP},
-    {"XF86AudioNext", ui::VKEY_MEDIA_NEXT_TRACK},
-    {"XF86AudioPrev", ui::VKEY_MEDIA_PREV_TRACK},
-    {"XF86AudioStop", ui::VKEY_MEDIA_STOP},
-    {"XF86AudioPlay", ui::VKEY_MEDIA_PLAY_PAUSE},
-    {"XF86Mail", ui::VKEY_MEDIA_LAUNCH_MAIL},
-    {"XF86LaunchA", ui::VKEY_MEDIA_LAUNCH_APP1},
-    {"XF86LaunchB", ui::VKEY_MEDIA_LAUNCH_APP2},
-    {"XF86Calculator", ui::VKEY_MEDIA_LAUNCH_APP2},
-    {"XF86WLAN", ui::VKEY_WLAN},
-    {"XF86PowerOff", ui::VKEY_POWER},
-    {"XF86Sleep", ui::VKEY_SLEEP},
-    {"XF86MonBrightnessDown", ui::VKEY_BRIGHTNESS_DOWN},
-    {"XF86MonBrightnessUp", ui::VKEY_BRIGHTNESS_UP},
-    {"XF86KbdBrightnessDown", ui::VKEY_KBD_BRIGHTNESS_DOWN},
-    {"XF86KbdBrightnessUp", ui::VKEY_KBD_BRIGHTNESS_UP},
-
-    //XXX: it won't work on all keyboard layouts
-    {"comma", ui::VKEY_OEM_COMMA},
-    {"less", ui::VKEY_OEM_COMMA},
-    {"minus", ui::VKEY_OEM_MINUS},
-    {"underscore", ui::VKEY_OEM_MINUS},
-    {"greater", ui::VKEY_OEM_PERIOD},
-    {"period", ui::VKEY_OEM_PERIOD},
-    {"semicolon", ui::VKEY_OEM_1},
-    {"colon", ui::VKEY_OEM_1},
-    {"question", ui::VKEY_OEM_2},
-    {"slash", ui::VKEY_OEM_2},
-    {"asciitilde", ui::VKEY_OEM_3},
-    {"quoteleft", ui::VKEY_OEM_3},
-    {"bracketleft", ui::VKEY_OEM_4},
-    {"braceleft", ui::VKEY_OEM_4},
-    {"backslash", ui::VKEY_OEM_5},
-    {"bar", ui::VKEY_OEM_5},
-    {"bracketright", ui::VKEY_OEM_6},
-    {"braceright", ui::VKEY_OEM_6},
-    {"quoteright", ui::VKEY_OEM_7},
-    {"quotedbl", ui::VKEY_OEM_7},
-
-    //XXX: handle accents and other characters
-    {"a", ui::VKEY_A},
-    {"A", ui::VKEY_A},
-    {"b", ui::VKEY_B},
-    {"B", ui::VKEY_B},
-    {"c", ui::VKEY_C},
-    {"C", ui::VKEY_C},
-    {"d", ui::VKEY_D},
-    {"D", ui::VKEY_D},
-    {"e", ui::VKEY_E},
-    {"E", ui::VKEY_E},
-    {"f", ui::VKEY_F},
-    {"F", ui::VKEY_F},
-    {"g", ui::VKEY_G},
-    {"G", ui::VKEY_G},
-    {"h", ui::VKEY_H},
-    {"H", ui::VKEY_H},
-    {"i", ui::VKEY_I},
-    {"I", ui::VKEY_I},
-    {"j", ui::VKEY_J},
-    {"J", ui::VKEY_J},
-    {"k", ui::VKEY_K},
-    {"K", ui::VKEY_K},
-    {"l", ui::VKEY_L},
-    {"L", ui::VKEY_L},
-    {"m", ui::VKEY_M},
-    {"M", ui::VKEY_M},
-    {"n", ui::VKEY_N},
-    {"N", ui::VKEY_N},
-    {"o", ui::VKEY_O},
-    {"O", ui::VKEY_O},
-    {"p", ui::VKEY_P},
-    {"P", ui::VKEY_P},
-    {"q", ui::VKEY_Q},
-    {"Q", ui::VKEY_Q},
-    {"r", ui::VKEY_R},
-    {"R", ui::VKEY_R},
-    {"s", ui::VKEY_S},
-    {"S", ui::VKEY_S},
-    {"t", ui::VKEY_T},
-    {"T", ui::VKEY_T},
-    {"u", ui::VKEY_U},
-    {"U", ui::VKEY_U},
-    {"v", ui::VKEY_V},
-    {"V", ui::VKEY_V},
-    {"w", ui::VKEY_W},
-    {"W", ui::VKEY_W},
-    {"x", ui::VKEY_X},
-    {"X", ui::VKEY_X},
-    {"y", ui::VKEY_Y},
-    {"Y", ui::VKEY_Y},
-    {"z", ui::VKEY_Z},
-    {"Z", ui::VKEY_Z},
+static ui::KeyboardCode windows_key_codeFromEflKey(const char* key) {
+  static std::unordered_map<std::string, ui::KeyboardCode> code_from_key_map({
+      {"Shift_L", ui::VKEY_LSHIFT},
+      {"Shift_R", ui::VKEY_RSHIFT},
+      {"Control_L", ui::VKEY_LCONTROL},
+      {"Control_R", ui::VKEY_RCONTROL},
+      {"Alt_L", ui::VKEY_LMENU},
+      {"Alt_R", ui::VKEY_RMENU},
+      {"Meta_L", ui::VKEY_LMENU},
+      {"Meta_R", ui::VKEY_RMENU},
+
+      // comes from KeyboardCodeFromXKeysym
+      {"BackSpace", ui::VKEY_BACK},
+      {"Delete", ui::VKEY_DELETE},
+      {"Tab", ui::VKEY_TAB},
+      {"Return", ui::VKEY_RETURN},
+      {"KP_Enter", ui::VKEY_RETURN},
+      {"Clear", ui::VKEY_CLEAR},
+      {"space", ui::VKEY_SPACE},
+      {"Home", ui::VKEY_HOME},
+      {"KP_Home", ui::VKEY_HOME},
+      {"End", ui::VKEY_END},
+      {"KP_End", ui::VKEY_END},
+      {"Prior", ui::VKEY_PRIOR},
+      {"KP_Prior", ui::VKEY_PRIOR},
+      {"Next", ui::VKEY_NEXT},
+      {"KP_Next", ui::VKEY_NEXT},
+      {"Left", ui::VKEY_LEFT},
+      {"KP_Left", ui::VKEY_LEFT},
+      {"Right", ui::VKEY_RIGHT},
+      {"KP_Right", ui::VKEY_RIGHT},
+      {"Down", ui::VKEY_DOWN},
+      {"KP_Down", ui::VKEY_DOWN},
+      {"Up", ui::VKEY_UP},
+      {"KP_Up", ui::VKEY_UP},
+      {"Escape", ui::VKEY_ESCAPE},
+      {"Kana_Lock", ui::VKEY_KANA},
+      {"Kana_Shift", ui::VKEY_KANA},
+      {"Hangul", ui::VKEY_HANGUL},
+      {"Hangul_Hanja", ui::VKEY_HANJA},
+      {"Kanji", ui::VKEY_KANJI},
+      {"Henkan", ui::VKEY_CONVERT},
+      {"Muhenkan", ui::VKEY_NONCONVERT},
+      {"Zenkaku_Hankaku", ui::VKEY_DBE_DBCSCHAR},
+      {"KP_0", ui::VKEY_NUMPAD0},
+      {"KP_1", ui::VKEY_NUMPAD1},
+      {"KP_2", ui::VKEY_NUMPAD2},
+      {"KP_3", ui::VKEY_NUMPAD3},
+      {"KP_4", ui::VKEY_NUMPAD4},
+      {"KP_5", ui::VKEY_NUMPAD5},
+      {"KP_6", ui::VKEY_NUMPAD6},
+      {"KP_7", ui::VKEY_NUMPAD7},
+      {"KP_8", ui::VKEY_NUMPAD8},
+      {"KP_9", ui::VKEY_NUMPAD9},
+      {"KP_Multiply", ui::VKEY_MULTIPLY},
+      {"KP_Add", ui::VKEY_ADD},
+      {"KP_Separator", ui::VKEY_SEPARATOR},
+      {"KP_Subtract", ui::VKEY_SUBTRACT},
+      {"KP_Decimal", ui::VKEY_DECIMAL},
+      {"KP_Divide", ui::VKEY_DIVIDE},
+
+      {"ISO_Level5_Shift", ui::VKEY_OEM_8},
+      {"ISO_Level3_Shift", ui::VKEY_ALTGR},
+      {"Mode_switch", ui::VKEY_ALTGR},
+      {"Multi_key", ui::VKEY_COMPOSE},
+      {"Pause", ui::VKEY_PAUSE},
+      {"Caps_Lock", ui::VKEY_CAPITAL},
+      {"Num_Lock", ui::VKEY_NUMLOCK},
+      {"Scroll_Lock", ui::VKEY_SCROLL},
+      {"Select", ui::VKEY_SELECT},
+      {"Print", ui::VKEY_PRINT},
+      {"Execute", ui::VKEY_EXECUTE},
+      {"Insert", ui::VKEY_INSERT},
+      {"KP_Insert", ui::VKEY_INSERT},
+      {"Help", ui::VKEY_HELP},
+      {"Super_L", ui::VKEY_LWIN},
+      {"Super_R", ui::VKEY_RWIN},
+      {"Menu", ui::VKEY_APPS},
+      {"F1", ui::VKEY_F1},
+      {"KP_F1", ui::VKEY_F1},
+      {"F2", ui::VKEY_F2},
+      {"KP_F2", ui::VKEY_F2},
+      {"F3", ui::VKEY_F3},
+      {"KP_F3", ui::VKEY_F3},
+      {"F4", ui::VKEY_F4},
+      {"KP_F4", ui::VKEY_F4},
+      {"F5", ui::VKEY_F5},
+      {"F6", ui::VKEY_F6},
+      {"F7", ui::VKEY_F7},
+      {"F8", ui::VKEY_F8},
+      {"F9", ui::VKEY_F9},
+      {"F10", ui::VKEY_F10},
+      {"F11", ui::VKEY_F11},
+      {"F12", ui::VKEY_F12},
+      {"F13", ui::VKEY_F13},
+      {"F14", ui::VKEY_F14},
+      {"F15", ui::VKEY_F15},
+      {"F16", ui::VKEY_F16},
+      {"F17", ui::VKEY_F17},
+      {"F18", ui::VKEY_F18},
+      {"F19", ui::VKEY_F19},
+      {"F20", ui::VKEY_F20},
+      {"F21", ui::VKEY_F21},
+      {"F22", ui::VKEY_F22},
+      {"F23", ui::VKEY_F23},
+      {"F24", ui::VKEY_F24},
+      {"guillemotleft", ui::VKEY_OEM_102},
+      {"guillemotright", ui::VKEY_OEM_102},
+      {"degree", ui::VKEY_OEM_102},
+      {"ugrave", ui::VKEY_OEM_102},
+      {"Ugrave", ui::VKEY_OEM_102},
+      {"brokenbar", ui::VKEY_OEM_102},
+      {"XF86Back", ui::VKEY_BROWSER_BACK},
+      {"XF86Forward", ui::VKEY_BROWSER_FORWARD},
+      {"XF86Reload", ui::VKEY_BROWSER_REFRESH},
+      {"XF86Stop", ui::VKEY_BROWSER_STOP},
+      {"XF86Search", ui::VKEY_BROWSER_SEARCH},
+      {"XF86Favorites", ui::VKEY_BROWSER_FAVORITES},
+      {"XF86HomePage", ui::VKEY_BROWSER_HOME},
+      {"XF86AudioMute", ui::VKEY_VOLUME_MUTE},
+      {"XF86AudioLowerVolume", ui::VKEY_VOLUME_DOWN},
+      {"XF86AudioRaiseVolume", ui::VKEY_VOLUME_UP},
+      {"XF86AudioNext", ui::VKEY_MEDIA_NEXT_TRACK},
+      {"XF86AudioPrev", ui::VKEY_MEDIA_PREV_TRACK},
+      {"XF86AudioStop", ui::VKEY_MEDIA_STOP},
+      {"XF86AudioPlay", ui::VKEY_MEDIA_PLAY_PAUSE},
+      {"XF86Mail", ui::VKEY_MEDIA_LAUNCH_MAIL},
+      {"XF86LaunchA", ui::VKEY_MEDIA_LAUNCH_APP1},
+      {"XF86LaunchB", ui::VKEY_MEDIA_LAUNCH_APP2},
+      {"XF86Calculator", ui::VKEY_MEDIA_LAUNCH_APP2},
+      {"XF86WLAN", ui::VKEY_WLAN},
+      {"XF86PowerOff", ui::VKEY_POWER},
+      {"XF86Sleep", ui::VKEY_SLEEP},
+      {"XF86MonBrightnessDown", ui::VKEY_BRIGHTNESS_DOWN},
+      {"XF86MonBrightnessUp", ui::VKEY_BRIGHTNESS_UP},
+      {"XF86KbdBrightnessDown", ui::VKEY_KBD_BRIGHTNESS_DOWN},
+      {"XF86KbdBrightnessUp", ui::VKEY_KBD_BRIGHTNESS_UP},
+
+      // XXX: it won't work on all keyboard layouts
+      {"comma", ui::VKEY_OEM_COMMA},
+      {"less", ui::VKEY_OEM_COMMA},
+      {"minus", ui::VKEY_OEM_MINUS},
+      {"underscore", ui::VKEY_OEM_MINUS},
+      {"greater", ui::VKEY_OEM_PERIOD},
+      {"period", ui::VKEY_OEM_PERIOD},
+      {"semicolon", ui::VKEY_OEM_1},
+      {"colon", ui::VKEY_OEM_1},
+      {"question", ui::VKEY_OEM_2},
+      {"slash", ui::VKEY_OEM_2},
+      {"asciitilde", ui::VKEY_OEM_3},
+      {"quoteleft", ui::VKEY_OEM_3},
+      {"bracketleft", ui::VKEY_OEM_4},
+      {"braceleft", ui::VKEY_OEM_4},
+      {"backslash", ui::VKEY_OEM_5},
+      {"bar", ui::VKEY_OEM_5},
+      {"bracketright", ui::VKEY_OEM_6},
+      {"braceright", ui::VKEY_OEM_6},
+      {"quoteright", ui::VKEY_OEM_7},
+      {"quotedbl", ui::VKEY_OEM_7},
+
+      // XXX: handle accents and other characters
+      {"a", ui::VKEY_A},
+      {"A", ui::VKEY_A},
+      {"b", ui::VKEY_B},
+      {"B", ui::VKEY_B},
+      {"c", ui::VKEY_C},
+      {"C", ui::VKEY_C},
+      {"d", ui::VKEY_D},
+      {"D", ui::VKEY_D},
+      {"e", ui::VKEY_E},
+      {"E", ui::VKEY_E},
+      {"f", ui::VKEY_F},
+      {"F", ui::VKEY_F},
+      {"g", ui::VKEY_G},
+      {"G", ui::VKEY_G},
+      {"h", ui::VKEY_H},
+      {"H", ui::VKEY_H},
+      {"i", ui::VKEY_I},
+      {"I", ui::VKEY_I},
+      {"j", ui::VKEY_J},
+      {"J", ui::VKEY_J},
+      {"k", ui::VKEY_K},
+      {"K", ui::VKEY_K},
+      {"l", ui::VKEY_L},
+      {"L", ui::VKEY_L},
+      {"m", ui::VKEY_M},
+      {"M", ui::VKEY_M},
+      {"n", ui::VKEY_N},
+      {"N", ui::VKEY_N},
+      {"o", ui::VKEY_O},
+      {"O", ui::VKEY_O},
+      {"p", ui::VKEY_P},
+      {"P", ui::VKEY_P},
+      {"q", ui::VKEY_Q},
+      {"Q", ui::VKEY_Q},
+      {"r", ui::VKEY_R},
+      {"R", ui::VKEY_R},
+      {"s", ui::VKEY_S},
+      {"S", ui::VKEY_S},
+      {"t", ui::VKEY_T},
+      {"T", ui::VKEY_T},
+      {"u", ui::VKEY_U},
+      {"U", ui::VKEY_U},
+      {"v", ui::VKEY_V},
+      {"V", ui::VKEY_V},
+      {"w", ui::VKEY_W},
+      {"W", ui::VKEY_W},
+      {"x", ui::VKEY_X},
+      {"X", ui::VKEY_X},
+      {"y", ui::VKEY_Y},
+      {"Y", ui::VKEY_Y},
+      {"z", ui::VKEY_Z},
+      {"Z", ui::VKEY_Z},
   });
 
   auto uicode = code_from_key_map.find(key);
@@ -278,11 +281,11 @@ static ui::KeyboardCode WindowsKeyCodeFromEflKey(const char* key) {
 
 static int ModifiersFromEflKey(const char* key) {
   if (string_ends_with(key, "_L")) {
-    return  WebInputEvent::IsLeft;
+    return WebInputEvent::kIsLeft;
   } else if (string_ends_with(key, "_R")) {
-    return  WebInputEvent::IsRight;
+    return WebInputEvent::kIsRight;
   } else if (string_starts_with(key, "KP_")) {
-    return  WebInputEvent::IsKeyPad;
+    return WebInputEvent::kIsKeyPad;
   }
   return 0;
 }
@@ -300,8 +303,7 @@ static int CharacterFromEflString(const char* string) {
 // From
 // third_party/blink/Source/blink/chromium/src/gtk/WebInputEventFactory.cpp:
 static blink::WebUChar GetControlCharacter(int windows_key_code, bool shift) {
-  if (windows_key_code >= ui::VKEY_A &&
-    windows_key_code <= ui::VKEY_Z) {
+  if (windows_key_code >= ui::VKEY_A && windows_key_code <= ui::VKEY_Z) {
     // ctrl-A ~ ctrl-Z map to \x01 ~ \x1A
     return windows_key_code - ui::VKEY_A + 1;
   }
@@ -343,122 +345,105 @@ static blink::WebUChar GetControlCharacter(int windows_key_code, bool shift) {
   return 0;
 }
 
-enum {
-  LeftButton = 1,
-  MiddleButton = 2,
-  RightButton = 3
-};
+enum { LeftButton = 1, MiddleButton = 2, RightButton = 3 };
 
-static  WebMouseEvent::Button EvasToWebMouseButton(int button) {
+static WebMouseEvent::Button EvasToWebMouseButton(int button) {
   if (button == LeftButton)
-    return WebMouseEvent::ButtonLeft;
+    return WebMouseEvent::Button::kLeft;
   if (button == MiddleButton)
-    return WebMouseEvent::ButtonMiddle;
+    return WebMouseEvent::Button::kMiddle;
   if (button == RightButton)
-    return WebMouseEvent::ButtonRight;
+    return WebMouseEvent::Button::kRight;
 
-  return WebMouseEvent::ButtonNone;
+  return WebMouseEvent::Button::kNoButton;
 }
 
-static WebInputEvent::Modifiers EvasToWebModifiers(const Evas_Modifier* modifiers) {
+static WebInputEvent::Modifiers EvasToWebModifiers(
+    const Evas_Modifier* modifiers) {
   unsigned result = 0;
 
   if (evas_key_modifier_is_set(modifiers, "Shift"))
-    result |= WebInputEvent::ShiftKey;
+    result |= WebInputEvent::kShiftKey;
   if (evas_key_modifier_is_set(modifiers, "Control"))
-    result |= WebInputEvent::ControlKey;
+    result |= WebInputEvent::kControlKey;
   if (evas_key_modifier_is_set(modifiers, "Alt"))
-    result |= WebInputEvent::AltKey;
+    result |= WebInputEvent::kAltKey;
   if (evas_key_modifier_is_set(modifiers, "Meta"))
-    result |= WebInputEvent::MetaKey;
+    result |= WebInputEvent::kMetaKey;
 
   return static_cast<WebInputEvent::Modifiers>(result);
 }
 
-} // namespace
+}  // namespace
 
 template <class EVT>
 blink::WebMouseEvent MakeWebMouseEvent(WebInputEvent::Type type,
-    Evas_Object* view, const EVT* ev) {
-
-  WebMouseEvent event;
-  event.timeStampSeconds = (double)ev->timestamp / 1000;
-  event.button = EvasToWebMouseButton(ev->button);
-  event.modifiers = EvasToWebModifiers(ev->modifiers);
-
+                                       Evas_Object* view,
+                                       const EVT* ev) {
   const float sf = GetDeviceScaleFactor();
-  event.windowX = ev->canvas.x / sf;
-  event.windowY = ev->canvas.y / sf;
-
-  TranslateEvasCoordToWebKitCoord(view, event.windowX, event.windowY);
-
-  event.x = event.windowX;
-  event.y = event.windowY;
-
+  blink::WebPoint point(ev->canvas.x / sf, ev->canvas.y / sf);
+  TranslateEvasCoordToWebKitCoord(view, &point);
   Evas* evas = evas_object_evas_get(view);
-  event.globalX = evas_coord_world_x_to_screen(evas, ev->canvas.x) / sf;
-  event.globalY = evas_coord_world_y_to_screen(evas, ev->canvas.y) / sf;
-  event.type = type;
 
-  event.clickCount = 1;
+  WebMouseEvent event(
+      type, WebFloatPoint(point.x, point.y),
+      WebFloatPoint(evas_coord_world_x_to_screen(evas, ev->canvas.x) / sf,
+                    evas_coord_world_y_to_screen(evas, ev->canvas.y) / sf),
+      EvasToWebMouseButton(ev->button), 1, EvasToWebModifiers(ev->modifiers),
+      (double)ev->timestamp / 1000);
 
   return event;
 }
 
 template blink::WebMouseEvent MakeWebMouseEvent<Evas_Event_Mouse_Down>(
-    WebInputEvent::Type, Evas_Object*, const Evas_Event_Mouse_Down*);
+    WebInputEvent::Type,
+    Evas_Object*,
+    const Evas_Event_Mouse_Down*);
 template blink::WebMouseEvent MakeWebMouseEvent<Evas_Event_Mouse_Up>(
-    WebInputEvent::Type, Evas_Object*, const Evas_Event_Mouse_Up*);
+    WebInputEvent::Type,
+    Evas_Object*,
+    const Evas_Event_Mouse_Up*);
 
 blink::WebMouseEvent MakeWebMouseEvent(Evas_Object* view,
-    const Evas_Event_Mouse_Move* ev) {
-  WebMouseEvent event;
-  event.timeStampSeconds = (double)ev->timestamp / 1000;
-  event.modifiers = EvasToWebModifiers(ev->modifiers);
+                                       const Evas_Event_Mouse_Move* ev) {
+  WebMouseEvent event(WebInputEvent::kMouseMove,
+                      EvasToWebModifiers(ev->modifiers),
+                      (double)ev->timestamp / 1000);
 
   const float sf = GetDeviceScaleFactor();
-  event.windowX = ev->cur.canvas.x / sf;
-  event.windowY = ev->cur.canvas.y / sf;
-
-  TranslateEvasCoordToWebKitCoord(view, event.windowX, event.windowY);
-
-  event.x = event.windowX;
-  event.y = event.windowY;
+  blink::WebPoint point(ev->cur.canvas.x / sf, ev->cur.canvas.y / sf);
+  TranslateEvasCoordToWebKitCoord(view, &point);
 
   Evas* evas = evas_object_evas_get(view);
-  event.globalX = evas_coord_world_x_to_screen(evas, ev->cur.canvas.x) / sf;
-  event.globalY = evas_coord_world_y_to_screen(evas, ev->cur.canvas.y) / sf;
-  event.type = WebInputEvent::MouseMove;
+  event.SetPositionInScreen(
+      evas_coord_world_x_to_screen(evas, ev->cur.canvas.x) / sf,
+      evas_coord_world_y_to_screen(evas, ev->cur.canvas.y) / sf);
+  event.SetPositionInWidget(point.x, point.y);
 
   return event;
 }
 
-blink::WebMouseWheelEvent MakeWebMouseEvent(
-    Evas_Object* view, const Evas_Event_Mouse_Wheel* ev) {
-  WebMouseWheelEvent event;
-  event.timeStampSeconds = (double)ev->timestamp / 1000;
-  event.modifiers = EvasToWebModifiers(ev->modifiers);
+blink::WebMouseWheelEvent MakeWebMouseEvent(Evas_Object* view,
+                                            const Evas_Event_Mouse_Wheel* ev) {
+  WebMouseWheelEvent event(WebInputEvent::kMouseWheel,
+                           EvasToWebModifiers(ev->modifiers),
+                           (double)ev->timestamp / 1000);
 
   const float sf = GetDeviceScaleFactor();
-  event.windowX = (ev->canvas.x) / sf;
-  event.windowY = (ev->canvas.y) / sf;
-
-  TranslateEvasCoordToWebKitCoord(view, event.windowX, event.windowY);
-
-  event.x = event.windowX;
-  event.y = event.windowY;
+  blink::WebPoint point((ev->canvas.x) / sf, (ev->canvas.y) / sf);
+  TranslateEvasCoordToWebKitCoord(view, &point);
 
   Evas* evas = evas_object_evas_get(view);
-  event.globalX = evas_coord_world_x_to_screen(evas, ev->canvas.x) / sf;
-  event.globalY = evas_coord_world_y_to_screen(evas, ev->canvas.y) / sf;
-  event.type = WebInputEvent::MouseWheel;
+  event.SetPositionInScreen(
+      evas_coord_world_x_to_screen(evas, ev->canvas.x) / sf,
+      evas_coord_world_y_to_screen(evas, ev->canvas.y) / sf);
 
   if (ev->direction) {
-    event.wheelTicksX = ev->z;
-    event.deltaX = ev->z * kDefaultScrollStep;
+    event.wheel_ticks_x = ev->z;
+    event.delta_x = ev->z * kDefaultScrollStep;
   } else {
-    event.wheelTicksY = -(ev->z);
-    event.deltaY = -(ev->z * kDefaultScrollStep);
+    event.wheel_ticks_y = -(ev->z);
+    event.delta_y = -(ev->z * kDefaultScrollStep);
   }
 
   return event;
@@ -466,42 +451,38 @@ blink::WebMouseWheelEvent MakeWebMouseEvent(
 
 template <class EVT>
 NativeWebKeyboardEvent MakeWebKeyboardEvent(bool pressed, const EVT* evt) {
+  NativeWebKeyboardEvent event(
+      pressed ? WebInputEvent::kKeyDown : WebInputEvent::kKeyUp,
+      ModifiersFromEflKey(evt->key), (double)evt->timestamp / 1000);
 
-  NativeWebKeyboardEvent event;
-  event.timeStampSeconds =  (double)evt->timestamp / 1000;
-  event.modifiers = EvasToWebModifiers(evt->modifiers);
-  event.type = pressed ? WebInputEvent::KeyDown : WebInputEvent::KeyUp;
+  event.native_key_code = evt->keycode;
+  event.windows_key_code = windows_key_codeFromEflKey(evt->key);
 
-  event.nativeKeyCode = evt->keycode;
-  event.windowsKeyCode = WindowsKeyCodeFromEflKey(evt->key);
-  event.modifiers = ModifiersFromEflKey(evt->key);
-
-  if (event.windowsKeyCode == ui::VKEY_RETURN) {
-      event.unmodifiedText[0] = '\r';
+  if (event.windows_key_code == ui::VKEY_RETURN) {
+    event.unmodified_text[0] = '\r';
   } else {
-    event.unmodifiedText[0] = CharacterFromEflString(evt->string);
+    event.unmodified_text[0] = CharacterFromEflString(evt->string);
   }
 
-  if (event.modifiers & blink::WebInputEvent::ControlKey) {
-    event.text[0] =
-        GetControlCharacter(event.windowsKeyCode,
-            event.modifiers & blink::WebInputEvent::ShiftKey);
+  if (event.GetModifiers() & blink::WebInputEvent::kControlKey) {
+    event.text[0] = GetControlCharacter(
+        event.windows_key_code,
+        event.GetModifiers() & blink::WebInputEvent::kShiftKey);
   } else {
-    event.text[0] = event.unmodifiedText[0];
+    event.text[0] = event.unmodified_text[0];
   }
 
-  event.setKeyIdentifierFromWindowsKeyCode();
-
   return event;
 }
 
 template NativeWebKeyboardEvent MakeWebKeyboardEvent(
-    bool, const Evas_Event_Key_Down*);
-template NativeWebKeyboardEvent MakeWebKeyboardEvent(
-    bool, const Evas_Event_Key_Up*);
+    bool,
+    const Evas_Event_Key_Down*);
+template NativeWebKeyboardEvent MakeWebKeyboardEvent(bool,
+                                                     const Evas_Event_Key_Up*);
 
 static ui::EventType EvasTouchEventTypeToUI(Evas_Touch_Point_State evas_touch) {
-  switch(evas_touch) {
+  switch (evas_touch) {
     case EVAS_TOUCH_POINT_DOWN:
       return ui::ET_TOUCH_PRESSED;
     case EVAS_TOUCH_POINT_MOVE:
@@ -511,7 +492,7 @@ static ui::EventType EvasTouchEventTypeToUI(Evas_Touch_Point_State evas_touch) {
     case EVAS_TOUCH_POINT_CANCEL:
       return ui::ET_TOUCH_CANCELLED;
     case EVAS_TOUCH_POINT_STILL:
-      // Not handled by chromium, should not be passed here.
+    // Not handled by chromium, should not be passed here.
     default:
       NOTREACHED();
       return ui::ET_UNKNOWN;
@@ -521,47 +502,60 @@ static ui::EventType EvasTouchEventTypeToUI(Evas_Touch_Point_State evas_touch) {
 bool IsHardwareBackKey(const Evas_Event_Key_Down* event) {
 #if defined(OS_TIZEN)
   return (strcmp(event->key, "XF86Back") == 0 ||
-      strcmp(event->key, "XF86Stop") == 0);
+          strcmp(event->key, "XF86Stop") == 0);
 #endif
   return (strcmp(event->key, "Escape") == 0);
 }
 
 ui::TouchEvent MakeTouchEvent(Evas_Coord_Point pt,
                               Evas_Touch_Point_State state,
-                              int id, Evas_Object* view,
+                              int id,
+                              Evas_Object* view,
                               unsigned int timestamp) {
-  TranslateEvasCoordToWebKitCoord(view, pt.x, pt.y);
+  blink::WebPoint point(pt.x, pt.y);
+  TranslateEvasCoordToWebKitCoord(view, &point);
+  pt.x = point.x;
+  pt.y = point.y;
+
   const float scale = GetDeviceScaleFactor();
-  base::TimeTicks event_timestamp =
-      base::TimeTicks::FromInternalValue(
-          timestamp * base::Time::kMicrosecondsPerMillisecond);
+  base::TimeTicks event_timestamp = base::TimeTicks::FromInternalValue(
+      timestamp * base::Time::kMicrosecondsPerMillisecond);
 
   if (timestamp == 0)
     event_timestamp = ui::EventTimeForNow();
+
+  // FIXME: M63 bring up. Fill up pointer details
   return ui::TouchEvent(EvasTouchEventTypeToUI(state),
-      gfx::Point(pt.x / scale, pt.y / scale), id, event_timestamp);
+                        gfx::Point(pt.x / scale, pt.y / scale), event_timestamp,
+                        ui::PointerDetails());
 }
 
 template WebGestureEvent MakeGestureEvent<Evas_Event_Mouse_Down>(
-    WebInputEvent::Type type, Evas_Object*, const Evas_Event_Mouse_Down* ev);
+    WebInputEvent::Type type,
+    Evas_Object*,
+    const Evas_Event_Mouse_Down* ev);
 template WebGestureEvent MakeGestureEvent<Evas_Event_Mouse_Up>(
-    WebInputEvent::Type type, Evas_Object*, const Evas_Event_Mouse_Up* ev);
+    WebInputEvent::Type type,
+    Evas_Object*,
+    const Evas_Event_Mouse_Up* ev);
 
 template <class EVT>
 WebGestureEvent MakeGestureEvent(WebInputEvent::Type type,
-    Evas_Object* view, const EVT* ev) {
+                                 Evas_Object* view,
+                                 const EVT* ev) {
+  WebGestureEvent event(type, EvasToWebModifiers(ev->modifiers),
+                        ev->timestamp / 1000);
 
-  WebGestureEvent event;
-  event.timeStampSeconds = ev->timestamp / 1000;
-  event.type = type;
-  event.sourceDevice = WebGestureDeviceTouchscreen;
+  event.source_device = kWebGestureDeviceTouchscreen;
 
   const float sf = GetDeviceScaleFactor();
-  event.x = ev->canvas.x / sf;
-  event.y = ev->canvas.y / sf;
+  blink::WebPoint point(ev->canvas.x / sf, ev->canvas.y / sf);
+  TranslateEvasCoordToWebKitCoord(view, &point);
+
+  event.x = point.x;
+  event.y = point.y;
 
-  TranslateEvasCoordToWebKitCoord(view, event.x, event.y);
   return event;
 }
 
-}
+}  // namespace content
index 16965e94ef589e48afe5f19562c6d2e179c3bdbe..930378004642144bb29474b536fbd50bbff7dea5 100644 (file)
@@ -8,9 +8,9 @@
 #include <Evas.h>
 
 #include "content/browser/renderer_host/render_widget_host_impl.h"
-#include "content/public/browser/native_web_keyboard_event.h"
 #include "content/common/content_export.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "content/public/browser/native_web_keyboard_event.h"
+#include "third_party/blink/public/platform/web_input_event.h"
 #include "ui/events/event.h"
 
 namespace content {
index 5c989c041c950d4faa73d33aa0f4bda528fe3b64..b33169c38b08b2bf42d319d0ed0c11678c09c619 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "base/macros.h"
 #include "content/public/browser/screen_orientation_delegate.h"
-#include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
+#include "third_party/blink/public/platform/modules/screen_orientation/web_screen_orientation_lock_type.h"
 
 namespace content {
 
index a1d1f72bd06614fe5cad83129262a57bbe8996ff..5e31465513f3bd565a3899719168acfbb9432f61 100644 (file)
@@ -201,10 +201,18 @@ bool SelectionControllerEfl::ClearSelectionViaEWebView() {
     return false;
   }
 
-  RenderWidgetHostImpl* rwhi = static_cast<RenderWidgetHostImpl*>(
-      web_contents_.GetRenderViewHost()->GetWidget());
-  rwhi->ExecuteEditCommand("Unselect", "");
-  return true;
+  // RenderWidgetHostImpl* rwhi = static_cast<RenderWidgetHostImpl*>(
+  //    web_contents_.GetRenderViewHost()->GetWidget());
+  // rwhi->ExecuteEditCommand("Unselect", "");
+
+  RenderWidgetHostDelegate* host_delegate =
+      RenderWidgetHostImpl::From(web_contents_.GetRenderViewHost()->GetWidget())
+          ->delegate();
+  if (host_delegate) {
+    host_delegate->ExecuteEditCommand("Unselect", base::nullopt);
+    return true;
+  }
+  return false;
 }
 
 void SelectionControllerEfl::SetSelectionMode(enum SelectionMode mode) {
@@ -506,22 +514,23 @@ void SelectionControllerEfl::GetSelectionBounds(gfx::Rect* left,
 }
 
 void SelectionControllerEfl::HandleGesture(blink::WebGestureEvent& event) {
-  if (event.type == blink::WebInputEvent::GestureTap) {
+  blink::WebInputEvent::Type event_type = event.GetType();
+  if (event_type == blink::WebInputEvent::kGestureTap) {
     HandlePostponedGesture(event.x, event.y, ui::ET_GESTURE_TAP);
-  } else if (event.type == blink::WebInputEvent::GestureShowPress) {
+  } else if (event_type == blink::WebInputEvent::kGestureShowPress) {
     HandlePostponedGesture(
         event.x, event.y, ui::ET_GESTURE_SHOW_PRESS);
-  } else if (event.type == blink::WebInputEvent::GestureLongPress) {
+  } else if (event_type == blink::WebInputEvent::kGestureLongPress) {
     HandlePostponedGesture(
         event.x, event.y, ui::ET_GESTURE_LONG_PRESS);
     long_mouse_press_ = true;
   }
 
-  if (event.type == blink::WebInputEvent::GestureScrollBegin ||
-      event.type == blink::WebInputEvent::GesturePinchBegin) {
+  if (event_type == blink::WebInputEvent::kGestureScrollBegin ||
+      event_type == blink::WebInputEvent::kGesturePinchBegin) {
     SetControlsTemporarilyHidden(true);
-  } else if (event.type == blink::WebInputEvent::GestureScrollEnd ||
-             event.type == blink::WebInputEvent::GesturePinchEnd) {
+  } else if (event_type == blink::WebInputEvent::kGestureScrollEnd ||
+             event_type == blink::WebInputEvent::kGesturePinchEnd) {
     SetControlsTemporarilyHidden(false);
   }
 }
index ec9b4293adb82acc4d90fab0f05244e10f98ec8e..417c6d7ba9ec9f87666875a9a19809b1803aa01e 100644 (file)
 #include "content/browser/selection/selection_handle_efl.h"
 #include "content/browser/selection/selection_magnifier_efl.h"
 #include "content/common/content_export.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "third_party/blink/public/platform/web_gesture_event.h"
+#include "third_party/blink/public/platform/web_input_event.h"
 #include "ui/events/event_constants.h"
+#include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/range/range.h"
 #include "ui/gfx/selection_bound.h"
-#include "ui/gfx/geometry/rect.h"
 
 #if defined(OS_TIZEN)
 #include "vconf/vconf.h"
index 9017e4ace2ab2186048ebe934fe693408bb1f0b0..f9616e0c751d4a406bf9ad0534e8690db1f9f55f 100644 (file)
@@ -4,11 +4,11 @@
 
 #include "content/browser/tracing/tracing_controller_efl.h"
 
+#include "base/json/json_writer.h"
+#include "base/logging.h"
 #include "base/path_service.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_impl.h"
-#include "base/json/json_writer.h"
-#include "base/logging.h"
 #include "content/public/browser/tracing_controller.h"
 
 using namespace content;
@@ -29,11 +29,10 @@ std::string GenerateUniqueFilename() {
 #endif
 }
 
-} // namespace
+}  // namespace
 
 TracingControllerEfl::TracingControllerEfl()
-    : is_tracing_(false), weak_factory_(this) {
-}
+    : is_tracing_(false), weak_factory_(this) {}
 
 TracingControllerEfl& TracingControllerEfl::GetTraceController() {
   static TracingControllerEfl tracing_controller_efl;
@@ -76,7 +75,7 @@ void TracingControllerEfl::StopTracing() {
 
   base::FilePath file_path(trace_file_name_);
   if (!TracingController::GetInstance()->StopTracing(
-          TracingController::CreateFileSink(
+          ::TracingController::CreateFileEndpoint(
               file_path, base::Bind(&TracingControllerEfl::OnTracingStopped,
                                     weak_factory_.GetWeakPtr())))) {
     LOG(ERROR) << "Traces: Recording failed.";
index effc821c3466b00a285c5bbde685c6b44c6b7c69..7299ba923ec9cac6ef79fef2a0a09f5bbc8c9c43 100644 (file)
@@ -3,16 +3,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Ugly but effective hack to access WebContentsImpl internals.
-#define private protected
-#include "content/browser/web_contents/web_contents_impl.h"
-#undef private
-
 #include "content/browser/web_contents/web_contents_impl_efl.h"
 
+#include "base/metrics/user_metrics.h"
 #include "base/strings/utf_string_conversions.h"
-#include "content/public/common/content_client.h"
-#include "content/common/view_messages.h"
 #include "content/browser/browser_plugin/browser_plugin_guest.h"
 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/web_contents/web_contents_view.h"
+#include "content/common/view_messages.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_plugin_guest_manager.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/notification_types.h"
 #include "content/public/browser/storage_partition.h"
-#include "content/public/browser/user_metrics.h"
 #include "content/public/browser/web_contents_delegate.h"
 #include "content/public/browser/web_contents_efl_delegate.h"
-#include "content/public/common/browser_plugin_guest_mode.h"
+#include "content/public/common/content_client.h"
 #include "content/public/common/result_codes.h"
 
 // Majority of the code in this file was taken directly from
@@ -56,8 +50,8 @@
 //
 // All functions are called in a single sequence.
 //
-// In the oposite case, both ShouldCreateWebContentsAsync and WebContentsCreateAsyns
-// return true:
+// In the oposite case, both ShouldCreateWebContentsAsync and
+// WebContentsCreateAsyns return true:
 //
 // + WebContents::Impl::CreateNewWindow
 // ...
@@ -84,9 +78,7 @@ bool FindMatchingProcess(int render_process_id,
 
 WebContentsImplEfl::WebContentsImplEfl(BrowserContext* browser_context,
                                        void* platform_data)
-    : WebContentsImpl(browser_context)
-    , platform_data_(platform_data) {
-}
+    : WebContentsImpl(browser_context), platform_data_(platform_data) {}
 
 void WebContentsImplEfl::SetEflDelegate(WebContentsEflDelegate* delegate) {
   efl_delegate_.reset(delegate);
@@ -98,29 +90,17 @@ WebContents* WebContentsImplEfl::Clone() {
 }
 
 void WebContentsImplEfl::SetUserAgentOverride(const std::string& override) {
-  if (GetUserAgentOverride() == override)
-    return;
-
-  renderer_preferences_.user_agent_override = override;
-
-  // Send the new override string to the renderer.
-  RenderViewHost* host = GetRenderViewHost();
-  if (host)
-    host->SyncRendererPrefs();
-
-  // In chromium upstream, page is reloaded if a load is currently in progress.
-  // In chromium-efl port, the behaviour is different.
-
-  FOR_EACH_OBSERVER(WebContentsObserver, observers_,
-                    UserAgentOverrideSet(override));
+  WebContentsImplEfl::SetUserAgentOverride(override);
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
 void WebContentsImplEfl::CreateNewWindow(
     SiteInstance* source_site_instance,
-    int route_id,
-    int main_frame_route_id,
-    int main_frame_widget_route_id,
-    const ViewHostMsg_CreateWindow_Params& params,
+    int32_t route_id,
+    int32_t main_frame_route_id,
+    int32_t main_frame_widget_route_id,
+    const mojom::CreateNewWindowParams& params,
     SessionStorageNamespace* session_storage_namespace) {
   // We usually create the new window in the same BrowsingInstance (group of
   // script-related windows), by passing in the current SiteInstance.  However,
@@ -150,7 +130,8 @@ void WebContentsImplEfl::CreateNewWindow(
   int render_process_id = source_site_instance->GetProcess()->GetID();
   bool did_match_process = false;
   for (FrameTreeNode* node : frame_tree_.Nodes())
-    base::Bind(&FindMatchingProcess, render_process_id, &did_match_process, node);
+    base::Bind(&FindMatchingProcess, render_process_id, &did_match_process,
+               node);
 
   if (!did_match_process) {
     RenderProcessHost* rph = source_site_instance->GetProcess();
@@ -167,9 +148,8 @@ void WebContentsImplEfl::CreateNewWindow(
   //
   // http://crbug.com/142685
   const std::string& partition_id =
-      GetContentClient()->browser()->
-          GetStoragePartitionIdForSite(GetBrowserContext(),
-                                       site_instance->GetSiteURL());
+      GetContentClient()->browser()->GetStoragePartitionIdForSite(
+          GetBrowserContext(), site_instance->GetSiteURL());
   StoragePartition* partition = BrowserContext::GetStoragePartition(
       GetBrowserContext(), site_instance.get());
   DOMStorageContextWrapper* dom_storage_context =
@@ -181,24 +161,18 @@ void WebContentsImplEfl::CreateNewWindow(
   // Added for EFL implementation
   scoped_refptr<SessionStorageNamespace> ssn = session_storage_namespace;
   base::Callback<void(bool)> callback = base::Bind(
-      &WebContentsImplEfl::HandleNewWindowRequest,
-      base::Unretained(this), render_process_id, route_id,
-      main_frame_route_id, params, ssn);
+      &WebContentsImplEfl::HandleNewWindowRequest, base::Unretained(this),
+      render_process_id, route_id, main_frame_route_id, params, ssn);
   if (efl_delegate_ &&
       efl_delegate_->ShouldCreateWebContentsAsync(callback, params.target_url))
     return;
   // End of EFL port specific code.
 
   if (delegate_ &&
-      !delegate_->ShouldCreateWebContents(this,
-                                          route_id,
-                                          main_frame_route_id,
-                                          main_frame_widget_route_id,
-                                          params.window_container_type,
-                                          params.frame_name,
-                                          params.target_url,
-                                          partition_id,
-                                          session_storage_namespace)) {
+      !delegate_->ShouldCreateWebContents(
+          this, route_id, main_frame_route_id, main_frame_widget_route_id,
+          params.window_container_type, params.frame_name, params.target_url,
+          partition_id, session_storage_namespace)) {
     CancelWindowRequest(render_process_id, route_id, main_frame_route_id);
     return;
   }
@@ -207,38 +181,44 @@ void WebContentsImplEfl::CreateNewWindow(
   // contents of HandleNewWebContentsCreate would come here.
   callback.Run(true);
 }
+#endif  // !defined(EWK_BRINGUP)
+
+void WebContentsImplEfl::CancelWindowRequest(int32_t render_process_id,
+                                             int32_t route_id,
+                                             int32_t main_frame_route_id) {
+  if (route_id != MSG_ROUTING_NONE) {
+    RenderViewHost* rvh = RenderViewHost::FromID(render_process_id, route_id);
 
-void WebContentsImplEfl::CancelWindowRequest(
-    int render_process_id,
-    int route_id,
-    int main_frame_route_id) {
-  if (route_id != MSG_ROUTING_NONE &&
-      !RenderViewHost::FromID(render_process_id, route_id)) {
     // If the embedder didn't create a WebContents for this route, we need to
     // delete the RenderView that had already been created.
-    Send(new ViewMsg_Close(route_id));
+    if (rvh)
+      rvh->Send(new ViewMsg_Close(route_id));
   }
-  ResourceDispatcherHostImpl::ResumeBlockedRequestsForRouteFromUI(
+
+  if (ResourceDispatcherHostImpl::Get()) {
+    ResourceDispatcherHostImpl::Get()->ResumeBlockedRequestsForRoute(
         GlobalFrameRoutingId(render_process_id, route_id));
-  ResourceDispatcherHostImpl::ResumeBlockedRequestsForRouteFromUI(
+    ResourceDispatcherHostImpl::Get()->ResumeBlockedRequestsForRoute(
         GlobalFrameRoutingId(render_process_id, main_frame_route_id));
+  }
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
 // This function does not exist in WebContentsImpl. The decision regarding
 // new WebContents request is always made synchronously.
 void WebContentsImplEfl::HandleNewWindowRequest(
-    int render_process_id,
-    int route_id,
-    int main_frame_route_id,
-    const ViewHostMsg_CreateWindow_Params& params,
+    int32_t render_process_id,
+    int32_t route_id,
+    int32_t main_frame_route_id,
+    const mojom::CreateNewWindowParams& params,
     scoped_refptr<SessionStorageNamespace> session_storage_namespace,
     bool create) {
   if (create) {
     scoped_refptr<SessionStorageNamespace> ssn = session_storage_namespace;
     WebContentsEflDelegate::WebContentsCreateCallback callback = base::Bind(
-        &WebContentsImplEfl::HandleNewWebContentsCreate,
-        base::Unretained(this), render_process_id, route_id,
-        main_frame_route_id, params, ssn);
+        &WebContentsImplEfl::HandleNewWebContentsCreate, base::Unretained(this),
+        render_process_id, route_id, main_frame_route_id, params, ssn);
     if (efl_delegate_ && efl_delegate_->WebContentsCreateAsync(callback))
       return;
 
@@ -249,10 +229,10 @@ void WebContentsImplEfl::HandleNewWindowRequest(
 }
 
 WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
-    int render_process_id,
-    int route_id,
-    int main_frame_route_id,
-    const ViewHostMsg_CreateWindow_Params& params,
+    int32_t render_process_id,
+    int32_t route_id,
+    int32_t main_frame_route_id,
+    const mojom::CreateNewWindowParams& params,
     scoped_refptr<SessionStorageNamespace> session_storage_namespace,
     void* platform_data) {
   bool is_guest = BrowserPluginGuest::IsGuest(this);
@@ -262,9 +242,8 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
           : GetSiteInstance();
 
   const std::string& partition_id =
-      GetContentClient()->browser()->
-          GetStoragePartitionIdForSite(GetBrowserContext(),
-                                       site_instance->GetSiteURL());
+      GetContentClient()->browser()->GetStoragePartitionIdForSite(
+          GetBrowserContext(), site_instance->GetSiteURL());
 
   // Create the new web contents. This will automatically create the new
   // WebContentsView. In the future, we may want to create the view separately.
@@ -285,14 +264,14 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
     create_params.context = view_->GetNativeView();
     create_params.initial_size = GetContainerBounds().size();
     // Added for EFL port
-    new_contents = new WebContentsImplEfl(
-        create_params.browser_context, platform_data);
+    new_contents =
+        new WebContentsImplEfl(create_params.browser_context, platform_data);
 
     FrameTreeNode* opener = nullptr;
     if (create_params.opener_render_frame_id != MSG_ROUTING_NONE) {
-      RenderFrameHostImpl* opener_rfh = RenderFrameHostImpl::FromID(
-          create_params.opener_render_process_id,
-          create_params.opener_render_frame_id);
+      RenderFrameHostImpl* opener_rfh =
+          RenderFrameHostImpl::FromID(create_params.opener_render_process_id,
+                                      create_params.opener_render_frame_id);
       if (opener_rfh)
         opener = opener_rfh->frame_tree_node();
     }
@@ -303,7 +282,7 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
     }
     new_contents->Init(create_params);
     // End of EFL port specific code.
-  }  else {
+  } else {
     // TODO(t.czekala): WebContents and BrowserPluginGuest are integrated and
     // it should be checked if we can create WebContentsImplEfl in this scenario
     NOTREACHED();
@@ -314,7 +293,8 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
   // Added for EFL port
   new_contents->platform_data_ = platform_data;
   if (efl_delegate_)
-      efl_delegate_->SetUpSmartObject(platform_data, new_contents->GetNativeView());
+    efl_delegate_->SetUpSmartObject(platform_data,
+                                    new_contents->GetNativeView());
   // End of EFL port specific code.
 
   // If the new frame has a name, make sure any SiteInstances that can find
@@ -338,14 +318,15 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
     // Save the created window associated with the route so we can show it
     // later.
     DCHECK_NE(MSG_ROUTING_NONE, route_id);
-    pending_contents_[std::make_pair(render_process_id, route_id)] = new_contents;
+    pending_contents_[std::make_pair(render_process_id, route_id)] =
+        new_contents;
     AddDestructionObserver(new_contents);
   }
 
   if (delegate_) {
-    delegate_->WebContentsCreated(
-        this, params.opener_render_frame_id, params.frame_name,
-        params.target_url, new_contents);
+    delegate_->WebContentsCreated(this, params.opener_render_frame_id,
+                                  params.frame_name, params.target_url,
+                                  new_contents);
   }
 
   if (params.opener_suppressed) {
@@ -354,14 +335,12 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
     bool was_blocked = false;
     if (delegate_) {
       gfx::Rect initial_rect;
-      delegate_->AddNewContents(
-          this, new_contents, params.disposition, initial_rect,
-          params.user_gesture, &was_blocked);
+      delegate_->AddNewContents(this, new_contents, params.disposition,
+                                initial_rect, params.user_gesture,
+                                &was_blocked);
     }
     if (!was_blocked) {
-      OpenURLParams open_params(params.target_url,
-                                Referrer(),
-                                CURRENT_TAB,
+      OpenURLParams open_params(params.target_url, Referrer(), CURRENT_TAB,
                                 ui::PAGE_TRANSITION_LINK,
                                 true /* is_renderer_initiated */);
       open_params.user_gesture = params.user_gesture;
@@ -379,9 +358,12 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
 
   return new_contents;
 }
+#endif  // !defined(EWK_BRINGUP)
 
-bool WebContentsImplEfl::UpdateTitleForEntry(NavigationEntryImpl* entry,
+void WebContentsImplEfl::UpdateTitleForEntry(NavigationEntry* entry,
                                              const base::string16& title) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   bool updated = WebContentsImpl::UpdateTitleForEntry(entry, title);
   // inform view even if the title didn't change to keep EWK consistency
   if (!updated) {
@@ -396,8 +378,7 @@ bool WebContentsImplEfl::UpdateTitleForEntry(NavigationEntryImpl* entry,
 
     view_->SetPageTitle(final_title);
   }
-
-  return updated;
+#endif  // !defined(EWK_BRINGUP)
 }
 
-}
+}  // namespace content
index 82aa5b924f49483000ff31790ec5c344285cd7ab..fb3fb48ca2978e4af1b6288f6105fd2e2df4417f 100644 (file)
@@ -20,13 +20,16 @@ class CONTENT_EXPORT WebContentsImplEfl : public WebContentsImpl {
   WebContentsImplEfl(BrowserContext* browser_context,
                      void* platform_data);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   void CreateNewWindow(
       SiteInstance* source_site_instance,
-      int route_id,
-      int main_frame_route_id,
+      int32_t route_id,
+      int32_t main_frame_route_id,
       int32_t main_frame_widget_route_id,
-      const ViewHostMsg_CreateWindow_Params& params,
+      const mojom::CreateNewWindowParams& params,
       SessionStorageNamespace* session_storage_namespace) override;
+#endif  // !defined(EWK_BRINGUP)
 
   void* GetPlatformData() const { return platform_data_; };
 
@@ -44,27 +47,30 @@ class CONTENT_EXPORT WebContentsImplEfl : public WebContentsImpl {
   friend class WebContents;
 
   void CancelWindowRequest(
-      int render_process_id,
-      int route_id,
-      int main_frame_route_id);
+      int32_t render_process_id,
+      int32_t route_id,
+      int32_t main_frame_route_id);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   void HandleNewWindowRequest(
-      int render_process_id,
-      int route_id,
-      int main_frame_route_id,
-      const ViewHostMsg_CreateWindow_Params& params,
+      int32_t render_process_id,
+      int32_t route_id,
+      int32_t main_frame_route_id,
+      const mojom::CreateNewWindowParams& params,
       scoped_refptr<SessionStorageNamespace> session_storage_namespace,
       bool create);
 
   WebContents* HandleNewWebContentsCreate(
-      int render_process_id,
-      int route_id,
-      int main_frame_route_id,
-      const ViewHostMsg_CreateWindow_Params& params,
+      int32_t render_process_id,
+      int32_t route_id,
+      int32_t main_frame_route_id,
+      const mojom::CreateNewWindowParams& params,
       scoped_refptr<SessionStorageNamespace> session_storage_namespace,
       void* platform_data);
+#endif  // !defined(EWK_BRINGUP)
 
-  bool UpdateTitleForEntry(NavigationEntryImpl* entry,
+  void UpdateTitleForEntry(NavigationEntry* entry,
                            const base::string16& title) override;
 
   void* platform_data_;
index 8790254e47963a793fb5f2938f0623088d3ae8cc..d3eea5da14639e6e68fd86a99955ad34b16feff3 100644 (file)
@@ -7,8 +7,8 @@
 
 #include <Elementary.h>
 
-#include "base/logging.h"
 #include "base/command_line.h"
+#include "base/logging.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/browser/renderer_host/render_widget_host_view_efl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
@@ -17,7 +17,6 @@
 #include "content/common/view_messages.h"
 #include "content/public/browser/interstitial_page.h"
 #include "content/public/browser/render_view_host.h"
-#include "content/public/browser/screen_orientation_dispatcher_host.h"
 #include "content/public/browser/web_contents_view_delegate.h"
 #include "content/public/browser/web_contents_view_efl_delegate.h"
 #include "efl/window_factory.h"
@@ -38,28 +37,29 @@ WebContentsView* CreateWebContentsView(
 }
 
 WebContentsViewEfl::WebContentsViewEfl(WebContents* contents,
-    WebContentsViewDelegate* delegate)
-    : delegate_(delegate)
-    , native_view_(NULL)
-    , drag_dest_delegate_(NULL)
-    , orientation_(0)
+                                       WebContentsViewDelegate* delegate)
+    : delegate_(delegate),
+      native_view_(NULL),
+      drag_dest_delegate_(NULL),
+      orientation_(0)
 #if defined(OS_TIZEN_MOBILE)
-    , touch_enabled_(true)
+      ,
+      touch_enabled_(true)
 #else
-    , touch_enabled_(false)
+      ,
+      touch_enabled_(false)
 #endif
-    , page_scale_factor_(1.0f)
-    , web_contents_(contents) {
+      ,
+      page_scale_factor_(1.0f),
+      web_contents_(contents) {
   base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
   if (cmdline->HasSwitch(switches::kTouchEvents)) {
-    touch_enabled_ = cmdline->
-        GetSwitchValueASCII(switches::kTouchEvents) ==
-            switches::kTouchEventsEnabled;
+    touch_enabled_ = cmdline->GetSwitchValueASCII(switches::kTouchEvents) ==
+                     switches::kTouchEventsEnabled;
   }
 }
 
-WebContentsViewEfl::~WebContentsViewEfl() {
-}
+WebContentsViewEfl::~WebContentsViewEfl() {}
 
 void WebContentsViewEfl::SetEflDelegate(WebContentsViewEflDelegate* delegate) {
   efl_delegate_.reset(delegate);
@@ -77,8 +77,8 @@ void WebContentsViewEfl::CreateView(const gfx::Size& initial_size,
   elm_naviframe_content_preserve_on_pop_set(native_view_, EINA_TRUE);
 
   if (!initial_size.IsEmpty())
-    evas_object_resize(native_view_,
-        initial_size.width(), initial_size.height());
+    evas_object_resize(native_view_, initial_size.width(),
+                       initial_size.height());
   evas_object_show(native_view_);
 
   GLSharedContextEfl::Initialize(root_window);
@@ -88,16 +88,16 @@ void WebContentsViewEfl::CreateView(const gfx::Size& initial_size,
 }
 
 RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForWidget(
-    RenderWidgetHost* render_widget_host, bool is_guest_view_hack) {
-
+    RenderWidgetHost* render_widget_host,
+    bool is_guest_view_hack) {
   RenderWidgetHostViewEfl* view =
       new RenderWidgetHostViewEfl(render_widget_host, *web_contents_);
   view->InitAsChild(native_view_);
 
   elm_naviframe_item_pop(native_view_);
   Evas_Object* content_view = static_cast<Evas_Object*>(view->GetNativeView());
-  Elm_Object_Item* item = elm_naviframe_item_push(native_view_,
-      NULL, NULL, NULL, content_view, NULL);
+  Elm_Object_Item* item = elm_naviframe_item_push(native_view_, NULL, NULL,
+                                                  NULL, content_view, NULL);
   elm_naviframe_item_title_enabled_set(item, EINA_FALSE, EINA_FALSE);
 
   view->SetTouchEventsEnabled(touch_enabled_);
@@ -137,7 +137,7 @@ void WebContentsViewEfl::UpdateDragDest(RenderViewHost* host) {
   }
 
   RenderWidgetHostViewEfl* view = static_cast<RenderWidgetHostViewEfl*>(
-    web_contents_->GetRenderWidgetHostView());
+      web_contents_->GetRenderWidgetHostView());
   if (!view)
     return;
 
@@ -158,8 +158,7 @@ void WebContentsViewEfl::RenderViewSwappedIn(RenderViewHost* host) {
   UpdateDragDest(host);
 }
 
-void WebContentsViewEfl::SetOverscrollControllerEnabled(bool enabled) {
-}
+void WebContentsViewEfl::SetOverscrollControllerEnabled(bool enabled) {}
 
 gfx::NativeView WebContentsViewEfl::GetNativeView() const {
   return native_view_;
@@ -170,6 +169,10 @@ gfx::NativeView WebContentsViewEfl::GetContentNativeView() const {
   return rwhv ? rwhv->GetNativeView() : NULL;
 }
 
+void WebContentsViewEfl::GetScreenInfo(ScreenInfo* screen_info) const {
+  NOTIMPLEMENTED();
+}
+
 gfx::NativeWindow WebContentsViewEfl::GetTopLevelNativeWindow() const {
   NOTIMPLEMENTED();
   return 0;
@@ -177,7 +180,7 @@ gfx::NativeWindow WebContentsViewEfl::GetTopLevelNativeWindow() const {
 
 void WebContentsViewEfl::GetContainerBounds(gfx::Rect* out) const {
   RenderWidgetHostViewEfl* view = static_cast<RenderWidgetHostViewEfl*>(
-    web_contents_->GetRenderWidgetHostView());
+      web_contents_->GetRenderWidgetHostView());
   if (view)
     *out = view->GetBoundsInRootWindow();
 }
@@ -230,7 +233,7 @@ gfx::Rect WebContentsViewEfl::GetViewBounds() const {
 }
 
 void WebContentsViewEfl::ShowContextMenu(RenderFrameHost* render_frame_host,
-    const ContextMenuParams& params) {
+                                         const ContextMenuParams& params) {
   if (delegate_)
     delegate_->ShowContextMenu(render_frame_host, params);
 }
@@ -252,19 +255,18 @@ void WebContentsViewEfl::QuerySelectionStyle() {
     efl_delegate_->QuerySelectionStyle();
 }
 
-void WebContentsViewEfl::ShowPopupMenu(
-    RenderFrameHost* render_frame_host,
-    const gfx::Rect& bounds,
-    int item_height,
-    double item_font_size,
-    int selected_item,
-    const std::vector<MenuItem>& items,
-    bool right_aligned,
-    bool allow_multiple_selection) {
+void WebContentsViewEfl::ShowPopupMenu(RenderFrameHost* render_frame_host,
+                                       const gfx::Rect& bounds,
+                                       int item_height,
+                                       double item_font_size,
+                                       int selected_item,
+                                       const std::vector<MenuItem>& items,
+                                       bool right_aligned,
+                                       bool allow_multiple_selection) {
   if (efl_delegate_)
-    efl_delegate_->ShowPopupMenu(render_frame_host, bounds,
-        item_height, item_font_size, selected_item, items,
-        right_aligned, allow_multiple_selection);
+    efl_delegate_->ShowPopupMenu(render_frame_host, bounds, item_height,
+                                 item_font_size, selected_item, items,
+                                 right_aligned, allow_multiple_selection);
 }
 
 void WebContentsViewEfl::HidePopupMenu() {
@@ -272,12 +274,12 @@ void WebContentsViewEfl::HidePopupMenu() {
     efl_delegate_->HidePopupMenu();
 }
 
-void WebContentsViewEfl::StartDragging(
-    const DropData& drop_data,
-    blink::WebDragOperationsMask allowed_ops,
-    const gfx::ImageSkia& image,
-    const gfx::Vector2d& image_offset,
-    const DragEventSourceInfo& event_info) {
+void WebContentsViewEfl::StartDragging(const DropData& drop_data,
+                                       blink::WebDragOperationsMask allowed_ops,
+                                       const gfx::ImageSkia& image,
+                                       const gfx::Vector2d& image_offset,
+                                       const DragEventSourceInfo& event_info,
+                                       RenderWidgetHostImpl* source_rwh) {
   if (drag_dest_.get()) {
     drag_dest_->SetDropData(drop_data);
     drag_dest_->SetAction(allowed_ops);
@@ -288,10 +290,13 @@ void WebContentsViewEfl::StartDragging(
     drag_source_->SetPageScaleFactor(page_scale_factor_);
   }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (!drag_source_->StartDragging(drop_data, allowed_ops,
-          event_info.event_location, *image.bitmap(), image_offset)) {
+                                   event_info.event_location, *image.bitmap(),
+                                   image_offset)) {
     web_contents_->SystemDragEnded();
   }
+#endif  // !defined(EWK_BRINGUP)
 }
 
 bool WebContentsViewEfl::IsDragging() const {
@@ -302,13 +307,16 @@ bool WebContentsViewEfl::IsDragging() const {
 
 void WebContentsViewEfl::SetOrientation(int orientation) {
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(
-                                    web_contents_->GetRenderWidgetHostView());
+      web_contents_->GetRenderWidgetHostView());
 
   if (rwhv) {
     RenderWidgetHost* rwh = rwhv->GetRenderWidgetHost();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+    // FIXME: EWK_BRINGUP definition should be removed.
     blink::WebScreenInfo screen_info;
     rwh->GetWebScreenInfo(&screen_info);
     screen_info.orientationAngle = orientation;
+#endif  // !defined(EWK_BRINGUP)
 
     gfx::Size new_size, backing_size;
     gfx::Rect bounds_px = rwhv->GetViewBoundsInPix();
@@ -326,16 +334,18 @@ void WebContentsViewEfl::SetOrientation(int orientation) {
         static_cast<WebContentsImpl&>(*web_contents_);
 
     ResizeParams params;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+    // FIXME: EWK_BRINGUP definition should be removed.
     params.screen_info = screen_info;
+#endif  // !defined(EWK_BRINGUP)
     params.new_size = new_size;
     params.physical_backing_size = backing_size;
-    params.is_fullscreen_granted =
-        contents_impl.IsFullscreenForCurrentTab();
+    params.is_fullscreen_granted = contents_impl.IsFullscreenForCurrentTab();
 
     rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params));
     rwhv->UpdateScreenInfo(rwhv->GetNativeView());
 
-    contents_impl.screen_orientation_dispatcher_host()->OnOrientationChange();
+    contents_impl.OnScreenOrientationChange();
 
     rwhv->UpdateRotationDegrees(orientation);
   }
@@ -370,4 +380,4 @@ bool WebContentsViewEfl::UseKeyPadWithoutUserAction() {
   return false;
 }
 
-} // namespace content
+}  // namespace content
index ee223751de50d57465f270861a1ffdb7cd133017..40542a26ac7e17d234cd41d46ca92d0cc3d691ff 100644 (file)
@@ -11,7 +11,8 @@
 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
 #include "content/browser/web_contents/web_contents_view.h"
 #include "content/common/content_export.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "third_party/blink/public/platform/web_gesture_event.h"
+#include "third_party/blink/public/platform/web_input_event.h"
 
 namespace content {
 
@@ -21,6 +22,7 @@ class WebContentsViewEflDelegate;
 class WebDragDestEfl;
 class WebDragSourceEfl;
 class WebDragDestDelegate;
+struct ScreenInfo;
 
 class CONTENT_EXPORT WebContentsViewEfl
     : public content::WebContentsView
@@ -45,6 +47,7 @@ class CONTENT_EXPORT WebContentsViewEfl
   void SetOverscrollControllerEnabled(bool enabled) override;
   gfx::NativeView GetNativeView() const override;
   gfx::NativeView GetContentNativeView() const override;
+  void GetScreenInfo(ScreenInfo* screen_info) const override;
   gfx::NativeWindow GetTopLevelNativeWindow() const override;
   void GetContainerBounds(gfx::Rect* out) const override;
   void SizeContents(const gfx::Size& size) override;
@@ -73,7 +76,8 @@ class CONTENT_EXPORT WebContentsViewEfl
                      blink::WebDragOperationsMask allowed_ops,
                      const gfx::ImageSkia& image,
                      const gfx::Vector2d& image_offset,
-                     const DragEventSourceInfo& event_info) override;
+                     const DragEventSourceInfo& event_info,
+                     RenderWidgetHostImpl* source_rwh) override;
   void CancelContextMenu(int request_id);
   bool IsDragging() const;
 
index e604bdc1d43183830db34bec5645f24386549371..fdd4c1a748d4e6c13245b90d98f48ce822757624 100644 (file)
@@ -83,7 +83,10 @@ void WebDragDestEfl::DragStateEnter() {
 }
 
 void WebDragDestEfl::DragStateLeave() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
   GetRenderViewHost()->DragTargetDragLeave();
+#endif  // !defined(EWK_BRINGUP)
   if (delegate_)
     delegate_->OnDragLeave();
 }
@@ -97,12 +100,15 @@ void WebDragDestEfl::DragPos(
                                     screen_pt.y() / page_scale_factor_);
 
   if (!drag_initialized_) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
     GetRenderViewHost()->DragTargetDragEnter(
         *drop_data_,
         client_pt,
         screen_pt,
         drag_action_,
         modifier_flags_);
+#endif  // !defined(EWK_BRINGUP)
 
     if (delegate_)
       delegate_->OnDragEnter();
@@ -110,11 +116,14 @@ void WebDragDestEfl::DragPos(
     drag_initialized_ = true;
   }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   GetRenderViewHost()->DragTargetDragOver(
       client_pt,
       screen_pt,
       drag_action_,
       modifier_flags_);
+#endif  // !defined(EWK_BRINGUP)
 
   if (!delegate_)
     return;
@@ -126,28 +135,37 @@ Eina_Bool WebDragDestEfl::DragDrop(Elm_Selection_Data* data) {
       gfx::Point(last_pointer_pos_.x() / page_scale_factor_,
                  last_pointer_pos_.y() / page_scale_factor_);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   GetRenderViewHost()->FilterDropData(drop_data_.get());
   GetRenderViewHost()->DragTargetDrop(
       *drop_data_,
       client_pt,
       last_pointer_pos_,
       modifier_flags_);
+#endif  // !defined(EWK_BRINGUP)
 
   if (delegate_)
     delegate_->OnDrop();
 
   drag_initialized_ = false;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   // Invoking via message loop to not mess around with target
   // from within one of its callbacks.
   base::MessageLoop::current()->PostTask(
       FROM_HERE,
       base::Bind(&WebDragDestEfl::ResetDragCallbacks, base::Unretained(this)));
+#endif  // !defined(EWK_BRINGUP)
 
   return EINA_TRUE;
 }
 
 void WebDragDestEfl::DragLeave() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   GetRenderViewHost()->DragTargetDragLeave();
+#endif  // !defined(EWK_BRINGUP)
   if (delegate_)
     delegate_->OnDragLeave();
 
index e3cd7db14be9de14b46e9d1b2a555c4f8ee15bab..acf1c6e2bbfd8d9576931e43d27e9784c0e4c618 100644 (file)
@@ -9,7 +9,7 @@
 #include <Elementary.h>
 
 #include "content/public/common/drop_data.h"
-#include "third_party/WebKit/public/platform/WebDragOperation.h"
+#include "third_party/blink/public/platform/web_drag_operation.h"
 #include "ui/gfx/geometry/point.h"
 
 namespace content {
index 5187b4a34c94a36584fda9a069bf9726573c2769..d68531431eed7cd962c5840f9a20bf9e5aab079c 100644 (file)
@@ -5,6 +5,7 @@
 #include "content/browser/web_contents/web_drag_source_efl.h"
 
 #include "content/browser/download/drag_download_util.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/common/drop_data.h"
 #include "third_party/skia/include/core/SkPixelRef.h"
@@ -14,44 +15,47 @@ namespace content {
 
 namespace {
 blink::WebDragOperation GetWebOperationFromMask(
-    blink::WebDragOperationsMask allowed_ops)
-{
-  if (allowed_ops & blink::WebDragOperationCopy)
-    return blink::WebDragOperationCopy;
-  if (allowed_ops & blink::WebDragOperationLink)
-    return blink::WebDragOperationLink;
-  if (allowed_ops & blink::WebDragOperationMove)
-    return blink::WebDragOperationMove;
-  if (allowed_ops & blink::WebDragOperationGeneric)
-    return blink::WebDragOperationGeneric;
-  if (allowed_ops & blink::WebDragOperationPrivate)
-    return blink::WebDragOperationPrivate;
-  if (allowed_ops & blink::WebDragOperationDelete)
-    return blink::WebDragOperationDelete;
-  return blink::WebDragOperationNone;
+    blink::WebDragOperationsMask allowed_ops) {
+  if (allowed_ops & blink::kWebDragOperationCopy)
+    return blink::kWebDragOperationCopy;
+  if (allowed_ops & blink::kWebDragOperationLink)
+    return blink::kWebDragOperationLink;
+  if (allowed_ops & blink::kWebDragOperationMove)
+    return blink::kWebDragOperationMove;
+  if (allowed_ops & blink::kWebDragOperationGeneric)
+    return blink::kWebDragOperationGeneric;
+  if (allowed_ops & blink::kWebDragOperationPrivate)
+    return blink::kWebDragOperationPrivate;
+  if (allowed_ops & blink::kWebDragOperationDelete)
+    return blink::kWebDragOperationDelete;
+  return blink::kWebDragOperationNone;
 }
 
-Evas_Object* DragIconCreateCb(void* data, Evas_Object* win,
-    Evas_Coord* xoff, Evas_Coord* yoff) {
+Evas_Object* DragIconCreateCb(void* data,
+                              Evas_Object* win,
+                              Evas_Coord* xoff,
+                              Evas_Coord* yoff) {
   WebDragSourceEfl* web_drag_source_efl = static_cast<WebDragSourceEfl*>(data);
   return web_drag_source_efl->DragIconCreate(win, xoff, yoff);
 }
 
-void DragPosCb(void* data, Evas_Object* obj, Evas_Coord x, Evas_Coord y,
-    Elm_Xdnd_Action action) {
-  WebDragSourceEfl *web_drag_source_efl = static_cast<WebDragSourceEfl*>(data);
+void DragPosCb(void* data,
+               Evas_Object* obj,
+               Evas_Coord x,
+               Evas_Coord y,
+               Elm_Xdnd_Action action) {
+  WebDragSourceEfl* web_drag_source_efl = static_cast<WebDragSourceEfl*>(data);
   web_drag_source_efl->DragPos(x, y, action);
 }
 
-void DragAcceptCb(void* data, Evas_Object* obj, Eina_Bool doaccept) {
-}
+void DragAcceptCb(void* data, Evas_Object* obj, Eina_Bool doaccept) {}
 
 void DragStateCb(void* data, Evas_Object* obj) {
   WebDragSourceEfl* web_drag_source_efl = static_cast<WebDragSourceEfl*>(data);
   web_drag_source_efl->DragState();
 }
 
-} // namespace
+}  // namespace
 
 WebDragSourceEfl::WebDragSourceEfl(WebContents* web_contents)
     : parent_view_(static_cast<Evas_Object*>(web_contents->GetNativeView())),
@@ -59,12 +63,11 @@ WebDragSourceEfl::WebDragSourceEfl(WebContents* web_contents)
       drag_failed_(false),
       drag_started_(false),
       page_scale_factor_(1.0f) {
-  device_scale_factor_ = display::Screen::GetScreen()->
-      GetPrimaryDisplay().device_scale_factor();
+  device_scale_factor_ =
+      display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
 }
 
-WebDragSourceEfl::~WebDragSourceEfl() {
-}
+WebDragSourceEfl::~WebDragSourceEfl() {}
 
 bool WebDragSourceEfl::StartDragging(const DropData& drop_data,
                                      blink::WebDragOperationsMask allowed_ops,
@@ -91,8 +94,7 @@ bool WebDragSourceEfl::StartDragging(const DropData& drop_data,
     targets_mask |= ELM_SEL_FORMAT_IMAGE;
   if (!drop_data.download_metadata.empty() &&
       ParseDownloadMetadata(drop_data.download_metadata,
-                            &wide_download_mime_type_,
-                            &download_file_name_,
+                            &wide_download_mime_type_, &download_file_name_,
                             &download_url_))
     targets_mask |= ELM_SEL_FORMAT_IMAGE;
   if (!drop_data.custom_data.empty())
@@ -100,13 +102,13 @@ bool WebDragSourceEfl::StartDragging(const DropData& drop_data,
 
   int action = 0;
 
-  if (allowed_ops & blink::WebDragOperationCopy)
+  if (allowed_ops & blink::kWebDragOperationCopy)
     action |= ELM_XDND_ACTION_COPY;
-  if (allowed_ops & blink::WebDragOperationLink)
-    action |= ELM_XDND_ACTION_LINK ;
-  if (allowed_ops & blink::WebDragOperationMove)
+  if (allowed_ops & blink::kWebDragOperationLink)
+    action |= ELM_XDND_ACTION_LINK;
+  if (allowed_ops & blink::kWebDragOperationMove)
     action |= ELM_XDND_ACTION_MOVE;
-  if(!action)
+  if (!action)
     action = ELM_XDND_ACTION_UNKNOWN;
 
   image_ = image;
@@ -114,17 +116,14 @@ bool WebDragSourceEfl::StartDragging(const DropData& drop_data,
   drag_action_ = allowed_ops;
   drag_failed_ = false;
 
-  drag_started_ = elm_drag_start(parent_view_,
-                                 static_cast<Elm_Sel_Format>(targets_mask),
-                                 reinterpret_cast<char*>(drop_data_.get()),
-                                 static_cast<Elm_Xdnd_Action>(action),
-                                 DragIconCreateCb, this,
-                                 DragPosCb, this,
-                                 DragAcceptCb, this,
-                                 DragStateCb, this);
-
-  // Sometimes the drag fails to start; |drag_started_| will be false and we won't
-  // get a drag-end signal.
+  drag_started_ = elm_drag_start(
+      parent_view_, static_cast<Elm_Sel_Format>(targets_mask),
+      reinterpret_cast<char*>(drop_data_.get()),
+      static_cast<Elm_Xdnd_Action>(action), DragIconCreateCb, this, DragPosCb,
+      this, DragAcceptCb, this, DragStateCb, this);
+
+  // Sometimes the drag fails to start; |drag_started_| will be false and we
+  // won't get a drag-end signal.
   if (!drag_started_) {
     LOG(WARNING) << "Failed to start drag and drop";
     drag_failed_ = true;
@@ -135,21 +134,22 @@ bool WebDragSourceEfl::StartDragging(const DropData& drop_data,
   return true;
 }
 
-Evas_Object* WebDragSourceEfl::DragIconCreate(
-    Evas_Object* win, Evas_Coord* xoff, Evas_Coord* yoff) const {
+Evas_Object* WebDragSourceEfl::DragIconCreate(Evas_Object* win,
+                                              Evas_Coord* xoff,
+                                              Evas_Coord* yoff) const {
   int w = image_.width(), h = image_.height();
 
-  if (xoff) *xoff = initial_position_.x();
-  if (yoff) *yoff = initial_position_.y();
+  if (xoff)
+    *xoff = initial_position_.x();
+  if (yoff)
+    *yoff = initial_position_.y();
   Evas* evas = evas_object_evas_get(win);
   Evas_Object* icon = evas_object_image_add(evas);
   evas_object_image_size_set(icon, w, h);
   evas_object_image_alpha_set(icon, EINA_TRUE);
   evas_object_image_data_copy_set(icon, image_.pixelRef()->pixels());
-  evas_object_size_hint_align_set(icon,
-      EVAS_HINT_FILL, EVAS_HINT_FILL);
-  evas_object_size_hint_weight_set(icon,
-      EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+  evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+  evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_move(icon, initial_position_.x(), initial_position_.y());
   evas_object_image_fill_set(icon, 0, 0, w, h);
   evas_object_resize(icon, w, h);
@@ -158,10 +158,11 @@ Evas_Object* WebDragSourceEfl::DragIconCreate(
   return icon;
 }
 
-void WebDragSourceEfl::DragPos(Evas_Coord x, Evas_Coord y,
-    Elm_Xdnd_Action action) {
-  gfx::Point screen_pt = gfx::Point(x / device_scale_factor_,
-                                    y / device_scale_factor_);
+void WebDragSourceEfl::DragPos(Evas_Coord x,
+                               Evas_Coord y,
+                               Elm_Xdnd_Action action) {
+  gfx::Point screen_pt =
+      gfx::Point(x / device_scale_factor_, y / device_scale_factor_);
   last_pointer_pos_ = screen_pt;
 }
 
@@ -169,12 +170,12 @@ void WebDragSourceEfl::DragState() {
   gfx::Point client_pt = gfx::Point(last_pointer_pos_.x() / page_scale_factor_,
                                     last_pointer_pos_.y() / page_scale_factor_);
 
-  web_contents_->DragSourceEndedAt(
-      client_pt.x(), client_pt.y(),
-      last_pointer_pos_.x(), last_pointer_pos_.y(),
-      GetWebOperationFromMask(drag_action_));
+  web_contents_->DragSourceEndedAt(client_pt.x(), client_pt.y(),
+                                   last_pointer_pos_.x(), last_pointer_pos_.y(),
+                                   GetWebOperationFromMask(drag_action_),
+                                   source_rwh_);
 
-  web_contents_->SystemDragEnded();
+  web_contents_->SystemDragEnded(source_rwh_);
   drag_started_ = false;
 }
 
index 5f9d738b6919a1e11dd8f4e6485af99813ec7b1f..4e474dd78bfadeb8dc457fe89816aec7711ff860 100644 (file)
 
 #include "base/files/file_path.h"
 #include "base/strings/string16.h"
+#include "third_party/blink/public/platform/web_drag_operation.h"
 #include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/WebKit/public/platform/WebDragOperation.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/vector2d.h"
 #include "url/gurl.h"
 
 namespace content {
 
+class RenderWidgetHostImpl;
 class WebContents;
 class WebContentsImpl;
 
@@ -44,7 +45,9 @@ class WebDragSourceEfl {
   bool IsDragging() { return drag_started_; }
 
   // EFL callbacks
-  Evas_Object* DragIconCreate(Evas_Object* win, Evas_Coord* xoff, Evas_Coord* yoff) const;
+  Evas_Object* DragIconCreate(Evas_Object* win,
+                              Evas_Coord* xoff,
+                              Evas_Coord* yoff) const;
   void DragPos(Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action);
   void DragState();
 
@@ -54,6 +57,9 @@ class WebDragSourceEfl {
   // The tab we're manging the drag for.
   WebContentsImpl* web_contents_;
 
+  // Browser side IPC handler.
+  RenderWidgetHostImpl* source_rwh_;
+
   // The drop data for the current drag (for drags that originate in the render
   // view). Non-NULL iff there is a current drag.
   std::unique_ptr<DropData> drop_data_;
index c04e9a0a0471e893e86d92006fb6325de5475827..e23323c422ed338fcc3e89befc1f34b4f523554a 100644 (file)
@@ -7,99 +7,99 @@
 #include "ecore_x_wayland_wrapper.h"
 
 #include "base/logging.h"
-#include "third_party/WebKit/public/platform/WebCursorInfo.h"
+#include "third_party/blink/public/platform/web_cursor_info.h"
 
 using namespace blink;
 
 #if defined(USE_WAYLAND)
 const char* GetCursorName(int type) {
   switch (type) {
-    case WebCursorInfo::TypePointer:
+    case WebCursorInfo::kTypePointer:
       return "left_ptr";
-    case WebCursorInfo::TypeCross:
+    case WebCursorInfo::kTypeCross:
       return "left_ptr"; // ECORE_X_CURSOR_CROSS
-    case WebCursorInfo::TypeHand:
+    case WebCursorInfo::kTypeHand:
       return "hand1";
-    case WebCursorInfo::TypeIBeam:
+    case WebCursorInfo::kTypeIBeam:
       return "xterm";
-    case WebCursorInfo::TypeWait:
+    case WebCursorInfo::kTypeWait:
       return "watch";
-    case WebCursorInfo::TypeHelp:
+    case WebCursorInfo::kTypeHelp:
       return "left_ptr"; // ECORE_X_CURSOR_QUESTION_ARROW
-    case WebCursorInfo::TypeEastResize:
+    case WebCursorInfo::kTypeEastResize:
       return "right_side";
-    case WebCursorInfo::TypeNorthResize:
+    case WebCursorInfo::kTypeNorthResize:
       return "top_side";
-    case WebCursorInfo::TypeNorthEastResize:
+    case WebCursorInfo::kTypeNorthEastResize:
       return "top_right_corner";
-    case WebCursorInfo::TypeNorthWestResize:
+    case WebCursorInfo::kTypeNorthWestResize:
       return "top_left_corner";
-    case WebCursorInfo::TypeSouthResize:
+    case WebCursorInfo::kTypeSouthResize:
       return "bottom_side";
-    case WebCursorInfo::TypeSouthEastResize:
+    case WebCursorInfo::kTypeSouthEastResize:
       return "bottom_right_corner";
-    case WebCursorInfo::TypeSouthWestResize:
+    case WebCursorInfo::kTypeSouthWestResize:
       return "bottom_left_corner";
-    case WebCursorInfo::TypeWestResize:
+    case WebCursorInfo::kTypeWestResize:
       return "left_side";
-    case WebCursorInfo::TypeNorthSouthResize:
+    case WebCursorInfo::kTypeNorthSouthResize:
       return "top_side"; // ECORE_X_CURSOR_SB_V_DOUBLE_ARROW
-    case WebCursorInfo::TypeEastWestResize:
+    case WebCursorInfo::kTypeEastWestResize:
       return "left_side"; // ECORE_X_CURSOR_SB_H_DOUBLE_ARROW
-    case WebCursorInfo::TypeNorthEastSouthWestResize:
+    case WebCursorInfo::kTypeNorthEastSouthWestResize:
       return "top_right_corner";
-    case WebCursorInfo::TypeNorthWestSouthEastResize:
+    case WebCursorInfo::kTypeNorthWestSouthEastResize:
       return "top_left_corner";
-    case WebCursorInfo::TypeColumnResize:
+    case WebCursorInfo::kTypeColumnResize:
       return "left_side"; // ECORE_X_CURSOR_SB_H_DOUBLE_ARROW
-    case WebCursorInfo::TypeRowResize:
+    case WebCursorInfo::kTypeRowResize:
       return "top_side"; // ECORE_X_CURSOR_SB_V_DOUBLE_ARROW
-    case WebCursorInfo::TypeMiddlePanning:
+    case WebCursorInfo::kTypeMiddlePanning:
       return "left_ptr"; // ECORE_X_CURSOR_FLEUR
-    case WebCursorInfo::TypeEastPanning:
+    case WebCursorInfo::kTypeEastPanning:
       return "right_side"; // ECORE_X_CURSOR_SB_RIGHT_ARROW
-    case WebCursorInfo::TypeNorthPanning:
+    case WebCursorInfo::kTypeNorthPanning:
       return "top_side"; // ECORE_X_CURSOR_SB_UP_ARROW
-    case WebCursorInfo::TypeNorthEastPanning:
+    case WebCursorInfo::kTypeNorthEastPanning:
       return "top_right_corner"; // ECORE_X_CURSOR_TOP_RIGHT_CORNER
-    case WebCursorInfo::TypeNorthWestPanning:
+    case WebCursorInfo::kTypeNorthWestPanning:
       return "top_left_corner"; // ECORE_X_CURSOR_TOP_LEFT_CORNER
-    case WebCursorInfo::TypeSouthPanning:
+    case WebCursorInfo::kTypeSouthPanning:
       return "bottom_side"; // ECORE_X_CURSOR_SB_DOWN_ARROW
-    case WebCursorInfo::TypeSouthEastPanning:
+    case WebCursorInfo::kTypeSouthEastPanning:
       return "botton_right_corner"; // ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER
-    case WebCursorInfo::TypeSouthWestPanning:
+    case WebCursorInfo::kTypeSouthWestPanning:
       return "botton_left_corner"; // ECORE_X_CURSOR_BOTTOM_LEFT_CORNER
-    case WebCursorInfo::TypeWestPanning:
+    case WebCursorInfo::kTypeWestPanning:
       return "left_side"; //ECORE_X_CURSOR_SB_LEFT_ARROW
-    case WebCursorInfo::TypeMove:
+    case WebCursorInfo::kTypeMove:
       return "left_ptr"; //ECORE_X_CURSOR_FLEUR
-    case WebCursorInfo::TypeVerticalText:
+    case WebCursorInfo::kTypeVerticalText:
       return "xterm";
-    case WebCursorInfo::TypeCell:
+    case WebCursorInfo::kTypeCell:
       return "xterm";
-    case WebCursorInfo::TypeContextMenu:
+    case WebCursorInfo::kTypeContextMenu:
       return "xterm";
-    case WebCursorInfo::TypeAlias:
+    case WebCursorInfo::kTypeAlias:
       return "xterm";
-    case WebCursorInfo::TypeProgress:
+    case WebCursorInfo::kTypeProgress:
       return "watch";
-     case WebCursorInfo::TypeNoDrop:
+    case WebCursorInfo::kTypeNoDrop:
       return "xterm";
-    case WebCursorInfo::TypeCopy:
+    case WebCursorInfo::kTypeCopy:
       return "xterm";
-    case WebCursorInfo::TypeNone:
+    case WebCursorInfo::kTypeNone:
       return "left_ptr";
-    case WebCursorInfo::TypeNotAllowed:
+    case WebCursorInfo::kTypeNotAllowed:
       return "left_ptr";
-    case WebCursorInfo::TypeZoomIn:
+    case WebCursorInfo::kTypeZoomIn:
       return "left_ptr";
-    case WebCursorInfo::TypeZoomOut:
+    case WebCursorInfo::kTypeZoomOut:
       return "left_ptr";
-    case WebCursorInfo::TypeGrab:
-    case WebCursorInfo::TypeGrabbing:
+    case WebCursorInfo::kTypeGrab:
+    case WebCursorInfo::kTypeGrabbing:
       return "grabbing";
-    case WebCursorInfo::TypeCustom:
+    case WebCursorInfo::kTypeCustom:
       return "left_ptr";
   }
   NOTREACHED();
@@ -108,89 +108,89 @@ const char* GetCursorName(int type) {
 #else
 int GetCursorType(int type) {
   switch (type) {
-    case WebCursorInfo::TypePointer:
+    case WebCursorInfo::kTypePointer:
       return ECORE_X_CURSOR_ARROW;
-    case WebCursorInfo::TypeCross:
+    case WebCursorInfo::kTypeCross:
       return ECORE_X_CURSOR_CROSS;
-    case WebCursorInfo::TypeHand:
+    case WebCursorInfo::kTypeHand:
       return ECORE_X_CURSOR_HAND2;
-    case WebCursorInfo::TypeIBeam:
+    case WebCursorInfo::kTypeIBeam:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeWait:
+    case WebCursorInfo::kTypeWait:
       return ECORE_X_CURSOR_WATCH;
-    case WebCursorInfo::TypeHelp:
+    case WebCursorInfo::kTypeHelp:
       return ECORE_X_CURSOR_QUESTION_ARROW;
-    case WebCursorInfo::TypeEastResize:
+    case WebCursorInfo::kTypeEastResize:
       return ECORE_X_CURSOR_RIGHT_SIDE;
-    case WebCursorInfo::TypeNorthResize:
+    case WebCursorInfo::kTypeNorthResize:
       return ECORE_X_CURSOR_TOP_SIDE;
-    case WebCursorInfo::TypeNorthEastResize:
+    case WebCursorInfo::kTypeNorthEastResize:
       return ECORE_X_CURSOR_TOP_RIGHT_CORNER;
-    case WebCursorInfo::TypeNorthWestResize:
+    case WebCursorInfo::kTypeNorthWestResize:
       return ECORE_X_CURSOR_TOP_LEFT_CORNER;
-    case WebCursorInfo::TypeSouthResize:
+    case WebCursorInfo::kTypeSouthResize:
       return ECORE_X_CURSOR_BOTTOM_SIDE;
-    case WebCursorInfo::TypeSouthEastResize:
+    case WebCursorInfo::kTypeSouthEastResize:
       return ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER;
-    case WebCursorInfo::TypeSouthWestResize:
+    case WebCursorInfo::kTypeSouthWestResize:
       return ECORE_X_CURSOR_BOTTOM_LEFT_CORNER;
-    case WebCursorInfo::TypeWestResize:
+    case WebCursorInfo::kTypeWestResize:
       return ECORE_X_CURSOR_LEFT_SIDE;
-    case WebCursorInfo::TypeNorthSouthResize:
+    case WebCursorInfo::kTypeNorthSouthResize:
       return ECORE_X_CURSOR_SB_V_DOUBLE_ARROW;
-    case WebCursorInfo::TypeEastWestResize:
+    case WebCursorInfo::kTypeEastWestResize:
       return ECORE_X_CURSOR_SB_H_DOUBLE_ARROW;
-    case WebCursorInfo::TypeNorthEastSouthWestResize:
-    case WebCursorInfo::TypeNorthWestSouthEastResize:
+    case WebCursorInfo::kTypeNorthEastSouthWestResize:
+    case WebCursorInfo::kTypeNorthWestSouthEastResize:
       // There isn't really a useful cursor available for these.
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeColumnResize:
+    case WebCursorInfo::kTypeColumnResize:
       return ECORE_X_CURSOR_SB_H_DOUBLE_ARROW;  // TODO(evanm): is this correct?
-    case WebCursorInfo::TypeRowResize:
+    case WebCursorInfo::kTypeRowResize:
       return ECORE_X_CURSOR_SB_V_DOUBLE_ARROW;  // TODO(evanm): is this correct?
-    case WebCursorInfo::TypeMiddlePanning:
+    case WebCursorInfo::kTypeMiddlePanning:
       return ECORE_X_CURSOR_FLEUR;
-    case WebCursorInfo::TypeEastPanning:
+    case WebCursorInfo::kTypeEastPanning:
       return ECORE_X_CURSOR_SB_RIGHT_ARROW;
-    case WebCursorInfo::TypeNorthPanning:
+    case WebCursorInfo::kTypeNorthPanning:
       return ECORE_X_CURSOR_SB_UP_ARROW;
-    case WebCursorInfo::TypeNorthEastPanning:
+    case WebCursorInfo::kTypeNorthEastPanning:
       return ECORE_X_CURSOR_TOP_RIGHT_CORNER;
-    case WebCursorInfo::TypeNorthWestPanning:
+    case WebCursorInfo::kTypeNorthWestPanning:
       return ECORE_X_CURSOR_TOP_LEFT_CORNER;
-    case WebCursorInfo::TypeSouthPanning:
+    case WebCursorInfo::kTypeSouthPanning:
       return ECORE_X_CURSOR_SB_DOWN_ARROW;
-    case WebCursorInfo::TypeSouthEastPanning:
+    case WebCursorInfo::kTypeSouthEastPanning:
       return ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER;
-    case WebCursorInfo::TypeSouthWestPanning:
+    case WebCursorInfo::kTypeSouthWestPanning:
       return ECORE_X_CURSOR_BOTTOM_LEFT_CORNER;
-    case WebCursorInfo::TypeWestPanning:
+    case WebCursorInfo::kTypeWestPanning:
       return ECORE_X_CURSOR_SB_LEFT_ARROW;
-    case WebCursorInfo::TypeMove:
+    case WebCursorInfo::kTypeMove:
       return ECORE_X_CURSOR_FLEUR;
-    case WebCursorInfo::TypeVerticalText:
+    case WebCursorInfo::kTypeVerticalText:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeCell:
+    case WebCursorInfo::kTypeCell:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeContextMenu:
+    case WebCursorInfo::kTypeContextMenu:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeAlias:
+    case WebCursorInfo::kTypeAlias:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeProgress:
+    case WebCursorInfo::kTypeProgress:
       return ECORE_X_CURSOR_WATCH;
-    case WebCursorInfo::TypeNoDrop:
+    case WebCursorInfo::kTypeNoDrop:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeCopy:
+    case WebCursorInfo::kTypeCopy:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeNone:
+    case WebCursorInfo::kTypeNone:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeNotAllowed:
+    case WebCursorInfo::kTypeNotAllowed:
       return ECORE_X_CURSOR_XTERM;
-    case WebCursorInfo::TypeZoomIn:
-    case WebCursorInfo::TypeZoomOut:
-    case WebCursorInfo::TypeGrab:
-    case WebCursorInfo::TypeGrabbing:
-    case WebCursorInfo::TypeCustom:
+    case WebCursorInfo::kTypeZoomIn:
+    case WebCursorInfo::kTypeZoomOut:
+    case WebCursorInfo::kTypeGrab:
+    case WebCursorInfo::kTypeGrabbing:
+    case WebCursorInfo::kTypeCustom:
       return ECORE_X_CURSOR_XTERM; // Need to check the ECORE_X_CURSOR_XTERM
   }
   NOTREACHED();
index 023874db72c7c3349ea397573e08b622e8a15de1..cdd423fef4606db164be969a6ff736d21cd2690d 100644 (file)
@@ -11,7 +11,7 @@
 #include "media/base/efl/demuxer_stream_player_params_efl.h"
 #include "media/base/efl/media_player_manager_efl.h"
 #include "media/base/media_keys.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
 #include "ui/gfx/geometry/rect_f.h"
 
 #undef IPC_MESSAGE_EXPORT
index bbea3d71a4e86d061aa67ac3a2629f11b11251e7..0ac6cbee51426290cdb0d910c8ad2e190c2bd4c8 100644 (file)
@@ -15,7 +15,7 @@
 #include "build/tizen_version.h"
 
 #if defined(OS_TIZEN)
-#include <app.h>
+#include <appfw/app.h>
 #if TIZEN_VERSION_AT_LEAST(3,0,0)
 #include <tzplatform_config.h>
 #endif
@@ -28,8 +28,11 @@ const base::FilePath::CharType kExePath[] = FILE_PATH_LITERAL(EXE_DIR);
 const base::FilePath::CharType kApplicationDataDir[] = FILE_PATH_LITERAL("data");
 const base::FilePath::CharType kApplicationCacheDir[] = FILE_PATH_LITERAL("cache");
 #endif
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
 const base::FilePath::CharType kLocalePath[] = FILE_PATH_LITERAL(LOCALE_DIR);
 const base::FilePath::CharType kEdjePath[] = FILE_PATH_LITERAL(EDJE_DIR);
+#endif  // !defined(EWK_BRINGUP)
 const base::FilePath::CharType kApplicationName[] = FILE_PATH_LITERAL("chromium-efl");
 const base::FilePath::CharType kApplicationDataBaseDir[] = FILE_PATH_LITERAL("db");
 
@@ -163,10 +166,16 @@ bool PathProvider(int key, base::FilePath* result) {
       return true;
 #endif
     case DIR_LOCALE:
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      // FIXME: EWK_BRINGUP definition should be removed.
       *result = base::FilePath(kLocalePath);
+#endif  // !defined(EWK_BRINGUP)
       return true;
     case EDJE_RESOURCE_DIR:
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+      // FIXME: EWK_BRINGUP definition should be removed.
       *result = base::FilePath(kEdjePath);
+#endif  // !defined(EWK_BRINGUP)
       return true;
     case DIR_DOWNLOADS:
       *result = GetDirDownloads();
index 5b7fa26b02dd6a303916f48099713525615ffceb..1110613aba9104abc38e24ce04402081537a5f90 100644 (file)
@@ -8,6 +8,8 @@
     'gpu/in_process_gpu_thread_efl.cc',
     'gpu/shared_mailbox_manager.h',
     'gpu/shared_mailbox_manager.cc',
+    '//gpu/command_buffer/service/mailbox_manager_impl.h',
+    '//gpu/command_buffer/service/mailbox_manager_impl.cc',
   ],
   'sources/': [
     [ 'exclude', 'gpu/in_process_gpu_thread.cc$' ],
index 97a5235b905fa81d85cd17f6d5b5229da7388fcc..4c3af83f84e441550107fd5ffd4dfc75ac9d2ab6 100644 (file)
@@ -7,6 +7,8 @@ external_content_gpu_efl_sources = [
   "//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 529fd0c85325ebf9469466515c0933bcd8a95304..2e8985f42f05051c710dd46cda37238e2f5e3086 100644 (file)
@@ -2,13 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "content/common/gpu_host_messages.h"
 #include "content/gpu/gpu_process.h"
 #include "content/gpu/shared_mailbox_manager.h"
-#include "ui/gl/gl_shared_context_efl.h"
+#include "content/public/common/content_client.h"
+#include "content/public/gpu/content_gpu_client.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
 #include "gpu/ipc/service/gpu_channel_manager.h"
 namespace content {
 
 struct GpuChildThreadEfl : public content::GpuChildThread {
-  explicit GpuChildThreadEfl(const gpu::GpuPreferences& gpu_preferences,
-                             const content::InProcessChildThreadParams& params,
-                             gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory)
-      : GpuChildThread(gpu_preferences,
-                       params,
-                       gpu_memory_buffer_factory) {}
-
-  bool OnControlMessageReceived(const IPC::Message& msg) override {
-    bool handled = true;
-    IPC_BEGIN_MESSAGE_MAP(GpuChildThreadEfl, msg)
-      IPC_MESSAGE_HANDLER(GpuMsg_Initialize, OnInitialize)
-      IPC_MESSAGE_UNHANDLED(handled = false)
-    IPC_END_MESSAGE_MAP()
+  explicit GpuChildThreadEfl(
+      const InProcessChildThreadParams& params,
+      std::unique_ptr<gpu::GpuInit> gpu_init)
+      : GpuChildThread(params, std::move(gpu_init)) {}
 
-    if (handled)
-      return true;
+  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 GpuChildThread::OnControlMessageReceived(msg);
+    return ChildThreadImpl::Send(msg);
   }
 
-  void OnInitialize(const gpu::GpuPreferences& preferences) {
-    GpuChildThread::OnInitialize(preferences);
+  // 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));
+  } 
 
-    // Override GpuChannelManager's default shared group and mailbox instances.
-    gpu_channel_manager_->share_group_ =
-        GLSharedContextEfl::GetShareGroup();
-    gpu_channel_manager_->mailbox_manager_ =
-        SharedMailboxManager::GetMailboxManager();
-  }
 };
 
 struct InProcessGpuThreadEfl : public content::InProcessGpuThread {
   explicit InProcessGpuThreadEfl(
       const content::InProcessChildThreadParams& params,
       const gpu::GpuPreferences& gpu_preferences)
-      : InProcessGpuThread(params,
-                           gpu_preferences) {}
+      : InProcessGpuThread(params) {}
 
   void Init() override {
     gpu_process_ = new content::GpuProcess(base::ThreadPriority::NORMAL);
+
+    gpu::GPUInfo gpu_info;
+    gpu::CollectContextGraphicsInfo(&gpu_info);
+
+    auto* client = GetContentClient()->gpu();
+    auto gpu_init = std::make_unique<gpu::GpuInit>();
+      gpu_init->InitializeInProcess(base::CommandLine::ForCurrentProcess(),
+                                    client ? client->GetGPUInfo() : nullptr,
+                                    client ? client->GetGpuFeatureInfo() : nullptr);
     // The process object takes ownership of the thread object, so do not
     // save and delete the pointer.
     gpu_process_->set_main_thread(new GpuChildThreadEfl(
-        gpu_preferences_, params_, gpu_memory_buffer_factory_.get()));
+        params_, std::move(gpu_init)));
   }
 };
 
index c7df3a461261369b40ae320671360fca45b1693f..bc887c0d2073688b9038ef4552a5a2272064ec0c 100644 (file)
@@ -8,11 +8,12 @@
 
 namespace content {
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 // static
 gpu::gles2::MailboxManager* SharedMailboxManager::GetMailboxManager() {
-  static scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_ =
+  static gpu::gles2::MailboxManager mailbox_manager_ =
       new gpu::gles2::MailboxManagerImpl();
-  return mailbox_manager_.get();
+  return mailbox_manager_;
 }
-
+#endif  // !defined(EWK_BRINGUP)
 }
index 3f08186991e48700f23b7a5eb6699c0abc9dd593..df3382fb80366aa591b0edd23c1fbc0d751a22f2 100644 (file)
@@ -11,7 +11,9 @@ namespace gles2 {
 }
 
 namespace content {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   struct CONTENT_EXPORT SharedMailboxManager {
     static gpu::gles2::MailboxManager* GetMailboxManager();
   };
+#endif  // !defined(EWK_BRINGUP)
 }
index 769b31e7ea6f474b09c1448fa3870c0726f9c6a3..e353fb7863dc01544296096e661fed0c733b7b52 100644 (file)
@@ -10,8 +10,9 @@
 #include "content/common/content_export.h"
 #include "content/public/common/context_menu_params.h"
 #include "content/public/common/menu_item.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
-#include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
+#include "third_party/blink/public/platform/web_gesture_event.h"
+#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/platform/modules/screen_orientation/web_screen_orientation_lock_type.h"
 #include "ui/gfx/geometry/rect.h"
 
 namespace content {
index 0e1ade46a4b5005c7c720a2f3e027afc209599b2..ab42639770aa7798dbde7efce73b28e645421123 100644 (file)
@@ -12,7 +12,7 @@
 #include "media/blink/webmediasource_impl.h"
 #include "media/filters/chunk_demuxer.h"
 #include "media/filters/decrypting_demuxer_stream.h"
-#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
+#include "third_party/blink/public/web/WebRuntimeFeatures.h"
 
 namespace content {
 
index 8592af4ef725a0c4457e9f3fe1d6bfc3c50ac416..cb8051056174f58bfae7cdd25da1293c9b25b766 100644 (file)
@@ -11,7 +11,7 @@
 #include "media/base/media_keys.h"
 #include "media/filters/chunk_demuxer.h"
 #include "media/filters/decrypting_demuxer_stream.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
 
 namespace content {
 
index a2deb13763f9d6e033c52c373f063f959052adff..bfb4d042eaacac9197cdc541167bd20b4f477861 100644 (file)
@@ -11,7 +11,7 @@
 #include "content/common/media/efl/media_player_messages_enums_efl.h"
 #include "content/public/renderer/render_frame_observer.h"
 #include "media/base/efl/media_player_efl.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
 #include "url/gurl.h"
 #if defined(TIZEN_TBM_SUPPORT)
 #include "ui/gfx/gpu_memory_buffer.h"
index f2cbc0eb9d00d340ed2bb750d39f311d5f842c59..360ce84124e2323bf1bd0951e68351c30e227899 100644 (file)
@@ -15,8 +15,8 @@
 #include "media/base/video_frame.h"
 #include "media/blink/webmediaplayer_util.h"
 #include "third_party/libyuv/include/libyuv/planar_functions.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayerClient.h"
 
 #define BIND_TO_RENDER_LOOP(function) \
   (DCHECK(main_loop_->BelongsToCurrentThread()), \
index 887a8b182e80ccafcd589a1fd123bb8712821016..a5d2d934c83eafe49e2c677b9a072360460ebeff 100644 (file)
@@ -17,8 +17,8 @@
 #include "media/blink/video_frame_compositor.h"
 #include "media/blink/webmediaplayer_params.h"
 #include "media/renderers/skcanvas_video_renderer.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayerEncryptedMediaClient.h"
 
 #if defined(TIZEN_MULTIMEDIA_EME_SUPPORT)
 #include "media/blink/encrypted_media_player_support.h"
index ac9c273f523f261ee51b9349c5bcaee3c3721129..495680429db6b9674943296c52a58ed37b4237e3 100644 (file)
@@ -15,7 +15,7 @@
 #include "media/base/efl/webaudio_media_codec_info_efl.h"
 #include "media/base/limits.h"
 #include "public/platform/Platform.h"
-#include "third_party/WebKit/public/platform/WebAudioBus.h"
+#include "third_party/blink/public/platform/WebAudioBus.h"
 
 namespace content {
 
index 10a291510488085a9fd95b1e4978265e23aded3a..bf0a051f95d951bd4d818283a167b515e08123f4 100644 (file)
@@ -9,11 +9,11 @@
 #include "content/common/tts_messages_efl.h"
 #include "content/common/tts_utterance_request_efl.h"
 #include "content/public/renderer/render_thread.h"
-#include "third_party/WebKit/public/platform/WebCString.h"
-#include "third_party/WebKit/public/platform/WebSpeechSynthesisUtterance.h"
-#include "third_party/WebKit/public/platform/WebSpeechSynthesisVoice.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/WebKit/public/platform/WebVector.h"
+#include "third_party/blink/public/platform/WebCString.h"
+#include "third_party/blink/public/platform/WebSpeechSynthesisUtterance.h"
+#include "third_party/blink/public/platform/WebSpeechSynthesisVoice.h"
+#include "third_party/blink/public/platform/WebString.h"
+#include "third_party/blink/public/platform/WebVector.h"
 
 namespace content {
 int TtsDispatcherEfl::next_utterance_id_ = 1;
index 7ccf83d5c0b5fae2b3e39f77bdd1bcec36aecc7e..e5db2f38ea6c2c9db36b0e0c8bc83cd8b3fa2309 100644 (file)
@@ -11,8 +11,8 @@
 #include "base/containers/hash_tables.h"
 #include "content/common/content_export.h"
 #include "content/public/renderer/render_thread_observer.h"
-#include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h"
-#include "third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h"
+#include "third_party/blink/public/platform/WebSpeechSynthesizer.h"
+#include "third_party/blink/public/platform/WebSpeechSynthesizerClient.h"
 
 namespace IPC {
 class Message;
index ba81742fd53191197c35ab3d2df58b88729ffa75..c092560a8fcb638caf4645c8b5a2fab2672f95c5 100644 (file)
@@ -25,14 +25,13 @@ namespace content {
 class Shell::Impl {
  public:
   Impl(Shell* shell, Evas_Object* window)
-      : url_bar_(NULL)
-      , refresh_btn_(NULL)
-      , stop_btn_(NULL)
-      , back_btn_(NULL)
-      , forward_btn_(NULL)
-      , shell_(shell) {
-
-    Evas_Object *box = elm_box_add(window);
+      : url_bar_(NULL),
+        refresh_btn_(NULL),
+        stop_btn_(NULL),
+        back_btn_(NULL),
+        forward_btn_(NULL),
+        shell_(shell) {
+    Evas_Object* box = elm_box_add(window);
     evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
     evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     elm_win_resize_object_add(window, box);
@@ -41,8 +40,8 @@ class Shell::Impl {
     if (!switches::IsRunLayoutTestSwitchPresent())
       CreateURLBar(box);
 
-    Evas_Object* view = static_cast<Evas_Object*>(
-        shell->web_contents()->GetNativeView());
+    Evas_Object* view =
+        static_cast<Evas_Object*>(shell->web_contents()->GetNativeView());
     evas_object_size_hint_align_set(view, EVAS_HINT_FILL, EVAS_HINT_FILL);
     evas_object_size_hint_weight_set(view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     elm_box_pack_end(box, view);
@@ -55,7 +54,7 @@ class Shell::Impl {
     evas_object_size_hint_weight_set(wrapper, EVAS_HINT_EXPAND, 0.0f);
     evas_object_show(wrapper);
 
-    Evas_Object *button_box = elm_box_add(wrapper);
+    Evas_Objectbutton_box = elm_box_add(wrapper);
     elm_box_horizontal_set(button_box, EINA_TRUE);
 
     Evas_Object* new_window_button = AddButton(button_box, "file", OnNewWindow);
@@ -81,7 +80,8 @@ class Shell::Impl {
     elm_entry_single_line_set(url_bar_, EINA_TRUE);
     elm_entry_scrollable_set(url_bar_, EINA_TRUE);
     evas_object_size_hint_align_set(url_bar_, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    evas_object_size_hint_weight_set(url_bar_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_weight_set(url_bar_, EVAS_HINT_EXPAND,
+                                     EVAS_HINT_EXPAND);
     elm_entry_input_panel_layout_set(url_bar_, ELM_INPUT_PANEL_LAYOUT_URL);
     evas_object_size_hint_weight_set(url_bar_, EVAS_HINT_EXPAND, 0.0f);
     evas_object_size_hint_align_set(url_bar_, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -93,7 +93,8 @@ class Shell::Impl {
   }
 
   Evas_Object* AddButton(Evas_Object* parent_box,
-      const char* icon_name, Evas_Smart_Cb cb) {
+                         const char* icon_name,
+                         Evas_Smart_Cb cb) {
     Evas_Object* btn = elm_button_add(parent_box);
     Evas_Object* icon = elm_icon_add(parent_box);
     elm_icon_standard_set(icon, icon_name);
@@ -128,9 +129,7 @@ class Shell::Impl {
     Shell* shell = static_cast<Shell::Impl*>(data)->shell_;
     gfx::Size initial_size = Shell::GetShellDefaultSize();
     Shell::CreateNewWindow(shell->web_contents()->GetBrowserContext(),
-                           GURL("https://www.google.com"),
-                           NULL,
-                           initial_size);
+                           GURL("https://www.google.com"), NULL, initial_size);
   }
 
   static void OnForward(void* data, Evas_Object*, void*) {
@@ -145,7 +144,7 @@ class Shell::Impl {
     static_cast<Shell::Impl*>(data)->shell_->Stop();
   }
 
-  static void OnURLEntered(void *data, Evas_Object *obj, void*) {
+  static void OnURLEntered(void* data, Evas_Object* obj, void*) {
     GURL url(elm_object_text_get(obj));
     if (!url.has_scheme()) {
       url = GURL(std::string("http://") + elm_object_text_get(obj));
@@ -180,8 +179,7 @@ void Shell::PlatformExit() {
   LOG(INFO) << "EFL Shell platform exit";
 }
 
-void Shell::PlatformCleanUp() {
-}
+void Shell::PlatformCleanUp() {}
 
 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
   impl_->ToggleControl(control, is_enabled);
@@ -191,16 +189,14 @@ void Shell::PlatformSetAddressBarURL(const GURL& url) {
   impl_->SetAddressBarURL(url.spec().c_str());
 }
 
-void Shell::PlatformSetIsLoading(bool loading) {
-}
+void Shell::PlatformSetIsLoading(bool loading) {}
 
-void Shell::PlatformCreateWindow(int width, int height) {
-}
+void Shell::PlatformCreateWindow(int width, int height) {}
 
 void Shell::PlatformSetContents() {
   Evas_Object* win = efl::WindowFactory::GetHostWindow(web_contents_.get());
-  evas_object_smart_callback_add(win, "delete,request",
-      OnShellWindowDelRequest, this);
+  evas_object_smart_callback_add(win, "delete,request", OnShellWindowDelRequest,
+                                 this);
   gfx::Size initial_size = Shell::GetShellDefaultSize();
   evas_object_resize(win, initial_size.width(), initial_size.height());
   evas_object_show(win);
@@ -208,8 +204,7 @@ void Shell::PlatformSetContents() {
   impl_ = new Impl(this, static_cast<Evas_Object*>(window_));
 }
 
-void Shell::PlatformResizeSubViews() {
-}
+void Shell::PlatformResizeSubViews() {}
 
 void Shell::Close() {
   LOG(INFO) << "Closing Content Shell EFL";
@@ -218,19 +213,16 @@ void Shell::Close() {
 }
 
 void Shell::PlatformSetTitle(const base::string16& title) {
-  elm_win_title_set(static_cast<Evas_Object*>(window_), UTF16ToUTF8(title).c_str());
-}
-
-bool Shell::PlatformHandleContextMenu(
-    const content::ContextMenuParams& params) {
-  return false;
+  elm_win_title_set(static_cast<Evas_Object*>(window_),
+                    base::UTF16ToUTF8(title).c_str());
 }
 
-JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(WebContents* source) {
+JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(
+    WebContents* source) {
   if (!dialog_manager_) {
     if (switches::IsRunLayoutTestSwitchPresent()) {
       dialog_manager_.reset(new LayoutTestJavaScriptDialogManager);
-    } else  {
+    } else {
       dialog_manager_.reset(new JavaScriptDialogManagerEfl);
     }
   }
index 4faa4ca5c1ded56d053a0ac47541b0f552264e76..95fa16d8370aa677f65b750b7194427939f0f762 100644 (file)
@@ -15,7 +15,7 @@
 #include "content/shell/browser/shell_content_browser_client.h"
 #include "content/shell/browser/shell_devtools_frontend.h"
 #include "content/shell/common/shell_switches.h"
-#include "third_party/WebKit/public/web/WebContextMenuData.h"
+#include "third_party/blink/public/web/WebContextMenuData.h"
 
 using blink::WebContextMenuData;
 
@@ -26,20 +26,16 @@ namespace {
 static Evas_Object* g_context_menu = NULL;
 
 void OpenInNewWindow(void* data, Evas_Object*, void*) {
-  const ContextMenuParams* params =
-      static_cast<const ContextMenuParams*>(data);
+  const ContextMenuParams* params = static_cast<const ContextMenuParams*>(data);
   ShellBrowserContext* browser_context =
       ShellContentBrowserClient::Get()->browser_context();
-  Shell::CreateNewWindow(browser_context,
-                         params->link_url,
-                         NULL,
-                         gfx::Size());
+  Shell::CreateNewWindow(browser_context, params->link_url, NULL, gfx::Size());
 }
 
 void StartDragging(void* data, Evas_Object*, void*) {
   WebContents* wc = static_cast<WebContents*>(data);
   RenderViewHost* rvh = wc->GetRenderViewHost();
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   rvh->StartDragging();
 #endif
 }
@@ -78,10 +74,9 @@ void Back(void* data, Evas_Object*, void*) {
 
 void Reload(void* data, Evas_Object*, void*) {
   WebContents* wc = static_cast<WebContents*>(data);
-  wc->GetController().Reload(false);
+  wc->GetController().Reload(content::ReloadType::NORMAL, false);
   wc->Focus();
 }
-
 }
 
 WebContentsViewDelegate* CreateShellWebContentsViewDelegate(
@@ -91,11 +86,9 @@ WebContentsViewDelegate* CreateShellWebContentsViewDelegate(
 
 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate(
     WebContents* web_contents)
-    : web_contents_(web_contents) {
-}
+    : web_contents_(web_contents) {}
 
-ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
-}
+ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {}
 
 void ShellWebContentsViewDelegate::ShowContextMenu(
     RenderFrameHost* render_frame_host,
@@ -118,48 +111,44 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
   Elm_Object_Item* menu_it = NULL;
 
   if (has_link) {
-    elm_menu_item_add(menu, NULL, NULL, "Open in new window",
-        OpenInNewWindow, &params_);
+    elm_menu_item_add(menu, NULL, NULL, "Open in new window", OpenInNewWindow,
+                      &params_);
     elm_menu_item_separator_add(menu, NULL);
   }
 
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (params.is_draggable) {
-    elm_menu_item_add(menu, NULL, NULL, "Start dragging",
-        StartDragging, web_contents_);
+    elm_menu_item_add(menu, NULL, NULL, "Start dragging", StartDragging,
+                      web_contents_);
   }
 #endif
 
   if (params_.is_editable) {
-    menu_it = elm_menu_item_add(menu, NULL, NULL, "Cut",
-       Cut, web_contents_);
-    elm_object_item_disabled_set(menu_it,
-        (params_.edit_flags & WebContextMenuData::CanCut) == 0);
-    menu_it = elm_menu_item_add(menu, NULL, NULL, "Copy",
-          Copy, web_contents_);
-    elm_object_item_disabled_set(menu_it,
-        (params_.edit_flags & WebContextMenuData::CanCopy) == 0);
-    menu_it = elm_menu_item_add(menu, NULL, NULL, "Paste",
-          Paste, web_contents_);
-    elm_object_item_disabled_set(menu_it,
-        (params_.edit_flags & WebContextMenuData::CanPaste) == 0);
-    menu_it = elm_menu_item_add(menu, NULL, "delete", "Delete",
-          Delete, web_contents_);
-    elm_object_item_disabled_set(menu_it,
-        (params_.edit_flags & WebContextMenuData::CanDelete) == 0);
+    menu_it = elm_menu_item_add(menu, NULL, NULL, "Cut", Cut, web_contents_);
+    elm_object_item_disabled_set(
+        menu_it, (params_.edit_flags & WebContextMenuData::kCanCut) == 0);
+    menu_it = elm_menu_item_add(menu, NULL, NULL, "Copy", Copy, web_contents_);
+    elm_object_item_disabled_set(
+        menu_it, (params_.edit_flags & WebContextMenuData::kCanCopy) == 0);
+    menu_it =
+        elm_menu_item_add(menu, NULL, NULL, "Paste", Paste, web_contents_);
+    elm_object_item_disabled_set(
+        menu_it, (params_.edit_flags & WebContextMenuData::kCanPaste) == 0);
+    menu_it = elm_menu_item_add(menu, NULL, "delete", "Delete", Delete,
+                                web_contents_);
+    elm_object_item_disabled_set(
+        menu_it, (params_.edit_flags & WebContextMenuData::kCanDelete) == 0);
     elm_menu_item_separator_add(menu, NULL);
   }
 
-  menu_it = elm_menu_item_add(menu, NULL, "back", "Back",
-      Back, web_contents_);
+  menu_it = elm_menu_item_add(menu, NULL, "back", "Back", Back, web_contents_);
   elm_object_item_disabled_set(menu_it,
-      !web_contents_->GetController().CanGoBack());
-  menu_it = elm_menu_item_add(menu, NULL, "forward", "Forward",
-        Forward, web_contents_);
+                               !web_contents_->GetController().CanGoBack());
+  menu_it = elm_menu_item_add(menu, NULL, "forward", "Forward", Forward,
+                              web_contents_);
   elm_object_item_disabled_set(menu_it,
-      !web_contents_->GetController().CanGoForward());
-  elm_menu_item_add(menu, NULL, "reload", "Reload",
-      Reload, web_contents_);
+                               !web_contents_->GetController().CanGoForward());
+  elm_menu_item_add(menu, NULL, "reload", "Reload", Reload, web_contents_);
 
   g_context_menu = menu;
   elm_menu_move(menu, params.x, params.y);
index 23deb1d93e710a605cd7c2171915c36244cab8af..7be6088066fc2322d9a17b09d674321aa85148aa 100644 (file)
@@ -4,8 +4,9 @@
 
 #include "device/battery/battery_status_manager_tizen.h"
 
-#include <vconf/vconf.h>
+#include <device/battery.h>
 #include <system/device.h>
+#include <vconf/vconf.h>
 
 namespace device {
 
@@ -220,6 +221,7 @@ int BatteryStatusManagerTizen::GetRemainingTimeUntilDischarged(
 }
 
 bool BatteryStatusManagerTizen::StartListeningBatteryChange() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (vconf_notify_key_changed(
           VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, OnChargingStatusChanged, this) ||
       device_battery_set_cb(OnLevelChanged, this) != DEVICE_ERROR_NONE ||
@@ -230,6 +232,7 @@ bool BatteryStatusManagerTizen::StartListeningBatteryChange() {
     StopListeningBatteryChange();
     return false;
   }
+#endif
 
   int charging = 0;
   if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &charging) < 0)
@@ -256,7 +259,9 @@ void BatteryStatusManagerTizen::StopListeningBatteryChange() {
   UnsetRemainingTimeUntilDischargedCb();
   vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
       OnChargingStatusChanged);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   device_battery_unset_cb();
+#endif
 }
 
 }  // namespace device
index 3057af7d1f8c65eb9949729c972d1271824e2213..c6313e19617ebcc318dec1ee3c2cbab958e21884 100644 (file)
@@ -8,6 +8,12 @@
 
 namespace device {
 
+VibrationManagerImplEfl::VibrationManagerImplEfl() {
+}
+
+VibrationManagerImplEfl::~VibrationManagerImplEfl() {
+}
+
 std::unique_ptr<VibrationProviderClient> VibrationManagerImplEfl::provider_client_ = std::unique_ptr<VibrationProviderClient>();
 
 void VibrationManagerImplEfl::Vibrate(int64_t milliseconds, const VibrateCallback& callback) {
@@ -30,7 +36,7 @@ void VibrationManagerImplEfl::RegisterProviderClient(VibrationProviderClient* pr
 // static
 void VibrationManagerImpl::Create(
     mojo::InterfaceRequest<VibrationManager> request) {
-  new VibrationManagerImplEfl(std::move(request));
+  new VibrationManagerImplEfl();
 }
 
 }  // namespace device
index 3afd983368d0bfd38d1ec6a1bc2a0640037b4d89..2cac114db62f42cc5778959c3ccdb73f74bb979c 100644 (file)
@@ -5,19 +5,17 @@
 #ifndef VIBRATION_MANAGER_IMPL_EFL_H
 #define VIBRATION_MANAGER_IMPL_EFL_H
 
-#include "device/vibration/vibration_manager_impl.h"
+#include "services/device/vibration/vibration_manager_impl.h"
 
-#include "device/vibration/vibration_export.h"
-#include "device/vibration/vibration_provider_client.h"
+#include "services/device/vibration/vibration_export.h"
+#include "services/device/vibration/vibration_provider_client.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
 namespace device {
 
 class DEVICE_VIBRATION_EXPORT VibrationManagerImplEfl : public VibrationManager {
  public:
-  explicit VibrationManagerImplEfl(
-      mojo::InterfaceRequest<VibrationManager> request)
-      : binding_(this, std::move(request)) {}
+  VibrationManagerImplEfl();
   ~VibrationManagerImplEfl() override {}
 
   void Vibrate(int64_t milliseconds, const VibrateCallback& callback) override;
@@ -26,10 +24,6 @@ class DEVICE_VIBRATION_EXPORT VibrationManagerImplEfl : public VibrationManager
   static void RegisterProviderClient(VibrationProviderClient* provider_client);
 
  private:
-  friend VibrationManagerImpl;
-
-  // The binding between this object and the other end of the pipe.
-  mojo::StrongBinding<VibrationManager> binding_;
 
   static std::unique_ptr<VibrationProviderClient> provider_client_;
 };
index 5ef38f0a634d5120b9feb6d95ce9da403dc9f2aa..3de2d2be81441f13440cd4c70b4c6da644cf7c6d 100644 (file)
@@ -4,9 +4,9 @@
 
 #include "efl/init.h"
 
+#include <Ecore.h>
 #include <Elementary.h>
 #include "ecore_x_wayland_wrapper.h"
-#include <Ecore.h>
 
 #include "base/logging.h"
 #include "base/message_loop/message_loop.h"
@@ -14,6 +14,7 @@
 #include "cc/base/switches.h"
 #include "content/common/paths_efl.h"
 #include "content/public/common/content_switches.h"
+#include "gpu/config/gpu_switches.h"
 #include "ui/compositor/compositor_switches.h"
 #include "ui/display/screen_efl.h"
 #include "ui/gfx/switches.h"
@@ -26,14 +27,14 @@ namespace {
 std::unique_ptr<base::MessagePump> MessagePumpFactory() {
   return std::unique_ptr<base::MessagePump>(new base::MessagePumpEcore);
 }
-} // namespace
+}  // namespace
 
 int Initialize(int argc, const char* argv[]) {
   base::CommandLine::Init(argc, argv);
 
   const base::CommandLine& cmd_line = *base::CommandLine::ForCurrentProcess();
   std::string process_type =
-          cmd_line.GetSwitchValueASCII(switches::kProcessType);
+      cmd_line.GetSwitchValueASCII(switches::kProcessType);
 
   if (process_type != "zygote") {
     elm_init(argc, (char**)argv);
@@ -57,7 +58,12 @@ int Initialize(int argc, const char* argv[]) {
   ui::InstallScreenInstance();
 
 #if defined(USE_OZONE)
-  ui::OzonePlatform::InitializeForUI();
+  ui::OzonePlatform::InitParams params;
+
+  // TODO: If required fetch from command-line argument.
+  params.single_process = false;
+  // params.using_mojo = true;
+  ui::OzonePlatform::InitializeForUI(params);
 #endif
 
   PathsEfl::Register();
@@ -66,11 +72,10 @@ int Initialize(int argc, const char* argv[]) {
 }
 
 void AppendPortParams(base::CommandLine& cmdline) {
-  cmdline.AppendSwitchASCII(switches::kUseGL,
-                            gl::kGLImplementationEGLName);
+  cmdline.AppendSwitchASCII(switches::kUseGL, gl::kGLImplementationEGLName);
   cmdline.AppendSwitch(switches::kInProcessGPU);
 
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 // [M44_2403] Temporary disabling the codes for switching to new chromium
 //            FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14040
 #if defined(OS_TIZEN)
@@ -80,10 +85,10 @@ void AppendPortParams(base::CommandLine& cmdline) {
 
   // Select ETC1 compression method
   if (!cmdline.HasSwitch(cc::switches::kDisableTileCompression) &&
-       cmdline.HasSwitch(cc::switches::kEnableTileCompression))
+      cmdline.HasSwitch(cc::switches::kEnableTileCompression))
     cmdline.AppendSwitch(switches::kDisableGpuRasterization);
 #endif
-#endif // EWK_BRINGUP
+#endif  // EWK_BRINGUP
 
 #if !defined(OS_TIZEN)
   cmdline.AppendSwitch(switches::kIgnoreGpuBlacklist);
@@ -92,7 +97,6 @@ void AppendPortParams(base::CommandLine& cmdline) {
 #if defined(OS_TIZEN_TV)
   cmdline.AppendSwitchASCII(switches::kAcceleratedCanvas2dMSAASampleCount, "4");
 #endif
-
 }
 
-} // namespace efl
+}  // namespace efl
index fc46fa67331575c7c9e1abf387fb3dbea69f8f5a..df059b0791f5379bbd37fbb96f5d4c1b5ad09ed0 100644 (file)
@@ -63,7 +63,6 @@ CollectInfoResult CollectGpuID(uint32_t* vendor_id, uint32_t* device_id) {
 
 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
   DCHECK(gpu_info);
-  gpu_info->can_lose_context = false;
 
   // Create a short-lived context on the UI thread to collect the GL strings.
   // Make sure we restore the existing context if there is one.
index 87c6ab9a9bf9d7ae980f00f0e473386b38bf10e7..cfb7e3da1ac68b457dc14dd62e99fd7b3b1dee49 100644 (file)
@@ -9,15 +9,14 @@ external_exclude_gpu_efl_sources = [
 ]
 
 if (!is_tizen) {
-  external_exclude_gpu_efl_sources += [
-    "gpu_info_collector_linux.cc",
-  ]
+  external_exclude_gpu_efl_sources += [ "gpu_info_collector_linux.cc" ]
 }
 
 external_gpu_efl_sources = [
   "//tizen_src/chromium_impl/gpu/config/gpu_driver_bug_list_json_efl.cc",
   "//tizen_src/chromium_impl/gpu/config/gpu_info_collector_efl.cc",
-  "//tizen_src/chromium_impl/gpu/config/software_rendering_list_json_efl.cc",
   "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc",
-  "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.h"
+  "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.h",
+  "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_evasgl_context.cc",
+  "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_evasgl_context.h",
 ]
index b67089c3d1f70a1135fcac7e2c994c916e9cd35a..7a66b92d5fe4997ec4498218e77b0b3f1458ef34 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "base/memory/shared_memory.h"
 #include "media/base/efl/media_player_efl.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
 
 #if defined(TIZEN_TBM_SUPPORT)
 #include "ui/gfx/gpu_memory_buffer.h"
index 17a48686e6f9ba1aff08fbb88937304a8c89de44..45be13693f14f7217b6ef9b09fdd56b819c9be12 100644 (file)
@@ -15,7 +15,7 @@
 #include "media/base/efl/media_player_efl.h"
 #include "media/base/efl/media_player_util_efl.h"
 #include "media/base/decoder_buffer.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
+#include "third_party/blink/public/platform/WebMediaPlayer.h"
 
 namespace media {
 
index fdc25aa412483397618efb0e6752bc83f1e956c7..1c8b391f5462c61ba560e274bb2cdef554ccdb07 100644 (file)
@@ -4,29 +4,34 @@
 
 #include "RenderThemeChromiumTizen.h"
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
 #include "TizenUserAgentStyleSheets.h"
+#endif  // !defined(EWK_BRINGUP)
 
 namespace blink {
 
-PassRefPtr<LayoutTheme> RenderThemeChromiumTizen::create()
-{
-    return adoptRef(new RenderThemeChromiumTizen());
+RefPtr<LayoutTheme> RenderThemeChromiumTizen::create() {
+  return new RenderThemeChromiumTizen();
 }
 
-LayoutTheme& LayoutTheme::nativeTheme()
-{
-    DEFINE_STATIC_REF(LayoutTheme, renderTheme, (RenderThemeChromiumTizen::create()));
-    return *renderTheme;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: EWK_BRINGUP definition should be removed.
+LayoutTheme& LayoutTheme::nativeTheme() {
+  DEFINE_STATIC_REF(LayoutTheme, renderTheme,
+                    (RenderThemeChromiumTizen::create()));
+  return *renderTheme;
 }
+#endif  // !defined(EWK_BRINGUP)
 
-RenderThemeChromiumTizen::~RenderThemeChromiumTizen()
-{
-}
+RenderThemeChromiumTizen::~RenderThemeChromiumTizen() {}
 
-String RenderThemeChromiumTizen::extraDefaultStyleSheet()
-{
-    return LayoutThemeDefault::extraDefaultStyleSheet() +
-        String(themeChromiumTizenCss, sizeof(themeChromiumTizenCss));
+String RenderThemeChromiumTizen::ExtraDefaultStyleSheet() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  return LayoutThemeDefault::extraDefaultStyleSheet() +
+         String(themeChromiumTizenCss, sizeof(themeChromiumTizenCss))
+#endif  // !defined(EWK_BRINGUP)
 }
 
-} // namespace blink
+}  // namespace blink
index a6e23abe961b51f24fd3ad6dea58d7f40cfcb2ca..9dda884ac3d5c50e5bf302301ec74c9843652af6 100644 (file)
 namespace blink {
 
 class RenderThemeChromiumTizen final : public LayoutThemeDefault {
-public:
-    static PassRefPtr<LayoutTheme> create();
-    String extraDefaultStyleSheet() override;
-
-    bool delegatesMenuListRendering() const override { return true; }
-
-    Color platformTapHighlightColor() const override {
-        return RenderThemeChromiumTizen::defaultTapHighlightColor;
-    }
-private:
-    ~RenderThemeChromiumTizen() override;
-    static const RGBA32 defaultTapHighlightColor = 0x2eee6e1a; // light orange.
+ public:
+  static RefPtr<LayoutTheme> create();
+  String ExtraDefaultStyleSheet() override;
+
+  bool DelegatesMenuListRendering() const override { return true; }
+
+  Color PlatformTapHighlightColor() const override {
+    return RenderThemeChromiumTizen::defaultTapHighlightColor;
+  }
+
+ private:
+  ~RenderThemeChromiumTizen() override;
+  static const RGBA32 defaultTapHighlightColor = 0x2eee6e1a;  // light orange.
 };
 
-} // namespace blink
+}  // namespace blink
 
-#endif // RenderThemeChromiumTizen_h
+#endif  // RenderThemeChromiumTizen_h
index 9132e917da42dd7dd9592b98d52d981bb825198f..9625a1077eafc87fd000f2c3a1d20454cce41128 100644 (file)
@@ -13,6 +13,23 @@ static_library("ui_events_source_inject") {
     "//ui/events/gestures/motion_event_aura.cc",
     "//ui/events/gestures/motion_event_aura.h",
   ]
+  include_dirs = [
+    "//third_party/skia/include/android",
+    "//third_party/skia/include/c",
+    "//third_party/skia/include/codec",
+    "//third_party/skia/include/config",
+    "//third_party/skia/include/core",
+    "//third_party/skia/include/effects",
+    "//third_party/skia/include/encode",
+    "//third_party/skia/include/gpu",
+    "//third_party/skia/include/gpu/gl",
+    "//third_party/skia/include/atlastext",
+    "//third_party/skia/include/pathops",
+    "//third_party/skia/include/ports",
+    "//third_party/skia/include/svg",
+    "//third_party/skia/include/utils",
+    "//third_party/skia/include/utils/mac",
+  ]
 }
 
 static_library("ui_native_theme_inject") {
index 24569777c4f4665c0a3589bbd08c7e8b7c31e874..d154a7770621f94aa429f7cadee5c9481637af62 100644 (file)
@@ -74,6 +74,8 @@ void ClipboardEfl::WriteObjects(ClipboardType type, const ObjectMap& objects) {
   }
 }
 
+void ClipboardEfl::OnPreShutdown() {}
+
 uint64_t ClipboardEfl::GetSequenceNumber(ClipboardType /* type */) const {
   DCHECK(CalledOnValidThread());
   // TODO: implement this. For now this interface will advertise
index 4862a3c897b1cfe3aa27b4ff494e239fa2e68c0a..6b951d4e6a4ad4bb1c27a3b25023c1f10b796763 100644 (file)
@@ -17,6 +17,8 @@ class ClipboardEfl: public Clipboard {
   ~ClipboardEfl() override;
 
   // Clipboard overrides:
+  void OnPreShutdown() override;
+
   uint64_t GetSequenceNumber(ClipboardType type) const override;
   bool IsFormatAvailable(const FormatType& format,
                          ClipboardType type) const override;
index cd9e39aec23d829b08143a87b0e4a51a63fcf154..1c25464932d5d438785ea34e17e645400f055656 100644 (file)
@@ -33,8 +33,7 @@ namespace {
 static std::map<std::string, std::string> s_clipboard;
 #endif
 
-enum ClipType
-{
+enum ClipType {
   CLIP_TYPE_PRIMARY,
   CLIP_TYPE_SECONDARY,
   CLIP_TYPE_CLIPBOARD,
@@ -42,12 +41,11 @@ enum ClipType
   CLIP_TYPE_MAX,
 };
 
-struct ClipData
-{
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+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);
+  void (*request)(Ecore_X_Window window, const char* pTarget);
 #endif
 
   Elm_Sel_Format format;
@@ -63,11 +61,11 @@ struct ClipData
 
 // 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);
+typedef int (*ClipNotifyHandler)(ClipData* clipData,
+                                 Ecore_X_Event_Selection_Notify* notifyData);
 #endif
 
-enum
-{
+enum {
   ATOM_TARGETS = 0,
   ATOM_ATOM,
   ATOM_LISTING_ATOMS = ATOM_ATOM,
@@ -95,11 +93,10 @@ enum
   ATOM_MAX,
 };
 
-struct AtomData
-{
+struct AtomData {
   const char* pName;
   Elm_Sel_Format formats;
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+// TODO: Webview and Rendering TG will implement following for Wayland.
 #if !defined(WAYLAND_BRINGUP)
   ClipNotifyHandler notify;
   Ecore_X_Atom atom;
@@ -110,10 +107,10 @@ AtomData atomList[ATOM_MAX];
 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.
+  ClipboardHelperEflclipboardHelper = 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;
+  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);
@@ -155,13 +152,13 @@ ClipboardHelperEfl::ClipboardHelperEfl() {
   clipboard_window_opened_ = false;
 }
 
-void ClipboardHelperEfl::SetData(const std::string& data, ClipboardDataType type) {
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+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)
-  {
+  switch (type) {
     case CLIPBOARD_DATA_TYPE_PLAIN_TEXT:
     case CLIPBOARD_DATA_TYPE_URI_LIST:
     case CLIPBOARD_DATA_TYPE_URL:
@@ -178,7 +175,7 @@ void ClipboardHelperEfl::SetData(const std::string& data, ClipboardDataType type
 #else
   std::string data_type;
 
-  switch(type) {
+  switch (type) {
     case CLIPBOARD_DATA_TYPE_PLAIN_TEXT:
     case CLIPBOARD_DATA_TYPE_URI_LIST:
     case CLIPBOARD_DATA_TYPE_URL:
@@ -209,7 +206,8 @@ Ecore_X_Window ClipboardHelperEfl::GetCbhmWindow() {
 
   unsigned char* buf = 0;
   int property_size = 0;
-  int property_array_size = ecore_x_window_prop_property_get(0, xAtomCbhm, XA_WINDOW, 0, &buf, &property_size);
+  int property_array_size = ecore_x_window_prop_property_get(
+      0, xAtomCbhm, XA_WINDOW, 0, &buf, &property_size);
 
   if (property_array_size && property_size)
     memcpy(&xCbhmWin, buf, sizeof(Ecore_X_Window));
@@ -222,7 +220,7 @@ Ecore_X_Window ClipboardHelperEfl::GetCbhmWindow() {
 #endif
 
 bool ClipboardHelperEfl::SendCbhmMessage(const std::string& message) {
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+// 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);
@@ -237,10 +235,11 @@ bool ClipboardHelperEfl::SendCbhmMessage(const std::string& message) {
   messageEvent.window = xwin;
   messageEvent.message_type = atom_cbhm_item;
   messageEvent.format = 8; /* data should be viewed as byte */
-  snprintf(messageEvent.data.b, sizeof(messageEvent.data.b), "%s", message.c_str());
+  snprintf(messageEvent.data.b, sizeof(messageEvent.data.b), "%s",
+           message.c_str());
 
-  XSendEvent(static_cast<Display*>(ecore_x_display_get()), cbhm_win, false, NoEventMask,
-             reinterpret_cast<XEvent*>(&messageEvent));
+  XSendEvent(static_cast<Display*>(ecore_x_display_get()), cbhm_win, false,
+             NoEventMask, reinterpret_cast<XEvent*>(&messageEvent));
 
   ecore_x_sync();
 #else
@@ -252,7 +251,8 @@ bool ClipboardHelperEfl::SendCbhmMessage(const std::string& message) {
 
 // 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) {
+bool ClipboardHelperEfl::SetClipboardItem(Ecore_X_Atom data_type,
+                                          const std::string& data) {
   if (data.empty())
     return false;
 
@@ -265,12 +265,10 @@ bool ClipboardHelperEfl::SetClipboardItem(Ecore_X_Atom data_type,const std::stri
     data_start_index = sizeof(prefix) - 1;
 
   ecore_x_sync();
-  ecore_x_window_prop_property_set(cbhm_win,
-                                   atom_cbhm_item,
-                                   data_type,
-                                   8,
-                                   const_cast<char*>(data.c_str()) + data_start_index,
-                                   data.length() - data_start_index + 1);
+  ecore_x_window_prop_property_set(
+      cbhm_win, atom_cbhm_item, data_type, 8,
+      const_cast<char*>(data.c_str()) + data_start_index,
+      data.length() - data_start_index + 1);
   ecore_x_sync();
 
   if (SendCbhmMessage(kCbhmMessageSetItem))
@@ -279,7 +277,8 @@ bool ClipboardHelperEfl::SetClipboardItem(Ecore_X_Atom data_type,const std::stri
   return false;
 }
 #else
-bool ClipboardHelperEfl::SetClipboardItem(const std::string& data_type, const std::string& data) {
+bool ClipboardHelperEfl::SetClipboardItem(const std::string& data_type,
+                                          const std::string& data) {
   s_clipboard[data_type] = data;
 
   if (SendCbhmMessage(kCbhmMessageSetItem))
@@ -291,7 +290,9 @@ bool ClipboardHelperEfl::SetClipboardItem(const std::string& data_type, const st
 
 // 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) {
+std::string ClipboardHelperEfl::GetCbhmReply(Ecore_X_Window xwin,
+                                             Ecore_X_Atom property,
+                                             Ecore_X_Atom* data_type) {
   if (!property)
     return std::string();
 
@@ -303,10 +304,10 @@ std::string ClipboardHelperEfl::GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom p
   long unsigned int bytes = 0;
   unsigned char* data = 0;
 
-  int result = XGetWindowProperty(static_cast<Display*>(ecore_x_display_get()),
-                                  xwin, property, 0, LONG_MAX, False, ecore_x_window_prop_any_type(),
-                                  reinterpret_cast<Atom*>(&type), &data_unit_size, &data_length,
-                                  &bytes, &data);
+  int result = XGetWindowProperty(
+      static_cast<Display*>(ecore_x_display_get()), xwin, property, 0, LONG_MAX,
+      False, ecore_x_window_prop_any_type(), reinterpret_cast<Atom*>(&type),
+      &data_unit_size, &data_length, &bytes, &data);
 
   if (result != Success)
     return std::string();
@@ -319,17 +320,18 @@ std::string ClipboardHelperEfl::GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom p
   std::string cbhm_data;
 
   switch (data_unit_size) {
-  case kDataUnitSize8:
-    cbhm_data = std::string(reinterpret_cast<const char*>(data), data_length);
-    break;
-  case kDataUnitSize16:
-    cbhm_data = UTF16ToUTF8(base::string16(reinterpret_cast<const base::char16*>(data), data_length));
-    break;
-  case kDataUnitSize32:
-    break;
-  default:
-    NOTREACHED();
-    break;
+    case kDataUnitSize8:
+      cbhm_data = std::string(reinterpret_cast<const char*>(data), data_length);
+      break;
+    case kDataUnitSize16:
+      cbhm_data = base::UTF16ToUTF8(base::string16(
+          reinterpret_cast<const base::char16*>(data), data_length));
+      break;
+    case kDataUnitSize32:
+      break;
+    default:
+      NOTREACHED();
+      break;
   }
 
   XFree(data);
@@ -341,7 +343,9 @@ std::string ClipboardHelperEfl::GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom p
 }
 #endif
 
-bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::string* data) {
+bool ClipboardHelperEfl::RetrieveClipboardItem(int index,
+                                               int* format,
+                                               std::string* data) {
   if (!data)
     return false;
 
@@ -357,13 +361,14 @@ bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::stri
   if (result.empty() || atom_item_type == ecore_x_atom_get(kCbhmAtomError))
     return false;
 
-  //TODO: Other formats need to be added here.
+  // TODO: Other formats need to be added here.
   if ((atom_item_type == ecore_x_atom_get(kCbhmAtomUTF8String)) ||
       (atom_item_type == ecore_x_atom_get(kCbhmAtomElmMarkup))) {
     *format = ELM_SEL_FORMAT_TEXT;
     data->swap(result);
     if (atom_item_type == ecore_x_atom_get(kCbhmAtomElmMarkup))
-      *data = std::string(evas_textblock_text_markup_to_utf8(NULL, data->c_str()));
+      *data =
+          std::string(evas_textblock_text_markup_to_utf8(NULL, data->c_str()));
     return true;
   } else if (atom_item_type == ecore_x_atom_get(kCbhmAtomTextHtml)) {
     *format = ELM_SEL_FORMAT_HTML;
@@ -374,7 +379,8 @@ bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::stri
   if (s_clipboard.size() < static_cast<unsigned int>(index))
     return false;
 
-  std::map<std::string, std::string>::iterator clipboardElem = s_clipboard.begin();
+  std::map<std::string, std::string>::iterator clipboardElem =
+      s_clipboard.begin();
   std::advance(clipboardElem, index);
 
   if (clipboardElem->first == kCbhmAtomUTF8String ||
@@ -382,7 +388,8 @@ bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::stri
     *format = ELM_SEL_FORMAT_TEXT;
     *data = clipboardElem->second;
     if (clipboardElem->first == kCbhmAtomElmMarkup)
-      *data = std::string(evas_textblock_text_markup_to_utf8(NULL, data->c_str()));
+      *data =
+          std::string(evas_textblock_text_markup_to_utf8(NULL, data->c_str()));
     return true;
   } else if (clipboardElem->first == kCbhmAtomTextHtml) {
     *format = ELM_SEL_FORMAT_HTML;
@@ -398,7 +405,7 @@ bool ClipboardHelperEfl::RetrieveClipboardItem(int index, int* format, std::stri
 }
 
 int ClipboardHelperEfl::NumberOfItems() {
-  // 1. Get CBHM Ecore_X_Window.
+// 1. Get CBHM Ecore_X_Window.
 #if !defined(WAYLAND_BRINGUP)
   Ecore_X_Atom x_atom;
   x_atom = ecore_x_atom_get(kCbhmAtomXWindow);
@@ -407,7 +414,8 @@ int ClipboardHelperEfl::NumberOfItems() {
 
   unsigned char* data = 0;
   int number_of_windows = 0;
-  int result = ecore_x_window_prop_property_get(0, x_atom, XA_WINDOW, 0, &data, &number_of_windows);
+  int result = ecore_x_window_prop_property_get(0, x_atom, XA_WINDOW, 0, &data,
+                                                &number_of_windows);
 
   Ecore_X_Window x_window = 0;
   if (result && number_of_windows)
@@ -434,8 +442,9 @@ int ClipboardHelperEfl::NumberOfItems() {
   long unsigned bytes = 0;
   unsigned char* data_in_format = 0;
   result = XGetWindowProperty(display, x_window, x_atom, 0, LONG_MAX, False,
-                              ecore_x_window_prop_any_type(), reinterpret_cast<Atom*>(&type),
-                              &format, &number_of_items, &bytes, &data_in_format);
+                              ecore_x_window_prop_any_type(),
+                              reinterpret_cast<Atom*>(&type), &format,
+                              &number_of_items, &bytes, &data_in_format);
   if (result != Success)
     return 0;
 
@@ -449,9 +458,12 @@ int ClipboardHelperEfl::NumberOfItems() {
 
   char* end;
   errno = 0;
-  long int count = strtol(reinterpret_cast<const char*>(data_in_format), &end, 10);
-  if ((end == reinterpret_cast<const char*>(data_in_format) || *end != '\0') /* not a number */||
-      ((count == LONG_MIN || count == LONG_MAX) && ERANGE == errno) /* out of range */) {
+  long int count =
+      strtol(reinterpret_cast<const char*>(data_in_format), &end, 10);
+  if ((end == reinterpret_cast<const char*>(data_in_format) ||
+       *end != '\0') /* not a number */
+      || ((count == LONG_MIN || count == LONG_MAX) &&
+          ERANGE == errno) /* out of range */) {
     DLOG(ERROR) << "String to int conversion failed.";
     return 0;
   }
@@ -461,7 +473,9 @@ int ClipboardHelperEfl::NumberOfItems() {
 #endif
 }
 
-static void pasteSelectedClipboardItem(std::string data, std::string type, EWebView *webview) {
+static void pasteSelectedClipboardItem(std::string data,
+                                       std::string type,
+                                       EWebView* webview) {
 #if 0
   content::SelectionControllerEfl* controller = webview->GetSelectionController();
   if (controller)
@@ -474,11 +488,13 @@ static void pasteSelectedClipboardItem(std::string data, std::string type, EWebV
 
 static Eina_Bool clearClip(void* data, int type, void* event) {
 #if !defined(WAYLAND_BRINGUP)
-  Ecore_X_Event_Selection_Clear* clearEvent = (Ecore_X_Event_Selection_Clear*) event;
+  Ecore_X_Event_Selection_Clear* clearEvent =
+      (Ecore_X_Event_Selection_Clear*)event;
   Ecore_X_Window window = clearEvent->win;
 
   ClipType clipType = CLIP_TYPE_SECONDARY;
-  clipList[clipType].requestedFormat = static_cast<Elm_Sel_Format>(ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_IMAGE);
+  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
@@ -487,11 +503,12 @@ static Eina_Bool clearClip(void* data, int type, void* event) {
   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.
+static Eina_Bool notifyClip(void* data, int type, void* event) {
+  EWebViewwebview = 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;
+  Ecore_X_Event_Selection_Notify* notifytEvent =
+      (Ecore_X_Event_Selection_Notify*)event;
 
   int i = 0;
   for (i = 0; i < CLIP_TYPE_MAX; i++) {
@@ -513,7 +530,8 @@ static Eina_Bool notifyClip(void* data , int type, void* event) {
 
 // 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) {
+static int notifyTarget(ClipData* clipData,
+                        Ecore_X_Event_Selection_Notify* notifyData) {
   Ecore_X_Atom dataType = 0;
 
   if (clipData->clipboardHelper->getSelectedCbhmItem(&dataType)) {
@@ -526,16 +544,18 @@ static int notifyTarget(ClipData* clipData, Ecore_X_Event_Selection_Notify* noti
     }
   }
 
-  Ecore_X_Selection_Data_Targets* pTargets = (Ecore_X_Selection_Data_Targets*) (notifyData->data);
-  Ecore_X_Atom* pAtomList = (Ecore_X_Atom*) (pTargets->data.data);
+  Ecore_X_Selection_Data_Targets* pTargets =
+      (Ecore_X_Selection_Data_Targets*)(notifyData->data);
+  Ecore_X_Atom* pAtomList = (Ecore_X_Atom*)(pTargets->data.data);
 
   int i, j = 0;
-  for (j = (ATOM_LISTING_ATOMS+1); j < ATOM_MAX; j++) {
+  for (j = (ATOM_LISTING_ATOMS + 1); j < ATOM_MAX; j++) {
     if (!(atomList[j].formats & clipData->requestedFormat))
       continue;
     for (i = 0; i < pTargets->data.length; i++) {
       if ((atomList[j].atom == pAtomList[i]) && (atomList[j].notify)) {
-        if ((j == ATOM_XELM) && (!(clipData->requestedFormat & ELM_SEL_FORMAT_MARKUP)))
+        if ((j == ATOM_XELM) &&
+            (!(clipData->requestedFormat & ELM_SEL_FORMAT_MARKUP)))
           continue;
         goto FOUND;
       }
@@ -544,7 +564,7 @@ static int notifyTarget(ClipData* clipData, Ecore_X_Event_Selection_Notify* noti
 
   return ECORE_CALLBACK_PASS_ON;
 
-  FOUND:
+FOUND:
   clipData->request(notifyData->win, atomList[j].pName);
   return ECORE_CALLBACK_PASS_ON;
 }
@@ -552,32 +572,36 @@ static int notifyTarget(ClipData* clipData, Ecore_X_Event_Selection_Notify* noti
 
 // 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);
+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);
   return 0;
 }
 
-static int notifyImage(ClipData* clipData, Ecore_X_Event_Selection_Notify* notifyData) {
+static int notifyImage(ClipData* clipData,
+                       Ecore_X_Event_Selection_Notify* notifyData) {
   return 0;
 }
 
 static int notifyUri(ClipData* clipData,
-    Ecore_X_Event_Selection_Notify* notifyData) {
-  Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) notifyData->data;
+                     Ecore_X_Event_Selection_Notify* notifyData) {
+  Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*)notifyData->data;
   pasteSelectedClipboardItem(
       std::string(reinterpret_cast<char*>(pData->data), pData->length),
       "InsertImage", clipData->webView);
-       return 0;
+  return 0;
 }
 
-static int notifyEdje(ClipData* clipData, Ecore_X_Event_Selection_Notify* notifyData) {
+static int notifyEdje(ClipData* clipData,
+                      Ecore_X_Event_Selection_Notify* notifyData) {
   return 0;
 }
 
 static int notifyHtml(ClipData* clipData,
-    Ecore_X_Event_Selection_Notify* notifyData) {
-  Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) notifyData->data;
+                      Ecore_X_Event_Selection_Notify* notifyData) {
+  Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*)notifyData->data;
   pasteSelectedClipboardItem(
       std::string(reinterpret_cast<char*>(pData->data), pData->length),
       "InsertHTML", clipData->webView);
@@ -586,7 +610,7 @@ static int notifyHtml(ClipData* clipData,
 #endif
 
 void ClipboardHelperEfl::initializeAtomList() {
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+// 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;
@@ -674,27 +698,32 @@ void ClipboardHelperEfl::initializeAtomList() {
   atomList[ATOM_TEXT_HTML].atom = 0;
 
   atomList[ATOM_STRING_UTF8].pName = "UTF8_STRING";
-  atomList[ATOM_STRING_UTF8].formats = static_cast<Elm_Sel_Format> (ELM_SEL_FORMAT_TEXT| ELM_SEL_FORMAT_MARKUP| ELM_SEL_FORMAT_HTML);
+  atomList[ATOM_STRING_UTF8].formats = static_cast<Elm_Sel_Format>(
+      ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML);
   atomList[ATOM_STRING_UTF8].notify = notifyText;
   atomList[ATOM_STRING_UTF8].atom = 0;
 
   atomList[ATOM_STRING].pName = "STRING";
-  atomList[ATOM_STRING].formats = static_cast<Elm_Sel_Format> (ELM_SEL_FORMAT_TEXT| ELM_SEL_FORMAT_MARKUP| ELM_SEL_FORMAT_HTML);
+  atomList[ATOM_STRING].formats = static_cast<Elm_Sel_Format>(
+      ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML);
   atomList[ATOM_STRING].notify = notifyText;
   atomList[ATOM_STRING].atom = 0;
 
   atomList[ATOM_TEXT].pName = "TEXT";
-  atomList[ATOM_TEXT].formats = static_cast<Elm_Sel_Format> (ELM_SEL_FORMAT_TEXT| ELM_SEL_FORMAT_MARKUP| ELM_SEL_FORMAT_HTML);
+  atomList[ATOM_TEXT].formats = static_cast<Elm_Sel_Format>(
+      ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML);
   atomList[ATOM_TEXT].notify = 0;
   atomList[ATOM_TEXT].atom = 0;
 
   atomList[ATOM_TEXT_PLAIN_UTF8].pName = "text/plain;charset=utf-8";
-  atomList[ATOM_TEXT_PLAIN_UTF8].formats = static_cast<Elm_Sel_Format> (ELM_SEL_FORMAT_TEXT| ELM_SEL_FORMAT_MARKUP| ELM_SEL_FORMAT_HTML);
+  atomList[ATOM_TEXT_PLAIN_UTF8].formats = static_cast<Elm_Sel_Format>(
+      ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML);
   atomList[ATOM_TEXT_PLAIN_UTF8].notify = 0;
   atomList[ATOM_TEXT_PLAIN_UTF8].atom = 0;
 
   atomList[ATOM_TEXT_PLAIN].pName = "text/plain";
-  atomList[ATOM_TEXT_PLAIN].formats = static_cast<Elm_Sel_Format> (ELM_SEL_FORMAT_TEXT| ELM_SEL_FORMAT_MARKUP| ELM_SEL_FORMAT_HTML);
+  atomList[ATOM_TEXT_PLAIN].formats = static_cast<Elm_Sel_Format>(
+      ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML);
   atomList[ATOM_TEXT_PLAIN].notify = notifyText;
   atomList[ATOM_TEXT_PLAIN].atom = 0;
 
@@ -753,7 +782,7 @@ bool ClipboardHelperEfl::getSelectedCbhmItem(Ecore_X_Atom* pDataType) {
 
   std::string result = GetCbhmReply(cbhmWin, atomCbhmItem, &atomItemType);
 
-  if(result.empty())
+  if (result.empty())
     return false;
 
   if (atomItemType == ecore_x_atom_get("CBHM_ERROR"))
@@ -766,15 +795,18 @@ bool ClipboardHelperEfl::getSelectedCbhmItem(Ecore_X_Atom* pDataType) {
 }
 #endif
 
-void ClipboardHelperEfl::OpenClipboardWindow(EWebView* view, bool richly_editable) {
+void ClipboardHelperEfl::OpenClipboardWindow(EWebView* view,
+                                             bool richly_editable) {
   clearClipboardHandler();
   initializeAtomList();
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+// 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);
+  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
@@ -791,9 +823,9 @@ void ClipboardHelperEfl::OpenClipboardWindow(EWebView* view, bool richly_editabl
 }
 
 void ClipboardHelperEfl::connectClipboardWindow() {
-  // TODO: Webview and Rendering TG will implement following for Wayland.
+// 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);
+  ecore_x_selection_secondary_set(ecore_x_window_focus_get(), "", 1);
 #else
   NOTIMPLEMENTED();
 #endif
@@ -809,8 +841,10 @@ void ClipboardHelperEfl::CloseClipboardWindow() {
 
 // 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);
+void ClipboardHelperEfl::UpdateClipboardWindowState(
+    Ecore_X_Event_Window_Property* ev) {
+  Ecore_X_Illume_Clipboard_State state =
+      ecore_x_e_illume_clipboard_state_get(ev->win);
 
   if (state == ECORE_X_ILLUME_CLIPBOARD_STATE_OFF)
     clearClipboardHandler();
index e3e0c81da5bcbd3cbfb48b19a3886dab669ebaca..cfa2375de5c80462a28f2e08604523cb64702bf6 100644 (file)
@@ -9,23 +9,24 @@
 #include "content/browser/renderer_host/dip_util.h"
 #include "ui/base/x/x11_util.h"
 #include "ui/display/device_display_info_efl.h"
-#include "ui/gfx/geometry/rect.h"
 #include "ui/display/display.h"
 #include "ui/display/display_observer.h"
 #include "ui/display/screen.h"
 #include "ui/gfx/geometry/dip_util.h"
+#include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/x/x11_types.h"
 
+using namespace display;
+
 namespace ui {
 
 class ScreenEfl : public display::Screen {
  public:
-  ScreenEfl() {
-  }
+  ScreenEfl() {}
 
-  ~ScreenEfl() override {
-  }
+  ~ScreenEfl() override {}
 
+  // display::Screen overrides
   gfx::Point GetCursorScreenPoint() override {
     NOTIMPLEMENTED();
     return gfx::Point();
@@ -40,33 +41,33 @@ class ScreenEfl : public display::Screen {
     return NULL;
   }
 
-  int GetNumDisplays() const override {
-    return 1;
-  }
+  int GetNumDisplays() const override { return 1; }
 
-  std::vector<display::Display> GetAllDisplays() const override {
+  const std::vector<display::Display>& GetAllDisplays() const override {
     return std::vector<display::Display>(1, GetPrimaryDisplay());
   }
 
-  display::Display GetDisplayNearestWindow(gfx::NativeView view) const override {
+  display::Display GetDisplayNearestWindow(
+      gfx::NativeView /*view*/) const override {
     return GetPrimaryDisplay();
   }
 
   display::Display GetDisplayNearestPoint(
-      const gfx::Point& point) const override {
+      const gfx::Point& /*point*/) const override {
     return GetPrimaryDisplay();
   }
 
   display::Display GetDisplayMatching(
-      const gfx::Rect& match_rect) const override {
+      const gfx::Rect& /*match_rect*/) const override {
     return GetPrimaryDisplay();
   }
 
   display::Display GetPrimaryDisplay() const override {
     display::DeviceDisplayInfoEfl display_info;
     const float device_scale_factor =
-        display::Display::HasForceDeviceScaleFactor() ?
-        display::Display::GetForcedDeviceScaleFactor() : display_info.GetDIPScale();
+        display::Display::HasForceDeviceScaleFactor()
+            ? display::Display::GetForcedDeviceScaleFactor()
+            : display_info.GetDIPScale();
 
     display::Display display(0);
     display.SetRotationAsDegree(display_info.GetRotationDegrees());
@@ -77,20 +78,18 @@ class ScreenEfl : public display::Screen {
 #if defined(USE_WAYLAND)
     if (display.rotation() == display::Display::ROTATE_90 ||
         display.rotation() == display::Display::ROTATE_270) {
-        ecore_wl_screen_size_get(&height, &width);
-    }
-    else {
-        ecore_wl_screen_size_get(&width, &height);
+      ecore_wl_screen_size_get(&height, &width);
+    } else {
+      ecore_wl_screen_size_get(&width, &height);
     }
 #else
     Ecore_X_Screen* screen = ecore_x_default_screen_get();
 
     if (display.rotation() == display::Display::ROTATE_90 ||
         display.rotation() == display::Display::ROTATE_270) {
-        ecore_x_screen_size_get(screen, &height, &width);
-    }
-    else {
-        ecore_x_screen_size_get(screen, &width, &height);
+      ecore_x_screen_size_get(screen, &height, &width);
+    } else {
+      ecore_x_screen_size_get(screen, &width, &height);
     }
 #endif
 
@@ -104,18 +103,19 @@ class ScreenEfl : public display::Screen {
     return display;
   }
 
-  void AddObserver(display::DisplayObserver* observer) override {
+  void AddObserver(display::DisplayObserver* /*observer*/) override {
+    NOTIMPLEMENTED();
   }
 
-  void RemoveObserver(display::DisplayObserver* observer) override {
+  void RemoveObserver(display::DisplayObserver* /*observer*/) override {
+    NOTIMPLEMENTED();
   }
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ScreenEfl);
 };
 
-void InstallScreenInstance()
-{
+void InstallScreenInstance() {
   static bool installed = false;
   if (!installed) {
     installed = true;
@@ -123,10 +123,14 @@ void InstallScreenInstance()
   }
 }
 
-} // namespace ui
+}  // namespace ui
 
 namespace display {
+// static
+gfx::NativeWindow Screen::GetWindowForView(gfx::NativeView view) {
+  return view;
+}
 Screen* CreateNativeScreen() {
   return new ui::ScreenEfl();
 }
-} // namespace display
+}  // namespace display
diff --git a/tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc b/tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc
deleted file mode 100644 (file)
index 28fd66b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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.
-
-// Define GLContextEGL to GLContextEGLOverride to be able to replace
-// initialize method in GLContextEGL
-#define GLContextEGL GLContextEGLOverride
-
-#define private protected
-
-#include "ui/gl/gl_context_egl.cc"
-
-#undef GLContextEGL
-
-namespace gl {
-
-class GL_EXPORT GLContextEGL : public GLContextEGLOverride {
- public:
-  GLContextEGL(GLShareGroup* share_group);
-
-  bool Initialize(GLSurface* compatible_surface,
-                  GpuPreference gpu_preference) override;
-
- private:
-  ~GLContextEGL() {};
-};
-
-GLContextEGL::GLContextEGL(GLShareGroup* share_group) :
-    GLContextEGLOverride(share_group) {
-}
-
-bool GLContextEGL::Initialize(
-    GLSurface* compatible_surface, GpuPreference gpu_preference) {
-  DCHECK(compatible_surface);
-  DCHECK(!context_);
-
-  static const EGLint kContextAttributes[] = {
-    EGL_CONTEXT_CLIENT_VERSION, 2,
-    EGL_NONE
-  };
-
-  display_ = compatible_surface->GetDisplay();
-  config_ = compatible_surface->GetConfig();
-
-  context_ = eglCreateContext(
-      display_,
-      config_,
-      share_group() ? share_group()->GetHandle() : NULL,
-      kContextAttributes);
-
-  if (!context_) {
-    LOG(ERROR) << "eglCreateContext failed with error "
-               << GetLastEGLErrorString();
-    return false;
-  }
-
-  return true;
-}
-
-}
-
index d4272e47a5aa9aac64fd19c5da444db198016ae1..8f85bb34afdbbb8c4817e79184fe56998f63c212 100644 (file)
@@ -22,7 +22,6 @@ class GL_EXPORT GLImageEflPixmap : public GLImage {
   virtual void Destroy(bool have_context) override;
   virtual gfx::Size GetSize() override;
   virtual bool BindTexImage(unsigned target) override;
-  virtual void ReleaseTexImage(unsigned target) override;
   virtual bool CopyTexSubImage(unsigned target,
                                const gfx::Point& offset,
                                const gfx::Rect& rect) override;
index 5278c01455a603e0d54937da6d08ba5028829d2e..b9d0c3dbbbc33c49fce49b80b683b936de5c5d21 100644 (file)
@@ -21,7 +21,7 @@ extern void* GLGetCurentContext();
 struct GLSharedContextEflPrivate : public gl::GLContext {
   GLSharedContextEflPrivate(Evas_Object* object)
       : GLContext(GLSharedContextEfl::GetShareGroup()) {
-    Evas* evas =  evas_object_evas_get(object);
+    Evas* evas = evas_object_evas_get(object);
     evas_gl_config_ = evas_gl_config_new();
     evas_gl_config_->options_bits = EVAS_GL_OPTIONS_NONE;
     evas_gl_config_->color_format = EVAS_GL_RGBA_8888;
@@ -33,8 +33,7 @@ struct GLSharedContextEflPrivate : public gl::GLContext {
     if (!evas_gl_context_)
       LOG(FATAL) << "GLSharedContextEflPrivate(): Create evas gl context Fail";
 
-    evas_gl_surface_ = evas_gl_surface_create(
-        evas_gl_, evas_gl_config_, 1, 1);
+    evas_gl_surface_ = evas_gl_surface_create(evas_gl_, evas_gl_config_, 1, 1);
     if (!evas_gl_surface_)
       LOG(FATAL) << "GLSharedContextEflPrivate(): Create evas gl Surface Fail";
 
@@ -44,8 +43,7 @@ struct GLSharedContextEflPrivate : public gl::GLContext {
     evas_gl_make_current(evas_gl_, 0, 0);
   }
 
-  bool Initialize(
-      gl::GLSurface*, gl::GpuPreference) override {
+  bool Initialize(gl::GLSurface*, const gl::GLContextAttribs&) override {
     NOTREACHED();
     return false;
   }
@@ -55,27 +53,27 @@ struct GLSharedContextEflPrivate : public gl::GLContext {
     return false;
   }
 
-  void ReleaseCurrent(gl::GLSurface*) override {
-    NOTREACHED();
-  }
+  void ReleaseCurrent(gl::GLSurface*) override { NOTREACHED(); }
 
   bool IsCurrent(gl::GLSurface*) override {
     NOTREACHED();
     return false;
   }
 
-  void* GetHandle() override {
-    return handle_;
-  }
+  void* GetHandle() override { return handle_; }
 
-  virtual scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() override {
+  scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() override {
     return 0;
   }
 
-  virtual void OnSetSwapInterval(int interval) override {
-    NOTREACHED();
+  const gl::ExtensionSet& GetExtensions() override {
+    return GLSharedContextEfl::GetInstance()->GetExtensions();
   }
 
+  void OnSetSwapInterval(int interval) override { NOTREACHED(); }
+
+  void ResetExtensions() override { NOTREACHED(); }
+
  private:
   friend struct GLSharedContextEfl;
 
@@ -117,7 +115,6 @@ Evas_GL_Context* GLSharedContextEfl::GetEvasGLContext() {
 
 // static
 gl::GLShareGroup* GLSharedContextEfl::GetShareGroup() {
-  static scoped_refptr<gl::GLShareGroup> share_group_ =
-      new gl::GLShareGroup();
+  static scoped_refptr<gl::GLShareGroup> share_group_ = new gl::GLShareGroup();
   return share_group_.get();
 }
index 21822ea87046156aa3d91c11f05f777338529b55..0feb68a5f60b2c3458ec6689562d7cfad61c2dde 100644 (file)
@@ -5,7 +5,9 @@
 import("//tizen_src/build/config/tizen_features.gni")
 
 static_library("ozone_efl") {
-  deps = [ "//ui/ozone/common" ]
+  deps = [
+    "//ui/ozone/common",
+  ]
 
   if (!use_wayland) {
     configs += [ "//tizen_src/build:ecore-x" ]
@@ -16,11 +18,12 @@ static_library("ozone_efl") {
   }
 
   sources = [
-    "client_native_pixmap_factory_efl.h",
     "client_native_pixmap_factory_efl.cc",
-    "ozone_platform_efl.h",
+    "client_native_pixmap_factory_efl.h",
     "ozone_platform_efl.cc",
-    "surface_factory_efl.h",
+    "ozone_platform_efl.h",
     "surface_factory_efl.cc",
+    "surface_factory_efl.h",
   ]
+  include_dirs = [ "//ui/ozone/public" ]
 }
index 8a5886a6a55a3393aabb2fc8a4ee539f0cbff8be..f7c326275daea9aac166cfa87e687959c1bdecb1 100644 (file)
@@ -8,8 +8,13 @@
 
 namespace ui {
 
-ClientNativePixmapFactory* CreateClientNativePixmapFactoryEfl() {
+gfx::ClientNativePixmapFactory* CreateClientNativePixmapFactoryEfl() {
+  //#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // [m63_3239]
+  // error: cannot convert ‘gfx::ClientNativePixmapFactory*’ to
+  // ‘ui::ClientNativePixmapFactory*
   return CreateStubClientNativePixmapFactory();
+  //#endif
 }
 
 }  // namespace ui
index f4e2790352100aa21d12f6cc14bacc807eea2356..39b2570036696f056aba4b52d29458f821355a32 100644 (file)
@@ -5,14 +5,14 @@
 #ifndef OZONE_PIXMAP_FACTORY_EFL_H_
 #define OZONE_PIXMAP_FACTORY_EFL_H_
 
-namespace ui {
+namespace gfx {
 
 class ClientNativePixmapFactory;
 
 // Constructor hook for use in constructor_list.cc
 ClientNativePixmapFactory* CreateClientNativePixmapFactoryEfl();
 
-}  // namespace ui
+}  // namespace gfx
 
 #endif  // OZONE_PIXMAP_FACTORY_EFL_H_
 
index 080a4caceca94df46774c55f28932fe2dbd374ca..d9b0589c6427cd659758ee8f7e9060bf1742bbc0 100644 (file)
@@ -4,13 +4,9 @@
 
 #include "ui/ozone/ozone_platform_efl.h"
 
-#include "base/logging.h"
 #include "ui/display/types/native_display_delegate.h"
-#include "ui/ozone/common/stub_overlay_manager.h"
-#include "ui/ozone/public/gpu_platform_support.h"
 #include "ui/ozone/public/gpu_platform_support_host.h"
 #include "ui/ozone/public/ozone_platform.h"
-#include "ui/ozone/public/system_input_injector.h"
 #include "ui/ozone/surface_factory_efl.h"
 #include "ui/platform_window/platform_window.h"
 
@@ -18,82 +14,60 @@ namespace ui {
 
 namespace {
 
+// OzonePlatform implementation for EFL.
 class OzonePlatformEfl : public OzonePlatform {
  public:
-  OzonePlatformEfl()
-    : surface_factory_(new SurfaceFactoryEfl) {
-  }
+  OzonePlatformEfl() {}
+  ~OzonePlatformEfl() override {}
 
-  SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
+  ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
     return surface_factory_.get();
   }
 
-  OverlayManagerOzone* GetOverlayManager() override {
-    return overlay_manager_.get();
-  }
+  ui::OverlayManagerOzone* GetOverlayManager() override { return nullptr; }
 
-  CursorFactoryOzone* GetCursorFactoryOzone() override {
-    NOTIMPLEMENTED();
-    return NULL;
-  }
+  ui::CursorFactoryOzone* GetCursorFactoryOzone() override { return nullptr; }
 
-  InputController* GetInputController() override {
-    NOTIMPLEMENTED();
-    return NULL;
-  }
+  ui::InputController* GetInputController() override { return nullptr; }
 
-  GpuPlatformSupport* GetGpuPlatformSupport() override {
-    return gpu_platform_.get();
-  }
-
-  GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
+  ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
     return gpu_platform_host_.get();
   }
 
   std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override {
-    NOTIMPLEMENTED();
-    return NULL;
+    return nullptr;
   }
 
   std::unique_ptr<PlatformWindow> CreatePlatformWindow(
-      PlatformWindowDelegate* delegate,
-      const gfx::Rect& bounds) override {
-    NOTIMPLEMENTED();
-    return NULL;
-  }
-
-  std::unique_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
-    NOTIMPLEMENTED();
-    return NULL;
+      PlatformWindowDelegate* /*delegate*/,
+      const gfx::Rect& /*bounds*/) override {
+    return nullptr;
   }
 
-  base::ScopedFD OpenClientNativePixmapDevice() const {
-    return base::ScopedFD();
+  std::unique_ptr<display::NativeDisplayDelegate> CreateNativeDisplayDelegate()
+      override {
+    return nullptr;
   }
 
-
  private:
-  void InitializeUI() override {
+  void InitializeUI(const InitParams& /*params*/) override {
     gpu_platform_host_.reset(CreateStubGpuPlatformSupportHost());
-    overlay_manager_.reset(new StubOverlayManager());
   }
 
-  void InitializeGPU() override {
-    gpu_platform_.reset(CreateStubGpuPlatformSupport());
+  void InitializeGPU(const InitParams& /*params*/) override {
+    surface_factory_.reset(new SurfaceFactoryEfl());
   }
 
   std::unique_ptr<SurfaceFactoryEfl> surface_factory_;
-  std::unique_ptr<GpuPlatformSupport> gpu_platform_;
   std::unique_ptr<GpuPlatformSupportHost> gpu_platform_host_;
-  std::unique_ptr<OverlayManagerOzone> overlay_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(OzonePlatformEfl);
 };
 
-} // namespace
+}  // namespace
 
 OzonePlatform* CreateOzonePlatformEfl() {
   return new OzonePlatformEfl;
 }
 
-} // namespace ui
+}  // namespace ui
index 7ab4f966ade4fd9beda723fc775d98fde8e90dfb..e03c06f0695623d4b1e6bf51b78b00513bf6a55d 100644 (file)
@@ -9,6 +9,7 @@ namespace ui {
 
 class OzonePlatform;
 
+// Constructor hook for use in ozone_platform_list.cc
 OzonePlatform* CreateOzonePlatformEfl();
 
 }  // namespace ui
index 22f2a6bd245ab6ff51fe8e47168680fbc9e10862..78f37b5fec8215f3649e592d514a9fbe403ddb27 100644 (file)
@@ -6,33 +6,74 @@
 
 #include "ecore_x_wayland_wrapper.h"
 
-#if defined(USE_WAYLAND)
-#include <wayland-egl.h>
-#endif
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
+#include "ui/gl/gl_surface_egl.h"
 #include "ui/ozone/common/egl_util.h"
+#include "ui/ozone/common/gl_ozone_egl.h"
 
 namespace ui {
 
-SurfaceFactoryEfl::SurfaceFactoryEfl()
-    : SurfaceFactoryOzone() {
-}
+namespace {
 
-bool SurfaceFactoryEfl::LoadEGLGLES2Bindings(
-    AddGLLibraryCallback add_gl_library,
-    SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
-  return ui::LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address);
-}
+class GLOzoneEGLEfl : public GLOzoneEGL {
+ public:
+  GLOzoneEGLEfl() {}
+  ~GLOzoneEGLEfl() override {}
+
+  scoped_refptr<gl::GLSurface> CreateViewGLSurface(
+      gfx::AcceleratedWidget window) override {
+    // We use offscreen surface for EFL port.
+    return nullptr;
+  }
 
-intptr_t SurfaceFactoryEfl::GetNativeDisplay() {
+  scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
+      const gfx::Size& size) override {
+    if (gl::GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
+        size.width() == 0 && size.height() == 0) {
+      return gl::InitializeGLSurface(new gl::SurfacelessEGL(size));
+    } else {
+      return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size));
+    }
+  }
+
+ protected:
+  intptr_t GetNativeDisplay() override {
 #if defined(USE_WAYLAND)
-  return reinterpret_cast<intptr_t>(ecore_wl_display_get());
+    return reinterpret_cast<intptr_t>(ecore_wl_display_get());
 #else
-  return reinterpret_cast<intptr_t>(ecore_x_display_get());
+    return reinterpret_cast<intptr_t>(ecore_x_display_get());
 #endif
+  }
+
+  bool LoadGLES2Bindings(gl::GLImplementation implementation) override {
+    return LoadDefaultEGLGLES2Bindings(implementation);
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(GLOzoneEGLEfl);
+};
+
+}  // namespace
+
+SurfaceFactoryEfl::SurfaceFactoryEfl() {
+  egl_implementation_.reset(new GLOzoneEGLEfl());
 }
 
-} // namespace ui
+SurfaceFactoryEfl::~SurfaceFactoryEfl() {}
+
+std::vector<gl::GLImplementation>
+SurfaceFactoryEfl::GetAllowedGLImplementations() {
+  std::vector<gl::GLImplementation> impls;
+  impls.push_back(gl::kGLImplementationEGLGLES2);
+  return impls;
+}
+
+GLOzone* SurfaceFactoryEfl::GetGLOzone(gl::GLImplementation implementation) {
+  switch (implementation) {
+    case gl::kGLImplementationEGLGLES2:
+      return egl_implementation_.get();
+    default:
+      return nullptr;
+  }
+}
 
+}  // namespace ui
index f72b36422dab456c954ed6439cf8110b95e4adfa..b1c82b9805821d3d6607ee1c8d126c2a5f26569b 100644 (file)
@@ -9,16 +9,22 @@
 
 namespace ui {
 
-class SurfaceFactoryEfl : public ui::SurfaceFactoryOzone {
+// SurfaceFactoryOzone implementation for EFL.
+class SurfaceFactoryEfl : public SurfaceFactoryOzone {
  public:
   SurfaceFactoryEfl();
+  ~SurfaceFactoryEfl() override;
 
-  bool LoadEGLGLES2Bindings(
-      AddGLLibraryCallback add_gl_library,
-      SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
-  intptr_t GetNativeDisplay() override;
+  // SurfaceFactoryOzone:
+  std::vector<gl::GLImplementation> GetAllowedGLImplementations() override;
+  GLOzone* GetGLOzone(gl::GLImplementation implementation) override;
+
+ private:
+  std::unique_ptr<GLOzone> egl_implementation_;
+
+  DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryEfl);
 };
 
-} // namespace ui
+}  // namespace ui
 
 #endif // OZONE_SURFACE_FACTORY_EFL
index 7f1469748ecd04c850bbaae40caaf976668b07e3..4acd3fb90091f36a0faf587dcdcbcda2f1c460bc 100644 (file)
 namespace ui {
 
 bool GrabViewSnapshot(gfx::NativeView view,
-                      std::vector<unsigned char>* png_representation,
-                      const gfx::Rect& snapshot_bounds) {
-  return GrabWindowSnapshot(view, png_representation, snapshot_bounds);
+                      const gfx::Rect& snapshot_bounds,
+                      gfx::Image* image) {
+  return GrabWindowSnapshot(view, snapshot_bounds, image);
 }
 
 bool GrabWindowSnapshot(gfx::NativeWindow window,
-                        std::vector<unsigned char>* png_representation,
-                        const gfx::Rect& snapshot_bounds) {
+                        const gfx::Rect& snapshot_bounds,
+                        gfx::Image* image) {
   // Not supported in EFL port. Callers should fall back to the async version.
   return false;
 }
index 6d86b21b00fdf4f6ec57edf4b837e7fb3814349b..c5ff33f6136abd51abde1004d18be0b918179397 100644 (file)
@@ -67,19 +67,20 @@ external_ui_gfx_sources = [
 ]
 
 # For //ui/gfx/x target
-external_ui_gfx_x11_sources = [ "//tizen_src/chromium_impl/ui/gfx/x/x11_types_override.cc" ]
+external_ui_gfx_x11_sources =
+    [ "//tizen_src/chromium_impl/ui/gfx/x/x11_types_override.cc" ]
 external_exclude_ui_gfx_x11_sources = [ "x11_types.cc" ]
 if (wayland_bringup) {
   external_exclude_ui_gfx_x11_sources += [ "gfx/x11_types_override.cc" ]
 }
 
 external_exclude_ui_gl_sources = []
+
 # For //ui/gl target
-external_exclude_ui_gl_sources += [ "gl_context_egl.cc" ]
+#external_exclude_ui_gl_sources += [ "gl_context_egl.cc" ]
 external_ui_gl_sources = [
   "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h",
   "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc",
-  "//tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc",
   "//tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc",
 ]
 if (building_for_tizen) {
@@ -116,21 +117,25 @@ external_ui_base_sources = [
   "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.cc",
   "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.h",
 ]
-if (use_x11) {
-  if (!wayland_bringup) {
-    external_ui_base_sources += [
-      "//ui/base/cursor/cursor_x11.cc",
-      "//ui/base/cursor/cursor_x11.h",
-      "//ui/base/cursor/cursor_loader_x11.h",
-      "//ui/base/cursor/cursor_loader_x11.cc",
-    ]
-  }
-}
+
+# EWK_BRINGUP
+#if (use_x11) {
+#  if (!wayland_bringup) {
+#    external_ui_base_sources += [
+#      "//ui/base/cursor/cursor_x11.cc",
+#      "//ui/base/cursor/cursor_x11.h",
+#      "//ui/base/cursor/cursor_loader_x11.h",
+#      "//ui/base/cursor/cursor_loader_x11.cc",
+#    ]
+#  }
+#}
 external_exclude_ui_base_sources = []
 
 # For //ui/snapshot target
-external_ui_snapshot_sources = [ "//tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc" ]
+external_ui_snapshot_sources =
+    [ "//tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc" ]
 
 # For //ui/events:gesture_detection target
-external_exclude_ui_gesture_detection_sources = [ "gesture_detection/gesture_configuration_default.cc"]
+external_exclude_ui_gesture_detection_sources =
+    [ "gesture_detection/gesture_configuration_default.cc" ]
 external_ui_gesture_detection_sources = [ "//tizen_src/chromium_impl/ui/events/gesture_detection/gesture_configuration_efl.cc" ]
index 8976269692893c531140cc113545ba5147ad6889..44cc1a76984d0978c00b7b0796a6c3055e1a519d 100644 (file)
@@ -83,7 +83,7 @@
     _ZN7content13BrowserThread11CurrentlyOnENS0_2IDE;
     _ZN7content13BrowserThread15GetBlockingPoolEv;
     _ZN7content13BrowserThread16PostTaskAndReplyENS0_2IDERKN15tracked_objects8LocationERKN4base8CallbackIFvvEEESB_;
-    _ZN7content13BrowserThread28GetMessageLoopProxyForThreadENS0_2IDE;
+    _ZN7content13BrowserThread28GetTaskRunnerForThreadENS0_2IDE;
     _ZN7content13BrowserThread29UnsafeGetMessageLoopForThreadENS0_2IDE;
     _ZN7content13BrowserThread8PostTaskENS0_2IDERKN15tracked_objects8LocationERKN4base8CallbackIFvvEEE;
     _ZN7content13ContentClientC1Ev;
index 98f3b244c72684bd96d4d755b953731d556b3148..538866b8a94dc603eb7d92dcaab0d2b571f65799 100644 (file)
@@ -227,7 +227,7 @@ shared_library("chromium-ewk") {
     "notification_permission_popup.cc",
     "notification_permission_popup.h",
     "permission_popup.h",
-#    "permission_popup_manager.cc",
+    "permission_popup_manager.cc",
     "permission_popup_manager.h",
     "popup_controller_efl.cc",
     "popup_controller_efl.h",
@@ -524,6 +524,21 @@ shared_library("chromium-ewk") {
     "wrt/dynamicplugin.h",
   ]
   sources -= exclude_source_set
+  # 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",
+    ]
+  }
   deps += [ "resource:edje_resources_ewk" ]
 }
 
index 130544782a59c54a4136c6d5c903644108f242da..57e83fed8e1aed10083962c41fdf86391ede8830 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/threading/thread_task_runner_handle.h"
+#include "content/browser/appcache/appcache_service_impl.h"
 #include "content/common/render_messages_efl.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
@@ -22,9 +24,8 @@
 #include "net/http/http_cache.h"
 #include "net/url_request/url_request_context.h"
 #include "net/url_request/url_request_context_getter.h"
-#include "storage/common/quota/quota_types.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "content/browser/appcache/appcache_service_impl.h"
+#include "storage/common/quota/quota_types.h"
 
 using content::BrowserThread;
 
@@ -181,7 +182,7 @@ void BrowsingDataRemoverEfl::DeleteIfDone() {
     return;
 
   // we can delete ourselves, but following chromium we do delete later.
-  base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+  base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
 }
 
 typedef void (*Application_Cache_Origins_Get_Callback)(void* origins, void* user_data);
index fdac1082de02ca11ffcac57f7bad583dd69b21b4..82db6caa2f09c2f82c41d702188fc3f83dd01208 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "base/files/file_path.h"
 #include "base/path_service.h"
-#include "components/mime_util/mime_util.h"
+#include "third_party/WebKit/common/mime_util/mime_util.h"
 #include "content/common/paths_efl.h"
 #include "content/public/browser/download_danger_type.h"
 #include "content/public/browser/download_item.h"
@@ -32,7 +32,7 @@ bool DownloadManagerDelegateEfl::TriggerExternalDownloadManager(
 base::FilePath DownloadManagerDelegateEfl::GetPlatformDownloadPath(
     content::DownloadItem* item) const {
   base::FilePath path;
-  if (mime_util::IsSupportedImageMimeType(item->GetMimeType())) {
+  if (blink::IsSupportedImageMimeType(item->GetMimeType())) {
     if (!PathService::Get(PathsEfl::DIR_DOWNLOAD_IMAGE, &path)) {
       LOG(ERROR) << "Could not get image directory.";
       return base::FilePath();
@@ -52,7 +52,8 @@ void DownloadManagerDelegateEfl::CancelDownload(
   callback.Run(base::FilePath(), /* Empty file path for cancellation */
                content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
                content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
-               base::FilePath());
+               base::FilePath(),
+               content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
 }
 
 bool DownloadManagerDelegateEfl::DetermineDownloadTarget(content::DownloadItem* item,
@@ -63,7 +64,8 @@ bool DownloadManagerDelegateEfl::DetermineDownloadTarget(content::DownloadItem*
     callback.Run(GetPlatformDownloadPath(item),
                  content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
                  content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
-                 GetPlatformDownloadPath(item));
+                 GetPlatformDownloadPath(item),
+                 content::DOWNLOAD_INTERRUPT_REASON_NONE);
   }
   return true;
 }
index 6b082fec4686b9d922588a83d43efbfca62aceaf..98f686916e6f2636802f39cf67dd3d4e3e6c1cdc 100644 (file)
@@ -51,9 +51,11 @@ scoped_refptr<SerializedBitmap> Command::serialize(const SkBitmap &bitmap) {
   static_cast<int *>(res->data)[1] = static_cast<int>(bitmap.alphaType());
   static_cast<int *>(res->data)[2] = bitmap.width();
   static_cast<int *>(res->data)[3] = bitmap.height();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (!bitmap.copyPixelsTo(static_cast<int *>(res->data) + 4, bitmap.getSize())) {
     res->free();
   }
+#endif
   return res;
 }
 
@@ -75,7 +77,9 @@ SkBitmap Command::deserialize(const void *data) {
   // the deserialized SkBitmap owns and holds it's internal image data
   // for it's whole lifetime, we create a deep copy of the |bitmap|.
   SkBitmap copy;
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   bitmap.copyTo(&copy, colorType);
+#endif
   return copy;
 }
 
index 23ef27f8e5d9027b9817bc89028ace141398cab9..df8f786f5495ecdde1fe1e01d1d5453545364453 100644 (file)
@@ -207,7 +207,7 @@ void FaviconDatabase::Close() {
 }
 
 void FaviconDatabase::SyncSQLite() {
-  scoped_refptr<base::SingleThreadTaskRunner> ptr = content::BrowserThread::GetMessageLoopProxyForThread(content::BrowserThread::DB);
+  scoped_refptr<base::SingleThreadTaskRunner> ptr = content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::DB);
   ptr->PostTask(FROM_HERE, base::Bind(&FaviconDatabasePrivate::performSync, d->weakPtrFactory.GetWeakPtr()));
 }
 
index fac0324495e298e9c1a2ccdff0adc8c1927ba525..7d05e41f49d30766dbb97c1c3d6ef9f925a27490 100644 (file)
@@ -45,7 +45,7 @@ bool FaviconDatabasePrivate::existsForFaviconURL(const GURL &faviconUrl) const {
 }
 
 scoped_refptr<base::SingleThreadTaskRunner> FaviconDatabasePrivate::taskRunner() const {
-  return content::BrowserThread::GetMessageLoopProxyForThread(content::BrowserThread::DB);
+  return content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::DB);
 }
 
 void FaviconDatabasePrivate::performSync() {
index 20b8af704d87c91116c86202e292dc2959d98912..eb537ad384dcbbdb37717bb6eb06f53b83dcf95f 100644 (file)
@@ -12,7 +12,7 @@
 #include "ewk_global_data.h"
 #include "private/ewk_context_private.h"
 
-namespace content {
+namespace device {
 
 AccessTokenStoreEfl::AccessTokenStoreEfl()
     : system_request_context_(NULL)
@@ -25,7 +25,7 @@ AccessTokenStoreEfl::~AccessTokenStoreEfl()
 
 void AccessTokenStoreEfl::LoadAccessTokens(const LoadAccessTokensCallback& callback)
 {
-  BrowserThread::PostTaskAndReply(BrowserThread::UI,
+  content::BrowserThread::PostTaskAndReply(content::BrowserThread::UI,
                                   FROM_HERE,
                                   base::Bind(&AccessTokenStoreEfl::GetRequestContextOnUIThread,
                                              this),
@@ -49,4 +49,4 @@ void AccessTokenStoreEfl::SaveAccessToken(const GURL& /*server_url*/, const base
 {
 }
 
-}  // namespace content
+}  // namespace device
index 99bab1dce21d182529403c537b1ecd151f5f7f12..87f7768a28c8d7a188f107460ca7962c580518eb 100644 (file)
@@ -5,14 +5,16 @@
 #ifndef ACCESS_TOKEN_STORE_EFL_H_
 #define ACCESS_TOKEN_STORE_EFL_H_
 
-#include "content/public/browser/access_token_store.h"
 #include "browser_context_efl.h"
+#include "device/geolocation/access_token_store.h"
 
 namespace content {
-
 class BrowserContextEfl;
+}
+
+namespace device {
 
-class AccessTokenStoreEfl : public content::AccessTokenStore {
+class AccessTokenStoreEfl : public device::AccessTokenStore {
  public:
   AccessTokenStoreEfl();
 
@@ -31,7 +33,7 @@ class AccessTokenStoreEfl : public content::AccessTokenStore {
   DISALLOW_COPY_AND_ASSIGN(AccessTokenStoreEfl);
 };
 
-}  // namespace content
+}  // namespace device
 
 #endif  // ACCESS_TOKEN_STORE_EFL_H_
 
index d0995aa64c5c4092b8de6f15e68690438c93ae97..45224bb934aa602b8363e2f9a194c67ec9e52184 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "base/callback.h"
 #include "base/memory/weak_ptr.h"
-#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
+#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h"
 
 class GURL;
 
index 61374ac3c0aad7a81bd1ba3c706220d45472ece0..b3c5d192b9153fe47aa7641197e50c2a5e989231 100644 (file)
 using content::BrowserThread;
 using web_contents_utils::WebViewFromWebContents;
 
-JavaScriptModalCallbacksData::JavaScriptModalCallbacksData(content::JavaScriptMessageType javascript_message_type,
-                                                           void* user_data)
-  : alert_callback_(NULL), user_data_(user_data), javascript_message_type_(javascript_message_type)
-{
-}
-
-bool JavaScriptModalCallbacksData::Run(Evas_Object* obj, const char* message_text, const char* default_text)
-{
-  switch (javascript_message_type_) {
-    case content::JAVASCRIPT_MESSAGE_TYPE_ALERT: {
+JavaScriptModalCallbacksData::JavaScriptModalCallbacksData(
+    content::JavaScriptDialogType javascript_dialog_type,
+    void* user_data)
+    : alert_callback_(NULL),
+      user_data_(user_data),
+      javascript_dialog_type_(javascript_dialog_type) {}
+
+bool JavaScriptModalCallbacksData::Run(Evas_Object* obj,
+                                       const char* message_text,
+                                       const char* default_text) {
+  switch (javascript_dialog_type_) {
+    case content::JAVASCRIPT_DIALOG_TYPE_ALERT: {
       if (alert_callback_)
         return alert_callback_(obj, message_text, user_data_);
       break;
     }
-    case content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM: {
+    case content::JAVASCRIPT_DIALOG_TYPE_CONFIRM: {
       if (confirm_callback_)
         return confirm_callback_(obj, message_text, user_data_);
       break;
     }
-    case content::JAVASCRIPT_MESSAGE_TYPE_PROMPT: {
+    case content::JAVASCRIPT_DIALOG_TYPE_PROMPT: {
       if (prompt_callback_)
         return prompt_callback_(obj, message_text, default_text, user_data_);
       break;
@@ -39,111 +41,118 @@ bool JavaScriptModalCallbacksData::Run(Evas_Object* obj, const char* message_tex
   return false;
 }
 
-JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithAlertDialogData(
+JavaScriptModalCallbacksData*
+JavaScriptModalCallbacksData::CreateWithAlertDialogData(
     Ewk_View_JavaScript_Alert_Callback callback,
-    void* user_data)
-{
-  JavaScriptModalCallbacksData* callback_data = new JavaScriptModalCallbacksData(
-      content::JAVASCRIPT_MESSAGE_TYPE_ALERT, user_data);
+    void* user_data) {
+  JavaScriptModalCallbacksData* callback_data =
+      new JavaScriptModalCallbacksData(content::JAVASCRIPT_DIALOG_TYPE_ALERT,
+                                       user_data);
   callback_data->alert_callback_ = callback;
   return callback_data;
 }
 
-JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithConfirmDialogData(
+JavaScriptModalCallbacksData*
+JavaScriptModalCallbacksData::CreateWithConfirmDialogData(
     Ewk_View_JavaScript_Confirm_Callback callback,
-    void* user_data)
-{
-  JavaScriptModalCallbacksData* callback_data = new JavaScriptModalCallbacksData(
-      content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM, user_data);
+    void* user_data) {
+  JavaScriptModalCallbacksData* callback_data =
+      new JavaScriptModalCallbacksData(content::JAVASCRIPT_DIALOG_TYPE_CONFIRM,
+                                       user_data);
   callback_data->confirm_callback_ = callback;
   return callback_data;
 }
 
-JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithPromptDialogData(
+JavaScriptModalCallbacksData*
+JavaScriptModalCallbacksData::CreateWithPromptDialogData(
     Ewk_View_JavaScript_Prompt_Callback callback,
-    void* user_data)
-{
-  JavaScriptModalCallbacksData* callback_data = new JavaScriptModalCallbacksData(
-      content::JAVASCRIPT_MESSAGE_TYPE_PROMPT, user_data);
+    void* user_data) {
+  JavaScriptModalCallbacksData* callback_data =
+      new JavaScriptModalCallbacksData(content::JAVASCRIPT_DIALOG_TYPE_PROMPT,
+                                       user_data);
   callback_data->prompt_callback_ = callback;
   return callback_data;
 }
 
-JavaScriptDialogManagerEfl::JavaScriptDialogManagerEfl() {
-}
+JavaScriptDialogManagerEfl::JavaScriptDialogManagerEfl() {}
 
-JavaScriptDialogManagerEfl::~JavaScriptDialogManagerEfl() {
-}
+JavaScriptDialogManagerEfl::~JavaScriptDialogManagerEfl() {}
 
-void JavaScriptDialogManagerEfl::RunJavaScriptDialog(content::WebContents* web_contents,
-                                                     const GURL& origin_url,
-                                                     content::JavaScriptMessageType javascript_message_type,
-                                                     const base::string16& message_text,
-                                                     const base::string16& default_prompt_text,
-                                                     const DialogClosedCallback& callback,
-                                                     bool* did_suppress_message) {
+void JavaScriptDialogManagerEfl::RunJavaScriptDialog(
+    content::WebContents* web_contents,
+    const GURL& alerting_frame_url,
+    content::JavaScriptDialogType dialog_type,
+    const base::string16& message_text,
+    const base::string16& default_prompt_text,
+    DialogClosedCallback callback,
+    bool* did_suppress_message) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   DCHECK(web_contents);
-  dialog_closed_callback_ = callback;
+  dialog_closed_callback_ = std::move(callback);
   EWebView* wv = WebViewFromWebContents(web_contents);
   wv->SmartCallback<EWebViewCallbacks::PopupReplyWaitStart>().call(0);
   JavaScriptModalDialogEfl::Type type = JavaScriptModalDialogEfl::ALERT;
 
-  if (javascript_message_type == content::JAVASCRIPT_MESSAGE_TYPE_ALERT) {
+  if (dialog_type == content::JAVASCRIPT_DIALOG_TYPE_ALERT) {
     type = JavaScriptModalDialogEfl::ALERT;
     if (alert_callback_data_) {
       if (!(alert_callback_data_->Run(wv->evas_object(),
-                                      UTF16ToUTF8(message_text).c_str(),
-                                      NULL)))
+                                      base::UTF16ToUTF8(message_text).c_str(), NULL)))
         ExecuteDialogClosedCallBack(false, std::string());
     }
   }
-  if (javascript_message_type == content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) {
+  if (dialog_type == content::JAVASCRIPT_DIALOG_TYPE_CONFIRM) {
     type = JavaScriptModalDialogEfl::CONFIRM;
     if (confirm_callback_data_) {
-      if (!(confirm_callback_data_->Run(wv->evas_object(),
-                                        UTF16ToUTF8(message_text).c_str(),
-                                        NULL)))
+      if (!(confirm_callback_data_->Run(
+              wv->evas_object(), base::UTF16ToUTF8(message_text).c_str(), NULL)))
         ExecuteDialogClosedCallBack(false, std::string());
     }
   }
-  if (javascript_message_type == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) {
+  if (dialog_type == content::JAVASCRIPT_DIALOG_TYPE_PROMPT) {
     type = JavaScriptModalDialogEfl::PROMPT;
     if (prompt_callback_data_) {
-      if (!(prompt_callback_data_->Run(wv->evas_object(),
-                                       UTF16ToUTF8(message_text).c_str(),
-                                       UTF16ToUTF8(default_prompt_text).c_str())))
+      if (!(prompt_callback_data_->Run(
+              wv->evas_object(), base::UTF16ToUTF8(message_text).c_str(),
+              base::UTF16ToUTF8(default_prompt_text).c_str())))
         ExecuteDialogClosedCallBack(false, std::string());
     }
   }
 
-  dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(web_contents,
-                                                       origin_url,
-                                                       type,
-                                                       message_text,
-                                                       default_prompt_text,
-                                                       callback));
+  dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(
+      web_contents, type, message_text, default_prompt_text,
+      std::move(callback)));
 }
 
-void JavaScriptDialogManagerEfl::SetAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data)
-{
-  alert_callback_data_.reset(JavaScriptModalCallbacksData::CreateWithAlertDialogData(callback, user_data));
+void JavaScriptDialogManagerEfl::SetAlertCallback(
+    Ewk_View_JavaScript_Alert_Callback callback,
+    void* user_data) {
+  alert_callback_data_.reset(
+      JavaScriptModalCallbacksData::CreateWithAlertDialogData(callback,
+                                                              user_data));
 }
 
-void JavaScriptDialogManagerEfl::SetConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data)
-{
-  confirm_callback_data_.reset(JavaScriptModalCallbacksData::CreateWithConfirmDialogData(callback, user_data));
+void JavaScriptDialogManagerEfl::SetConfirmCallback(
+    Ewk_View_JavaScript_Confirm_Callback callback,
+    void* user_data) {
+  confirm_callback_data_.reset(
+      JavaScriptModalCallbacksData::CreateWithConfirmDialogData(callback,
+                                                                user_data));
 }
 
-void JavaScriptDialogManagerEfl::SetPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data)
-{
-  prompt_callback_data_.reset(JavaScriptModalCallbacksData::CreateWithPromptDialogData(callback, user_data));
+void JavaScriptDialogManagerEfl::SetPromptCallback(
+    Ewk_View_JavaScript_Prompt_Callback callback,
+    void* user_data) {
+  prompt_callback_data_.reset(
+      JavaScriptModalCallbacksData::CreateWithPromptDialogData(callback,
+                                                               user_data));
 }
 
-void JavaScriptDialogManagerEfl::ExecuteDialogClosedCallBack(bool result, const std::string prompt_data)
-{
-  dialog_closed_callback_.Run(result, base::UTF8ToUTF16(prompt_data));
-  if(dialog_) {
+void JavaScriptDialogManagerEfl::ExecuteDialogClosedCallBack(
+    bool result,
+    const std::string prompt_data) {
+  std::move(dialog_closed_callback_).Run(result, base::UTF8ToUTF16(prompt_data));
+  if (dialog_) {
     dialog_->close();
   }
 }
@@ -153,18 +162,31 @@ void JavaScriptDialogManagerEfl::SetPopupSize(int width, int height) {
     dialog_->SetPopupSize(width, height);
 }
 
-void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(content::WebContents* web_contents,
-                                     bool is_reload,
-                                     const DialogClosedCallback& callback) {
+void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(
+    content::WebContents* web_contents,
+    bool is_reload,
+    DialogClosedCallback callback) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   DCHECK(web_contents);
-  dialog_closed_callback_ = callback;
+  dialog_closed_callback_ = std::move(callback);
   EWebView* wv = WebViewFromWebContents(web_contents);
   wv->SmartCallback<EWebViewCallbacks::PopupReplyWaitStart>().call(0);
 
   dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(
-      web_contents, GURL(), JavaScriptModalDialogEfl::NAVIGATION,
+      web_contents, JavaScriptModalDialogEfl::NAVIGATION,
       base::UTF8ToUTF16(
           std::string(dgettext("WebKit", "IDS_WEBVIEW_BEFOREUNLOAD_MESSAGE"))),
-      base::string16(), callback));
+      base::string16(), std::move(callback)));
 }
+
+bool JavaScriptDialogManagerEfl::HandleJavaScriptDialog(
+    content::WebContents* web_contents,
+    bool accept,
+    const base::string16* prompt_override) {
+  NOTIMPLEMENTED();
+  return false;
+}
+
+void JavaScriptDialogManagerEfl::CancelDialogs(
+    content::WebContents* web_contents,
+    bool reset_state) {}
index 70e1605523c5c3f5438fbd291ab0f59a83423ba2..476372a1a2e33a354b7499fc0203807cee350296 100644 (file)
@@ -8,77 +8,72 @@
 #include <string>
 #include "base/strings/string16.h"
 #include "content/public/browser/javascript_dialog_manager.h"
-#include "content/public/common/javascript_message_type.h"
 #include "eweb_view.h"
 #include "public/ewk_view.h"
 #include "url/gurl.h"
 
-namespace content{
+namespace content {
 class WebContents;
 }
 class JavaScriptModalDialogEfl;
 
 class JavaScriptModalCallbacksData {
  public:
-  bool Run(Evas_Object* obj, const char* content_text, const char* default_text);
-  static JavaScriptModalCallbacksData* CreateWithAlertDialogData(Ewk_View_JavaScript_Alert_Callback callback,
-                                                          void* user_data);
-  static JavaScriptModalCallbacksData* CreateWithConfirmDialogData(Ewk_View_JavaScript_Confirm_Callback callback,
-                                                            void* user_data);
-  static JavaScriptModalCallbacksData* CreateWithPromptDialogData(Ewk_View_JavaScript_Prompt_Callback callback,
-                                                           void* user_data);
-  ~JavaScriptModalCallbacksData() { }
+  bool Run(Evas_Object* obj,
+           const char* content_text,
+           const char* default_text);
+  static JavaScriptModalCallbacksData* CreateWithAlertDialogData(
+      Ewk_View_JavaScript_Alert_Callback callback,
+      void* user_data);
+  static JavaScriptModalCallbacksData* CreateWithConfirmDialogData(
+      Ewk_View_JavaScript_Confirm_Callback callback,
+      void* user_data);
+  static JavaScriptModalCallbacksData* CreateWithPromptDialogData(
+      Ewk_View_JavaScript_Prompt_Callback callback,
+      void* user_data);
+  ~JavaScriptModalCallbacksData() {}
 
  private:
-  JavaScriptModalCallbacksData(content::JavaScriptMessageType javascript_message_type, void* user_data);
+  JavaScriptModalCallbacksData(
+      content::JavaScriptDialogType javascript_dialog_type,
+      void* user_data);
   union {
     Ewk_View_JavaScript_Alert_Callback alert_callback_;
     Ewk_View_JavaScript_Confirm_Callback confirm_callback_;
     Ewk_View_JavaScript_Prompt_Callback prompt_callback_;
   };
   void* user_data_;
-  content::JavaScriptMessageType javascript_message_type_;
-
+  content::JavaScriptDialogType javascript_dialog_type_;
 };
 
-class JavaScriptDialogManagerEfl: public content::JavaScriptDialogManager {
+class JavaScriptDialogManagerEfl : public content::JavaScriptDialogManager {
  public:
   JavaScriptDialogManagerEfl();
   virtual ~JavaScriptDialogManagerEfl();
-  virtual void RunJavaScriptDialog(
-        content::WebContents* web_contents,
-        const GURL& origin_url,
-        content::JavaScriptMessageType javascript_message_type,
-        const base::string16& message_text,
-        const base::string16& default_prompt_text,
-        const DialogClosedCallback& callback,
-        bool* did_suppress_message) override;
-
-  virtual void RunBeforeUnloadDialog(content::WebContents* web_contents,
-                                     bool is_reload,
-                                     const DialogClosedCallback& callback) override;
-
-  virtual bool HandleJavaScriptDialog(content::WebContents* web_contents,
-                                      bool accept,
-                                      const base::string16* prompt_override) override
-  {
-    NOTIMPLEMENTED();
-    return false;
-  }
-
-  virtual void CancelActiveAndPendingDialogs(content::WebContents* web_contents) override
-  {
-    NOTIMPLEMENTED();
-  }
 
-  virtual void ResetDialogState(content::WebContents* web_contents) override
-  {
-    NOTIMPLEMENTED();
-  }
+  // JavaScriptDialogManager:
+  void RunJavaScriptDialog(content::WebContents* web_contents,
+                           const GURL& alerting_frame_url,
+                           content::JavaScriptDialogType dialog_type,
+                           const base::string16& message_text,
+                           const base::string16& default_prompt_text,
+                           DialogClosedCallback callback,
+                           bool* did_suppress_message) override;
+  void RunBeforeUnloadDialog(content::WebContents* web_contents,
+                             bool is_reload,
+                             DialogClosedCallback callback) override;
+  bool HandleJavaScriptDialog(content::WebContents* web_contents,
+                              bool accept,
+                              const base::string16* prompt_override) override;
+  void CancelDialogs(content::WebContents* web_contents,
+                     bool reset_state) override;
 
-  void SetAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
-  void SetConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
-  void SetPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
+  void SetAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
+                        void* user_data);
+  void SetConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback,
+                          void* user_data);
+  void SetPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback,
+                         void* user_data);
   void ExecuteDialogClosedCallBack(bool result, const std::string prompt_data);
   void SetPopupSize(int width, int height);
 
index 2550cca809f5c6959d619ecacd812a0348b60cec..c4c8e46c41ff5eda72c30afb304ff52734005bae 100644 (file)
@@ -18,14 +18,13 @@ using web_contents_utils::WebViewFromWebContents;
 
 //static
 JavaScriptModalDialogEfl* JavaScriptModalDialogEfl::CreateDialog(content::WebContents* web_contents,
-                           const GURL& origin_url,
                            Type type,
                            const base::string16& message_text,
                            const base::string16& default_prompt_text,
-                           const content::JavaScriptDialogManager::DialogClosedCallback& callback) {
+                           content::JavaScriptDialogManager::DialogClosedCallback callback) {
   JavaScriptModalDialogEfl* dialog =
-      new JavaScriptModalDialogEfl(web_contents, origin_url, type, message_text,
-                                   default_prompt_text, callback);
+      new JavaScriptModalDialogEfl(web_contents, type, message_text,
+                                   default_prompt_text, std::move(callback));
   if (!dialog->ShowJavaScriptDialog()) {
     delete dialog;
     dialog = NULL;
@@ -34,18 +33,16 @@ JavaScriptModalDialogEfl* JavaScriptModalDialogEfl::CreateDialog(content::WebCon
 }
 
 JavaScriptModalDialogEfl::JavaScriptModalDialogEfl(content::WebContents* web_contents,
-                                                   const GURL& origin_url,
                                                    Type type,
                                                    const base::string16& message_text,
                                                    const base::string16& default_prompt_text,
-                                                   const content::JavaScriptDialogManager::DialogClosedCallback& callback)
-    : callback_(callback)
-    , origin_url_(origin_url)
+                                                   content::JavaScriptDialogManager::DialogClosedCallback callback)
+    : callback_(std::move(callback))
     , label_(false)
     , type_(type)
     , message_text_(message_text)
     , default_prompt_text_(default_prompt_text)
-    , web_view_(WebViewFromWebContents(web_contents))
+    , web_view_(web_contents_utils::WebViewFromWebContents(web_contents))
     , prompt_entry_(NULL)
     , ok_button_(NULL)
     , cancel_button_(NULL)
@@ -95,7 +92,7 @@ bool JavaScriptModalDialogEfl::ShowJavaScriptDialog() {
 
   if (type_ == PROMPT) {
     if (message_text_.c_str())
-      elm_object_part_text_set(popup_, "title,text", UTF16ToUTF8(message_text_).c_str());
+      elm_object_part_text_set(popup_, "title,text", base::UTF16ToUTF8(message_text_).c_str());
 
     base::FilePath edj_dir;
     base::FilePath javaScriptPopup_edj;
@@ -113,7 +110,7 @@ bool JavaScriptModalDialogEfl::ShowJavaScriptDialog() {
     elm_entry_single_line_set(prompt_entry_, EINA_TRUE);
     elm_entry_input_panel_return_key_type_set(prompt_entry_, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE );
     evas_object_smart_callback_add(prompt_entry_, "activated", promptEnterKeyDownCallback, this);
-    elm_object_text_set(prompt_entry_, UTF16ToUTF8(default_prompt_text_).c_str());
+    elm_object_text_set(prompt_entry_, base::UTF16ToUTF8(default_prompt_text_).c_str());
     elm_entry_scrollable_set(prompt_entry_, EINA_TRUE);
     elm_entry_cursor_end_set(prompt_entry_);
 
@@ -135,14 +132,14 @@ bool JavaScriptModalDialogEfl::ShowJavaScriptDialog() {
 
   } else if (type_ == NAVIGATION) {
     if (message_text_.c_str())
-      elm_object_part_text_set(popup_, "title,text", UTF16ToUTF8(message_text_).c_str());
+      elm_object_part_text_set(popup_, "title,text", base::UTF16ToUTF8(message_text_).c_str());
 
 
     std::string question(dgettext("WebKit", "IDS_WEBVIEW_POP_LEAVE_THIS_PAGE_Q"));
 
     std::string message;
     if (default_prompt_text_.c_str())
-      message = std::string(UTF16ToUTF8(default_prompt_text_).c_str()) + ("\n") + question;
+      message = std::string(base::UTF16ToUTF8(default_prompt_text_).c_str()) + ("\n") + question;
     else
       message = question;
 
@@ -165,7 +162,7 @@ bool JavaScriptModalDialogEfl::ShowJavaScriptDialog() {
                                "IDS_WEBVIEW_POP_JAVASCRIPT_ALERT"));
     }
 
-    if (!setLabelText(UTF16ToUTF8(message_text_).c_str()))
+    if (!setLabelText(base::UTF16ToUTF8(message_text_).c_str()))
       return false;
 
     ok_button_ = elm_button_add(popup_);
@@ -180,7 +177,7 @@ bool JavaScriptModalDialogEfl::ShowJavaScriptDialog() {
                                "IDS_WEBVIEW_POP_JAVASCRIPT"));
     }
 
-    if (!setLabelText(UTF16ToUTF8(message_text_).c_str()))
+    if (!setLabelText(base::UTF16ToUTF8(message_text_).c_str()))
       return false;
 
     cancel_button_ = elm_button_add(popup_);
@@ -307,7 +304,7 @@ void JavaScriptModalDialogEfl::javascriptPopupResizeCallback(void *data, Evas *e
 void JavaScriptModalDialogEfl::OkButtonHandlerForAlert(void *data, Evas_Object *obj, void *event_info) {
   JavaScriptModalDialogEfl* dialog = (JavaScriptModalDialogEfl*)data;
 
-  dialog->callback_.Run(true, base::string16());
+  std::move(dialog->callback_).Run(true, base::string16());
   evas_object_del(dialog->popup_);
   dialog->close();
 
@@ -317,7 +314,7 @@ void JavaScriptModalDialogEfl::OkButtonHandlerForAlert(void *data, Evas_Object *
 void JavaScriptModalDialogEfl::CancelButtonHandlerForAlert(void *data, Evas_Object *obj, void *event_info) {
   JavaScriptModalDialogEfl* dialog = (JavaScriptModalDialogEfl*)data;
 
-  dialog->callback_.Run(false, base::string16());
+  std::move(dialog->callback_).Run(false, base::string16());
   evas_object_del(dialog->popup_);
   dialog->close();
 
@@ -327,7 +324,7 @@ void JavaScriptModalDialogEfl::CancelButtonHandlerForAlert(void *data, Evas_Obje
 void JavaScriptModalDialogEfl::OkButtonHandlerForConfirm(void *data, Evas_Object *obj, void *event_info) {
   JavaScriptModalDialogEfl* dialog = (JavaScriptModalDialogEfl*)data;
 
-  dialog->callback_.Run(true, base::string16());
+  std::move(dialog->callback_).Run(true, base::string16());
   evas_object_del(dialog->popup_);
   dialog->close();
 
@@ -337,7 +334,7 @@ void JavaScriptModalDialogEfl::OkButtonHandlerForConfirm(void *data, Evas_Object
 void JavaScriptModalDialogEfl::CancelButtonHandlerForConfirm(void *data, Evas_Object *obj, void *event_info) {
   JavaScriptModalDialogEfl* dialog = (JavaScriptModalDialogEfl*)data;
 
-  dialog->callback_.Run(false, base::string16());
+  std::move(dialog->callback_).Run(false, base::string16());
   evas_object_del(dialog->popup_);
   dialog->close();
 
@@ -351,7 +348,7 @@ void JavaScriptModalDialogEfl::OkButtonHandlerForPrompt(void *data, Evas_Object
   if (dialog->prompt_entry_)
     prompt_data = elm_entry_entry_get(dialog->prompt_entry_);
 
-  dialog->callback_.Run(true, base::UTF8ToUTF16(prompt_data));
+  std::move(dialog->callback_).Run(true, base::UTF8ToUTF16(prompt_data));
   evas_object_del(dialog->popup_);
   dialog->close();
 
@@ -361,7 +358,7 @@ void JavaScriptModalDialogEfl::OkButtonHandlerForPrompt(void *data, Evas_Object
 void JavaScriptModalDialogEfl::CancelButtonHandlerForPrompt(void *data, Evas_Object *obj, void *event_info) {
   JavaScriptModalDialogEfl* dialog = (JavaScriptModalDialogEfl*)data;
 
-  dialog->callback_.Run(false, base::string16());
+  std::move(dialog->callback_).Run(false, base::string16());
   evas_object_del(dialog->popup_);
   dialog->close();
 
index a89a041d38f713cfe44875521e145e081c8a671e..cf14f95030d3b92e5d33b5c3b1f56e3a24a34ac1 100644 (file)
@@ -9,12 +9,14 @@
 #include <string>
 
 #include "base/strings/string16.h"
-#include "url/gurl.h"
+#include "ui/views/window/dialog_delegate.h"
 
 #include <Evas.h>
 #include <Elementary.h>
 #include "ecore_x_wayland_wrapper.h"
 
+
+
 class EWebView;
 
 namespace content {
@@ -39,11 +41,10 @@ class JavaScriptModalDialogEfl {
   static void CancelButtonHandlerForPrompt(void *data, Evas_Object *obj, void *event_info);
   static void javascriptPopupResizeCallback(void *data, Evas *e, Evas_Object *obj, void *event_info);
   static JavaScriptModalDialogEfl* CreateDialog(content::WebContents* web_contents,
-                           const GURL& origin_url,
                            Type type,
                            const base::string16& message_text,
                            const base::string16& default_prompt_text,
-                           const content::JavaScriptDialogManager::DialogClosedCallback& callback);
+                           content::JavaScriptDialogManager::DialogClosedCallback callback);
 
   static void KeyUpCallback(void *data, Evas *e, Evas_Object *obj, void *event_info);
   bool ShowJavaScriptDialog();
@@ -55,14 +56,12 @@ class JavaScriptModalDialogEfl {
 
  private:
   JavaScriptModalDialogEfl(content::WebContents* web_contents,
-                           const GURL& origin_url,
                            Type type,
                            const base::string16& message_text,
                            const base::string16& default_prompt_text,
-                           const content::JavaScriptDialogManager::DialogClosedCallback& callback);
+                           content::JavaScriptDialogManager::DialogClosedCallback callback);
 
   content::JavaScriptDialogManager::DialogClosedCallback callback_;
-  GURL origin_url_;
   bool label_;
   Type type_;
   base::string16 message_text_;
index 57b19b03bf8286275798e9ad631901fdc4c113a8..d31117dc0351839e747722035ea28707e2dd629e 100644 (file)
@@ -27,9 +27,9 @@ NotificationControllerEfl::NotificationControllerEfl()
 }
 
 NotificationControllerEfl::~NotificationControllerEfl() {
-  notifications_map_.Clear();
+  //notifications_map_.Clear();
 }
-
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 void NotificationControllerEfl::NotificationAdd(uint64_t notification_id,
     const GURL& origin, const base::string16& replace_id,
     std::unique_ptr<DesktopNotificationDelegate> delegate) {
@@ -49,14 +49,14 @@ bool NotificationControllerEfl::NotificationClosed(uint64_t notification_id,
   notifications_map_.Remove(notification_id);
   return true;
 }
-
+#endif
 void NotificationControllerEfl::NotificationCancelled(uint64_t notification_id) {
-  NotificationClosed(notification_id, false);
+  //NotificationClosed(notification_id, false);
   if (notification_cancel_callback_) {
     notification_cancel_callback_(notification_id, notification_callback_user_data_);
   }
 }
-
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 bool NotificationControllerEfl::NotificationClicked(uint64_t notification_id) {
   NotificationData* saved_data = notifications_map_.Lookup(notification_id);
   if (!saved_data)
@@ -75,7 +75,7 @@ bool NotificationControllerEfl::NotificationDisplayed(uint64_t notification_id)
   saved_data->notification_delegate->NotificationDisplayed();
   return true;
 }
-
+#endif
 blink::mojom::PermissionStatus NotificationControllerEfl::CheckPermissionOnUIThread(
     BrowserContext* browser_context,
     const GURL& origin,
@@ -94,12 +94,11 @@ blink::mojom::PermissionStatus NotificationControllerEfl::CheckPermissionOnIOThr
 
 void NotificationControllerEfl::DisplayNotification(
     BrowserContext* browser_context,
+    const std::string& notification_id,
     const GURL& origin,
     const PlatformNotificationData& notification_data,
     const NotificationResources& notification_resources,
-    std::unique_ptr<DesktopNotificationDelegate> delegate,
     base::Closure* cancel_callback) {
-
   BrowserContextEfl* browser_context_efl =
       static_cast<BrowserContextEfl*>(browser_context);
   CHECK(browser_context_efl);
@@ -108,7 +107,7 @@ void NotificationControllerEfl::DisplayNotification(
 
   bool has_callbacks = ctx->HasNotificationCallbacks()
       || (notification_show_callback_ && notification_cancel_callback_);
-
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (!has_callbacks) {
     delegate->NotificationClosed();
     return;
@@ -149,11 +148,13 @@ void NotificationControllerEfl::DisplayNotification(
     notification_show_callback_(notification, notification_callback_user_data_);
 
   delete notification;
+#endif
 }
 
-void NotificationControllerEfl:: DisplayPersistentNotification(
+void NotificationControllerEfl::DisplayPersistentNotification(
     BrowserContext* browser_context,
-    int64_t persistent_notification_id,
+    const std::string& notification_id,
+    const GURL& service_worker_origin,
     const GURL& origin,
     const PlatformNotificationData& notification_data,
     const NotificationResources& notification_resources) {
@@ -162,7 +163,7 @@ void NotificationControllerEfl:: DisplayPersistentNotification(
 
 void NotificationControllerEfl::ClosePersistentNotification(
     BrowserContext* browser_context,
-    int64_t persistent_notification_id) {
+    const std::string& notification_id) {
   NOTIMPLEMENTED();
 }
 
@@ -217,6 +218,7 @@ void NotificationControllerEfl::RemovePermissions(Eina_List* origins) {
   }
 }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 bool NotificationControllerEfl::IsNotificationPresent(const GURL& origin,
     const base::string16& replaceid, uint64_t& notification_id) {
   IDMap<NotificationData, IDMapOwnPointer>::const_iterator it(&notifications_map_);
@@ -230,6 +232,7 @@ bool NotificationControllerEfl::IsNotificationPresent(const GURL& origin,
 
   return false;
 }
+#endif
 
 void NotificationControllerEfl::RequestPermission(
     WebContents* web_contents,
@@ -281,11 +284,4 @@ void NotificationControllerEfl::SetNotificationCallbacks(Ewk_Notification_Show_C
   notification_callback_user_data_ = user_data;
 }
 
-bool NotificationControllerEfl::GetDisplayedPersistentNotifications(
-    BrowserContext* browser_context,
-    std::set<std::string>* displayed_notifications) {
-  NOTIMPLEMENTED();
-  return false;
-}
-
 }//namespace
index c38bbb6adce9db4e197da8ed1b28009f25f66de8..39a108a1b01ccfe065780bf6d82794304354d7f6 100644 (file)
@@ -9,18 +9,20 @@
 
 #include <Eina.h>
 
-#include "base/id_map.h"
+#include "base/containers/id_map.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
-#include "content/public/browser/desktop_notification_delegate.h"
+//#include "content/public/browser/desktop_notification_delegate.h"
 #include "content/public/browser/platform_notification_service.h"
 #include "public/ewk_notification.h"
-#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
+#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h"
 #include "url/gurl.h"
 
 namespace content {
 class WebContents;
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+//DesktopNotificationDelegate is not defined
 struct NotificationData {
   const std::string origin_url;
   const base::string16 replace_id;
@@ -33,27 +35,29 @@ struct NotificationData {
         replace_id(replaceid),
         notification_delegate(std::move(delegate)) {}
 };
-
+#endif  // !defined(EWK_BRINGUP)
 class NotificationControllerEfl: public PlatformNotificationService {
  public:
   NotificationControllerEfl();
   ~NotificationControllerEfl();
-
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+//DesktopNotificationDelegate is not defined
   // Adds a new notification received from engine to a list
   void NotificationAdd(uint64_t notification_id, const GURL& origin,
       const base::string16& replace_id,
       std::unique_ptr<DesktopNotificationDelegate> delegate);
 
   bool NotificationClosed(uint64_t notification_id, bool by_user);
-
+#endif
   void NotificationCancelled(uint64_t notification_id);
-
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+//DesktopNotificationDelegate is not defined
   // Notify engine when user clicked on the notification
   bool NotificationClicked(uint64_t notification_id);
 
   // Notification engine that notification was displayed
   bool NotificationDisplayed(uint64_t notification_id);
-
+#endif
   // sets the permission for a particular pending notification
   void SetPermissionForNotification(
       Ewk_Notification_Permission_Request* notification,
@@ -68,11 +72,13 @@ class NotificationControllerEfl: public PlatformNotificationService {
   // Removes stored permissions for given origins
   void RemovePermissions(Eina_List* origins);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+//DesktopNotificationDelegate is not defined
   // Checks if the notification is already present.
   // If present returns the notification id of the notification else false
   bool IsNotificationPresent(const GURL& origin,
       const base::string16& replaceid, uint64_t& notification_id);
-
+#endif
   void RequestPermission(WebContents* web_contents,
                          const GURL& requesting_frame,
                          const base::Callback<void(
@@ -101,17 +107,18 @@ class NotificationControllerEfl: public PlatformNotificationService {
   // |cancel_callback| argument. This method must be called on the UI thread.
   void DisplayNotification(
       BrowserContext* browser_context,
+      const std::string& notification_id,
       const GURL& origin,
       const PlatformNotificationData& notification_data,
       const NotificationResources& notification_resources,
-      std::unique_ptr<DesktopNotificationDelegate> delegate,
       base::Closure* cancel_callback) override;
 
   // Displays the persistent notification described in |notification_data| to
   // the user. This method must be called on the UI thread.
   void DisplayPersistentNotification(
       BrowserContext* browser_context,
-      int64_t persistent_notification_id,
+      const std::string& notification_id,
+      const GURL& service_worker_origin,
       const GURL& origin,
       const PlatformNotificationData& notification_data,
       const NotificationResources& notification_resources) override;
@@ -120,20 +127,22 @@ class NotificationControllerEfl: public PlatformNotificationService {
   // |persistent_notification_id|. This method must be called on the UI thread.
   void ClosePersistentNotification(
       BrowserContext* browser_context,
-      int64_t persistent_notification_id) override;
+      const std::string& notification_id) override;
 
+  // FIXME: Removed in upstream
+  //
   // Writes the ids of all currently displaying persistent notifications for the
   // given |browser_context| to |displayed_notifications|. Returns whether the
   // platform is able to provide such a set.
   bool GetDisplayedPersistentNotifications(
       BrowserContext* browser_context,
-      std::set<std::string>* displayed_notifications) override;
+      std::set<std::string>* displayed_notifications);
 
  private:
   blink::mojom::PermissionStatus CheckPermissionForOrigin(
       const GURL &origin) const;
 
-  IDMap<NotificationData, IDMapOwnPointer> notifications_map_; // This stores the notifications displayed to the user
+  //IDMap<NotificationData, IDMapOwnPointer> notifications_map_; // This stores the notifications displayed to the user
   std::map<GURL, bool> permissions_map_;
   mutable base::Lock permissions_mutex_;
 
index d7ecabee030f35a33799da26de6870d38a30f5d7..f99fbd2df7808d3f2c4c9b0130f869fe0f315aa9 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   // PasswordManagerClient implementation.
   virtual bool PromptUserToSaveOrUpdatePassword(
-      scoped_ptr<PasswordFormManager> form_to_save,
+      std::unique_ptr<PasswordFormManager> form_to_save,
       CredentialSourceType type,
       bool update_password) override;
 
@@ -48,7 +48,7 @@ public:
   void NotifyUserAutoSignin(
       ScopedVector<autofill::PasswordForm> local_forms) override;
   void AutomaticPasswordSave(
-      scoped_ptr<PasswordFormManager> saved_form_manager) override;
+      std::unique_ptr<PasswordFormManager> saved_form_manager) override;
 
   const PasswordManager* GetPasswordManager() const override;
   const CredentialsFilter* GetStoreResultFilter() const override;
index cf8d78edddf5d4ec70a9bf81f3663effbea1edbd..8bf2d215241ab1a9619393a533c79b5f24e8c617 100644 (file)
@@ -77,7 +77,7 @@ void PasswordStoreFactory::Init()
   scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner(
       base::ThreadTaskRunnerHandle::Get());
   scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner(
-      content::BrowserThread::GetMessageLoopProxyForThread(
+      content::BrowserThread::GetTaskRunnerForThread(
           content::BrowserThread::DB));
 
   scoped_refptr<PasswordStore> ps = new PasswordStoreDefault(
index 8db5612ec0136a4401070c6df0d1ac6c2cf255a4..399564f70dec7b1032005a4f199f4991a40993b6 100644 (file)
@@ -30,8 +30,9 @@ PermissionManagerEfl::~PermissionManagerEfl() {
 int PermissionManagerEfl::RequestPermission(PermissionType permission,
                        content::RenderFrameHost* render_frame_host,
                        const GURL& requesting_origin,
+                       bool user_gesture,
                        const base::Callback<void(PermissionStatus)>& callback) {
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 // [M48_2564] Temporary disabling the codes for switching to new chromium
 //            FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15387
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -107,6 +108,7 @@ int PermissionManagerEfl::RequestPermissions(
                        const std::vector<PermissionType>& permission,
                        RenderFrameHost* render_frame_host,
                        const GURL& requesting_origin,
+                       bool user_gesture,
                        const base::Callback<void(
                            const std::vector<PermissionStatus>&)>& callback) {
   NOTIMPLEMENTED();
@@ -129,11 +131,6 @@ void PermissionManagerEfl::ResetPermission(PermissionType permission,
                                            const GURL& embedding_origin) {
 }
 
-void PermissionManagerEfl::RegisterPermissionUsage(PermissionType permission,
-                                                 const GURL& requesting_origin,
-                                                 const GURL& embedding_origin) {
-}
-
 int PermissionManagerEfl::SubscribePermissionStatusChange(
                       PermissionType permission,
                       const GURL& requesting_origin,
index faa8a56eff99c51070d451a174bdc1072b15f481..0c80dcace12a15304bcc3918d1612fa14935c01e 100644 (file)
@@ -21,6 +21,7 @@ class CONTENT_EXPORT PermissionManagerEfl : public PermissionManager {
       PermissionType permission,
       content::RenderFrameHost* render_frame_host,
       const GURL& requesting_origin,
+      bool user_gesture,
       const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
       override;
 
@@ -28,6 +29,7 @@ class CONTENT_EXPORT PermissionManagerEfl : public PermissionManager {
       const std::vector<PermissionType>& permission,
       RenderFrameHost* render_frame_host,
       const GURL& requesting_origin,
+      bool user_gesture,
       const base::Callback<
           void(const std::vector<blink::mojom::PermissionStatus>&)>& callback)
       override;
@@ -43,10 +45,6 @@ class CONTENT_EXPORT PermissionManagerEfl : public PermissionManager {
                        const GURL& requesting_origin,
                        const GURL& embedding_origin) override;
 
-  void RegisterPermissionUsage(PermissionType permission,
-                               const GURL& requesting_origin,
-                               const GURL& embedding_origin) override;
-
   // Runs the given |callback| whenever the |permission| associated with the
   // pair { requesting_origin, embedding_origin } changes.
   // Returns the subscription_id to be used to unsubscribe.
index f0e9ff0b6e344ecb45c9a179ee9451f67f3b850e..0ca7c89d0318fa83ae0c7ac258c78799ede0cfe7 100644 (file)
@@ -6,7 +6,7 @@
 #define POLICY_RESPONSE_DELEGATE_EFL_H_
 
 #include "base/memory/ref_counted.h"
-#include "content/public/browser/resource_controller.h"
+#include "content/browser/loader/resource_controller.h"
 #include "content/public/common/resource_type.h"
 #include "net/base/completion_callback.h"
 #include "private/ewk_policy_decision_private.h"
index 605544927e6c7401d0d7297e9713c828ff09033e..1e3d9187743fa67c33193bbe07833e40bb95caf5 100644 (file)
 using web_contents_utils::WebViewFromViewId;
 using namespace content;
 
-void QuotaPermissionContextEfl::RequestQuotaPermission(const StorageQuotaParams& params,
-                                                       int render_process_id,
-                                                       const QuotaPermissionContext::PermissionCallback &callback)
-{
+void QuotaPermissionContextEfl::RequestQuotaPermission(
+    const StorageQuotaParams& params,
+    int render_process_id,
+    const QuotaPermissionContext::PermissionCallback& callback) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
@@ -24,7 +24,8 @@ void QuotaPermissionContextEfl::RequestQuotaPermission(const StorageQuotaParams&
     return;
   }
 
-  EWebView* web_view = WebViewFromViewId(render_process_id, params.render_view_id);
+  EWebView* web_view =
+      web_contents_utils::WebViewFromFrameId(render_process_id, params.render_frame_id);
 
   if (!web_view) {
     NOTREACHED();
@@ -32,26 +33,27 @@ void QuotaPermissionContextEfl::RequestQuotaPermission(const StorageQuotaParams&
     return;
   }
 
-  bool isPersistent = (storage::StorageType::kStorageTypePersistent == params.storage_type);
+  bool isPersistent =
+      (storage::StorageType::kStorageTypePersistent == params.storage_type);
 
-  _Ewk_Quota_Permission_Request* request = new _Ewk_Quota_Permission_Request(params.origin_url,
-                                                                             params.requested_size,
-                                                                             isPersistent);
+  _Ewk_Quota_Permission_Request* request = new _Ewk_Quota_Permission_Request(
+      params.origin_url, params.requested_size, isPersistent);
 
   web_view->InvokeQuotaPermissionRequest(request, callback);
 }
 
-void QuotaPermissionContextEfl::DispatchCallback(const QuotaPermissionContext::PermissionCallback &callback,
-                                                 QuotaPermissionContext::QuotaPermissionResponse response) {
+void QuotaPermissionContextEfl::DispatchCallback(
+    const QuotaPermissionContext::PermissionCallback& callback,
+    QuotaPermissionContext::QuotaPermissionResponse response) {
   DCHECK_EQ(false, callback.is_null());
 
   if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
     content::BrowserThread::PostTask(
-         content::BrowserThread::IO, FROM_HERE,
-         base::Bind(&QuotaPermissionContextEfl::DispatchCallback, callback, response));
+        content::BrowserThread::IO, FROM_HERE,
+        base::Bind(&QuotaPermissionContextEfl::DispatchCallback, callback,
+                   response));
     return;
   }
 
   callback.Run(response);
 }
-
index 4d2d44729469082a292849575d2e7cb2b2d1b979..c73089b78dd2cec021626c9c9b0abb07d00a13b8 100644 (file)
@@ -8,12 +8,13 @@
 #include "content/public/browser/quota_permission_context.h"
 
 class QuotaPermissionContextEfl : public content::QuotaPermissionContext {
-public:
+ public:
   void RequestQuotaPermission(const content::StorageQuotaParams& params,
                               int render_process_id,
                               const PermissionCallback& callback) override;
 
-  static void DispatchCallback(const PermissionCallback& callback, QuotaPermissionResponse response);
+  static void DispatchCallback(const PermissionCallback& callback,
+                               QuotaPermissionResponse response);
 };
 
 #endif /* QUOTA_PERMISSION_CONTEXT_EFL_ */
index 6f149077556502d97d89d3df340a5cea31f3943a..fa5ebe09d208e1744bf8f39b73b94ba42f113f37 100644 (file)
@@ -8,8 +8,8 @@
 #include "base/compiler_specific.h"
 #include "content/public/browser/browser_message_filter.h"
 #include "private/ewk_hit_test_private.h"
-#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
-#include "third_party/WebKit/public/web/WebNavigationType.h"
+#include "third_party/blink/public/web/WebNavigationPolicy.h"
+#include "third_party/blink/public/web/WebNavigationType.h"
 #include "url/gurl.h"
 
 #if defined(TIZEN_MULTIMEDIA_SUPPORT)
index be003e10ec415788652191659cfc78f4c06220b6..61a7f00d8a882d66cbcf028e92058b8bff30f363 100644 (file)
@@ -31,14 +31,14 @@ void TriggerNewDownloadStartCallbackOnUIThread(
     const std::string& /*content_disposition*/,
     const std::string& /*mime_type*/,
     int64_t /*content_length*/) {
-  WebContents* web_contents = WebContentsFromViewID(
-    render_process_id, render_view_id);
+  WebContents* web_contents =
+      WebContentsFromViewID(render_process_id, render_view_id);
 
   if (!web_contents)
     return;
 
-  BrowserContextEfl* browser_context = static_cast<BrowserContextEfl*>(
-      web_contents->GetBrowserContext());
+  BrowserContextEfl* browser_context =
+      static_cast<BrowserContextEfl*>(web_contents->GetBrowserContext());
   if (!browser_context)
     return;
 
@@ -50,22 +50,24 @@ void TriggerNewDownloadStartCallbackOnUIThread(
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   start_download_callback->TriggerCallback(url.spec());
 }
-
 }
 
 void ResourceDispatcherHostDelegateEfl::RequestBeginning(
     net::URLRequest* request,
-    ResourceContext* resource_context,
-    AppCacheService* appcache_service,
-    ResourceType resource_type,
-    ScopedVector<ResourceThrottle>* throttles) {
+    content::ResourceContext* resource_context,
+    content::AppCacheService* appcache_service,
+    content::ResourceType resource_type,
+    std::vector<std::unique_ptr<content::ResourceThrottle>>* throttles) {
+// Arguments have changed. Needs a relook.
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   // Add throttle for http, https and file protocol.
   if (request->url().SchemeIsHTTPOrHTTPS() || request->url().SchemeIsFile())
     throttles->push_back(new ResourceThrottleEfl(*request, resource_type));
 
-  // policy response and custom headers should be probably only for HTTP and HTTPs
+  // policy response and custom headers should be probably only for HTTP and
+  // HTTPs
   if (request->url().SchemeIsHTTPOrHTTPS()) {
-    BrowserContextEfl::ResourceContextEfl *resource_context_efl =
+    BrowserContextEfl::ResourceContextEflresource_context_efl =
         static_cast<BrowserContextEfl::ResourceContextEfl*>(resource_context);
     if (!resource_context_efl)
       return;
@@ -73,9 +75,10 @@ void ResourceDispatcherHostDelegateEfl::RequestBeginning(
     HTTPCustomHeadersEflMap header_map =
         resource_context_efl->GetHTTPCustomHeadersEflMap();
     for (HTTPCustomHeadersEflMap::iterator it = header_map.begin();
-        it != header_map.end(); ++it)
+         it != header_map.end(); ++it)
       request->SetExtraRequestHeaderByName(it->first, it->second, true);
   }
+#endif
 }
 
 ResourceDispatcherHostLoginDelegate*
@@ -88,11 +91,10 @@ ResourceDispatcherHostDelegateEfl::CreateLoginDelegate(
 void ResourceDispatcherHostDelegateEfl::DownloadStarting(
     net::URLRequest* request,
     content::ResourceContext* resource_context,
-    int child_id,
-    int route_id,
     bool is_content_initiated,
     bool must_download,
-    ScopedVector<content::ResourceThrottle>* throttles) {
+    bool is_new_request,
+    std::vector<std::unique_ptr<content::ResourceThrottle>>* throttles) {
   std::string user_agent;
   std::string content_disposition;
   std::string mime_type;
@@ -104,21 +106,20 @@ void ResourceDispatcherHostDelegateEfl::DownloadStarting(
   net::HttpResponseHeaders* response_headers = request->response_headers();
   if (response_headers) {
     response_headers->GetNormalizedHeader("content-disposition",
-        &content_disposition);
+                                          &content_disposition);
     response_headers->GetMimeType(&mime_type);
   }
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   // POST request cannot be repeated in general, so prevent client from
   // retrying the same request, even if it is with a GET.
   if ("GET" == request->method()) {
-    TriggerNewDownloadStartCallback(request,
-                user_agent,
-                content_disposition,
-                mime_type,
-                content_length,
-                child_id,
-                route_id);
+    TriggerNewDownloadStartCallback(request, user_agent, content_disposition,
+                                    mime_type, content_length, child_id,
+                                    route_id);
   }
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void ResourceDispatcherHostDelegateEfl::TriggerNewDownloadStartCallback(
@@ -134,23 +135,19 @@ void ResourceDispatcherHostDelegateEfl::TriggerNewDownloadStartCallback(
   // Since called by IO thread callback trigger needs to
   // be posted to UI thread so that IO thread is unblocked
   BrowserThread::PostTask(
-    BrowserThread::UI, FROM_HERE,
-    base::Bind(TriggerNewDownloadStartCallbackOnUIThread,
-               render_process_id,
-               render_view_id,
-               request->url(),
-               user_agent,
-               content_disposition,
-               mime_type,
-               content_length));
+      BrowserThread::UI, FROM_HERE,
+      base::Bind(TriggerNewDownloadStartCallbackOnUIThread, render_process_id,
+                 render_view_id, request->url(), user_agent,
+                 content_disposition, mime_type, content_length));
 }
 
 bool ResourceDispatcherHostDelegateEfl::ShouldOverrideMimeType(
-    const GURL& url, std::string& new_mime_type) const {
+    const GURL& url,
+    std::string& new_mime_type) const {
   MimeOverrideManagerEfl* mime_override_manager_efl =
       MimeOverrideManagerEfl::GetInstance();
   return mime_override_manager_efl->PopOverriddenMime(url.spec(),
                                                       new_mime_type);
 }
 
-} // namespace content
+}  // namespace content
index 10e8deec0a6e40beeb46d98b1ab9427221f9af02..0e04a2737f8b9c73e72338dab4528d00e3899cf4 100644 (file)
@@ -20,47 +20,48 @@ class ResourceDispatcherHostLoginDelegate;
 class ResourceDispatcherHostDelegateEfl
     : public ResourceDispatcherHostDelegate {
  public:
-  ResourceDispatcherHostDelegateEfl()
-  {
-  }
+  ResourceDispatcherHostDelegateEfl() {}
 
+  // ResourceDispatcherHostDelegate implementation.
+  //
   // Called after ShouldBeginRequest to allow the embedder to add resource
   // throttles.
-  virtual void RequestBeginning(net::URLRequest* request,
-      ResourceContext* resource_context,
-      AppCacheService* appcache_service,
-      ResourceType resource_type,
-      ScopedVector<ResourceThrottle>* throttles) override;
-
-  // Create login delegate.
-  virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
-      net::AuthChallengeInfo* auth_info, net::URLRequest* request) override;
+  void RequestBeginning(net::URLRequest* request,
+                        content::ResourceContext* resource_context,
+                        content::AppCacheService* appcache_service,
+                        content::ResourceType resource_type,
+                        std::vector<std::unique_ptr<content::ResourceThrottle>>*
+                            throttles) override;
 
   // Called to trigger download.
-  virtual void DownloadStarting(
-      net::URLRequest* request,
-      content::ResourceContext* resource_context,
-      int child_id,
-      int route_id,
-      bool is_content_initiated,
-      bool must_download,
-      ScopedVector<content::ResourceThrottle>* throttles) override;
+  void DownloadStarting(net::URLRequest* request,
+                        content::ResourceContext* resource_context,
+                        bool is_content_initiated,
+                        bool must_download,
+                        bool is_new_request,
+                        std::vector<std::unique_ptr<content::ResourceThrottle>>*
+                            throttles) override;
+
+  // Create login delegate.
+  content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
+      net::AuthChallengeInfo* auth_info,
+      net::URLRequest* request) override;
 
+  // EWK_BRINGUP: Removed in upversion.
   // Returns true if mime type should be overridden, otherwise returns false.
   bool ShouldOverrideMimeType(const GURL& url,
-                              std::string& new_mime_type) const override;
+                              std::string& new_mime_type) const;
 
  private:
-  void TriggerNewDownloadStartCallback(
-      net::URLRequest* request,
-      const std::string& user_agent,
-      const std::string& content_disposition,
-      const std::string& mime_type,
-      int64_t content_length,
-      int render_process_id,
-      int render_view_id);
+  void TriggerNewDownloadStartCallback(net::URLRequest* request,
+                                       const std::string& user_agent,
+                                       const std::string& content_disposition,
+                                       const std::string& mime_type,
+                                       int64_t content_length,
+                                       int render_process_id,
+                                       int render_view_id);
 };
 
-} // namespace net
+}  // namespace net
 
-#endif // RESOURCE_DISPATCHER_HOST_DELEGATE_EFL_H
+#endif  // RESOURCE_DISPATCHER_HOST_DELEGATE_EFL_H
index dbfc4b10b28ebb0df132cb64a4135e6bbd4371da..5f4168916b2d4e5c1b18c891541ea12824b918b6 100644 (file)
@@ -8,18 +8,17 @@
 #include <cstddef>  //for NULL
 #include "browser/policy_response_delegate_efl.h"
 #include "content/public/browser/resource_throttle.h"
-#include "content/public/browser/resource_controller.h"
+#include "content/browser/loader/resource_controller.h"
 #include "content/public/common/resource_type.h"
 #include "net/url_request/url_request.h"
 
-class  ResourceThrottleEfl : public content::ResourceThrottle {
+class ResourceThrottleEfl : public content::ResourceThrottle {
  public:
   ResourceThrottleEfl(net::URLRequest& request,
                       content::ResourceType resource_type)
       : request_(request),
         resource_type_(resource_type),
-        policy_delegate_(NULL) {
-  }
+        policy_delegate_(NULL) {}
 
   ~ResourceThrottleEfl();
 
@@ -30,11 +29,17 @@ class  ResourceThrottleEfl : public content::ResourceThrottle {
   }
 
   void Resume() {
-    controller()->Resume();
+    // EWK_BRINGUP. Removed in upstream
+    // 64fa092bc4ccdcb1c0cc08b93d6c1bd49363adb0
+    // controller()->Resume();
+    Resume();
   }
 
   void Ignore() {
-    controller()->CancelAndIgnore();
+    // EWK_BRINGUP. Removed in upstream
+    // 64fa092bc4ccdcb1c0cc08b93d6c1bd49363adb0
+    // controller()->CancelAndIgnore();
+    Cancel();
   }
 
  private:
index 4786f6c47e50cdd0f2ce848c9c7344534cc514f6..856ce0305fe0ae6fbaa0910be9051e2b9c629257 100644 (file)
@@ -8,67 +8,70 @@
 #include "base/logging.h"
 
 Popup_Menu_Item::Popup_Menu_Item(const content::MenuItem& item)
-    : type(static_cast<Popup_Menu_Item_Type>(item.type))
-    , textDirection(item.rtl ? blink::WebTextDirectionRightToLeft: blink::WebTextDirectionLeftToRight)
-    , hasTextDirectionOverride(item.has_directional_override)
-    , isEnabled(item.enabled)
-    , isLabel(true)
-    , isSelected(item.checked)
-    , text(base::UTF16ToUTF8(item.label))
-    , toolTip(base::UTF16ToUTF8(item.tool_tip))
-    , accessibilityText(base::UTF16ToUTF8(item.label)) {
-}
+    : type(static_cast<Popup_Menu_Item_Type>(item.type)),
+      textDirection(item.rtl ? blink::kWebTextDirectionRightToLeft
+                             : blink::kWebTextDirectionLeftToRight),
+      hasTextDirectionOverride(item.has_directional_override),
+      isEnabled(item.enabled),
+      isLabel(true),
+      isSelected(item.checked),
+      text(base::UTF16ToUTF8(item.label)),
+      toolTip(base::UTF16ToUTF8(item.tool_tip)),
+      accessibilityText(base::UTF16ToUTF8(item.label)) {}
 
 Popup_Menu_Item_Type popup_menu_item_type_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, POPUP_MENU_UNKNOWN);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, POPUP_MENU_UNKNOWN);
 
-    return item->type;
+  return item->type;
 }
 
 const char* popup_menu_item_text_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
 
-    return item->text.c_str();
+  return item->text.c_str();
 }
 
-blink::WebTextDirection popup_menu_item_text_direction_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, blink::WebTextDirectionLeftToRight);
+blink::WebTextDirection popup_menu_item_text_direction_get(
+    const Popup_Menu_Item* item) {
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, blink::kWebTextDirectionLeftToRight);
 
-    return item->textDirection;
+  return item->textDirection;
 }
 
-Eina_Bool popup_menu_item_text_direction_override_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+Eina_Bool popup_menu_item_text_direction_override_get(
+    const Popup_Menu_Item* item) {
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
 
-    return item->hasTextDirectionOverride;
+  return item->hasTextDirectionOverride;
 }
 
 const char* popup_menu_item_tooltip_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
 
-    return item->toolTip.c_str();
+  return item->toolTip.c_str();
 }
 
-const char* popup_menu_item_accessibility_text_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
+const char* popup_menu_item_accessibility_text_get(
+    const Popup_Menu_Item* item) {
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
 
-    return item->accessibilityText.c_str();
+  return item->accessibilityText.c_str();
 }
 
 Eina_Bool popup_menu_item_enabled_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
 
-    return item->isEnabled;
+  return item->isEnabled;
 }
 
 Eina_Bool popup_menu_item_is_label_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
 
-    return item->isLabel;
+  return item->isLabel;
 }
 
 Eina_Bool popup_menu_item_selected_get(const Popup_Menu_Item* item) {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
 
-    return item->isSelected;
+  return item->isSelected;
 }
index 438a551dd36c9c7160cd7aa2b8abcf3adf118abf..8c14a57cc5a19e6a1564e2e3ef8e5ad1cb8515a1 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <Eina.h>
 #include <string>
-#include "third_party/WebKit/public/web/WebTextDirection.h"
+#include "third_party/blink/public/web/WebTextDirection.h"
 
 #ifdef __cplusplus
 extern "C" {
index 2c453c832668e481c02c36363c7f6c0ef1ba6b9a..2b3f3aa81b87e701eb23e14799d6b00e1b04ce4b 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "popup_menu_item.h"
 #include "content/public/common/menu_item.h"
-#include "third_party/WebKit/public/web/WebTextDirection.h"
+#include "third_party/blink/public/web/WebTextDirection.h"
 
 #include <string>
 
index 6f1f76a58967c12166065b4f678bad951632b7f9..3427cb9d720d4e58e72574310727b07458e232fe 100644 (file)
@@ -57,12 +57,14 @@ SSLHostStateDelegateEfl::~SSLHostStateDelegateEfl() {
 }
 
 void SSLHostStateDelegateEfl::HostRanInsecureContent(const std::string& host,
-                                                    int pid) {
+                                                     int child_id,
+                                                     InsecureContentType content_type) {
   // Intentional no-op for efl WebView.
 }
 
 bool SSLHostStateDelegateEfl::DidHostRunInsecureContent(const std::string& host,
-                                                       int pid) const {
+                                                        int child_id,
+                                                        InsecureContentType content_type) const {
   // Intentional no-op for efl WebView.
   return false;
 }
@@ -73,7 +75,8 @@ void SSLHostStateDelegateEfl::AllowCert(const std::string& host,
   cert_policy_for_host_[host].Allow(cert, error);
 }
 
-void SSLHostStateDelegateEfl::Clear() {
+void SSLHostStateDelegateEfl::Clear(
+    const base::Callback<bool(const std::string&)>& host_filter) {
   cert_policy_for_host_.clear();
 }
 
index 19ed713dc490875d5d94013be2f6a7c6ca49fcce..ac277b6a1d4629e16e0d8579e0bd9d4e8a280306 100644 (file)
@@ -49,7 +49,7 @@ class SSLHostStateDelegateEfl : public content::SSLHostStateDelegate {
                  const net::X509Certificate& cert,
                  net::CertStatus error) override;
 
-  void Clear() override;
+  void Clear(const base::Callback<bool(const std::string&)>& host_filter) override;
 
   // Queries whether |cert| is allowed or denied for |host| and |error|.
   content::SSLHostStateDelegate::CertJudgment QueryPolicy(
@@ -59,11 +59,14 @@ class SSLHostStateDelegateEfl : public content::SSLHostStateDelegate {
       bool* expired_previous_decision) override;
 
   // Records that a host has run insecure content.
-  void HostRanInsecureContent(const std::string& host, int pid) override;
+  void HostRanInsecureContent(const std::string& host,
+                              int child_id,
+                              InsecureContentType content_type) override;
 
   // Returns whether the specified host ran insecure content.
   bool DidHostRunInsecureContent(const std::string& host,
-                                 int pid) const override;
+                                 int child_id,
+                                 InsecureContentType content_type) const override;
 
   // Revokes all SSL certificate error allow exceptions made by the user for
   // |host|.
index d659aed50a2f01f3114f4736538208e062929f9d..c34fe47514b35b76115ab9cfeaa25a3cc4dfb6d6 100644 (file)
@@ -23,12 +23,12 @@ using content::BrowserThread;
 WebDataService::WebDataService(scoped_refptr<WebDatabaseService> wdbs,
                                const ProfileErrorCallback& callback)
     : WebDataServiceBase(wdbs, callback,
-          BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)) {
+          BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)) {
 }
 
 WebDataService::WebDataService()
     : WebDataServiceBase(NULL, ProfileErrorCallback(),
-          BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)) {
+          BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)) {
 }
 
 WebDataService::~WebDataService() {
index 1cd1beb58f9c3c52c028eeaad027eb1324abfdd1..13f9b757647f856ee114dd24d7ca1947347b5a6b 100644 (file)
@@ -51,8 +51,8 @@ WebDataServiceWrapper::WebDataServiceWrapper() {
   web_database_ =
     new WebDatabaseService(
         path,
-        BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
-        BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB));
+        BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+        BrowserThread::GetTaskRunnerForThread(BrowserThread::DB));
 
   // All tables objects that participate in managing the database must
   // be added here.
@@ -62,8 +62,8 @@ WebDataServiceWrapper::WebDataServiceWrapper() {
   autofill_web_data_ =
     new AutofillWebDataService(
         web_database_,
-        BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
-        BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+        BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+        BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
         base::Bind(&ProfileErrorCallback, 0));
   autofill_web_data_->Init();
 
index cd0d0dfcf30dbc741bc4052e8001ba4a562aa752..acb54b7904e5dc17db65b80d3e53e97e367c6eed 100644 (file)
@@ -12,7 +12,6 @@
 #include "browser/geolocation/geolocation_permission_context_efl.h"
 #include "browser/permission_manager_efl.h"
 #include "browser/webdata/web_data_service_factory.h"
-#include "browser/scoped_allow_wait_for_legacy_web_view_api.h"
 #include "components/autofill/core/browser/personal_data_manager.h"
 #include "components/autofill/core/common/autofill_pref_names.h"
 #include "components/password_manager/core/common/password_manager_pref_names.h"
@@ -39,7 +38,7 @@ void HandleReadError(PersistentPrefStore::PrefReadError error) {
   NOTIMPLEMENTED();
 }
 
-} // namespace
+}  // namespace
 
 namespace content {
 
@@ -50,10 +49,9 @@ static void CreateNetworkDelegateOnIOThread(BrowserContextEfl* context,
   completion->Signal();
 }
 
-BrowserContextEfl::ResourceContextEfl::ResourceContextEfl(scoped_refptr<CookieManager> cookie_manager)
-    : getter_(NULL),
-      cookie_manager_(cookie_manager) {
-}
+BrowserContextEfl::ResourceContextEfl::ResourceContextEfl(
+    scoped_refptr<CookieManager> cookie_manager)
+    : getter_(NULL), cookie_manager_(cookie_manager) {}
 
 BrowserContextEfl::~BrowserContextEfl() {
 #if defined(TIZEN_AUTOFILL_SUPPORT)
@@ -67,17 +65,16 @@ BrowserContextEfl::~BrowserContextEfl() {
   }
 }
 
-BrowserContextEfl::ResourceContextEfl::~ResourceContextEfl() {
-}
+BrowserContextEfl::ResourceContextEfl::~ResourceContextEfl() {}
 
 bool BrowserContextEfl::ResourceContextEfl::HTTPCustomHeaderAdd(
-    const std::string& name, const std::string& value) {
+    const std::string& name,
+    const std::string& value) {
   if (name.empty())
     return false;
 
   base::AutoLock locker(http_custom_headers_lock_);
-  return http_custom_headers_.insert(
-      std::make_pair(name, value)).second;
+  return http_custom_headers_.insert(std::make_pair(name, value)).second;
 }
 
 bool BrowserContextEfl::ResourceContextEfl::HTTPCustomHeaderRemove(
@@ -92,18 +89,18 @@ void BrowserContextEfl::ResourceContextEfl::HTTPCustomHeaderClear() {
 }
 
 const HTTPCustomHeadersEflMap
-    BrowserContextEfl::ResourceContextEfl::GetHTTPCustomHeadersEflMap() const {
+BrowserContextEfl::ResourceContextEfl::GetHTTPCustomHeadersEflMap() const {
   base::AutoLock locker(http_custom_headers_lock_);
   return http_custom_headers_;
 }
 
-
 net::HostResolver* BrowserContextEfl::ResourceContextEfl::GetHostResolver() {
   CHECK(getter_.get());
   return getter_->host_resolver();
 }
 
-net::URLRequestContext* BrowserContextEfl::ResourceContextEfl::GetRequestContext() {
+net::URLRequestContext*
+BrowserContextEfl::ResourceContextEfl::GetRequestContext() {
   CHECK(getter_.get());
   return getter_->GetURLRequestContext();
 }
@@ -112,7 +109,10 @@ net::URLRequestContextGetter* BrowserContextEfl::CreateMediaRequestContext() {
   return request_context_getter_.get();
 }
 
-net::URLRequestContextGetter* BrowserContextEfl::CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool) {
+net::URLRequestContextGetter*
+BrowserContextEfl::CreateMediaRequestContextForStoragePartition(
+    const base::FilePath&,
+    bool) {
   return nullptr;
 }
 
@@ -127,28 +127,28 @@ BrowserContextEfl::ResourceContextEfl::GetCookieManager() const {
 }
 
 BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito)
-  : resource_context_(NULL),
-    web_context_(web_context),
-    temp_dir_creation_attempted_(false),
-    incognito_(incognito) {
+    : resource_context_(NULL),
+      web_context_(web_context),
+      temp_dir_creation_attempted_(false),
+      incognito_(incognito) {
   InitVisitedLinkMaster();
 
   PrefRegistrySimple* pref_registry = new PrefRegistrySimple();
 
   pref_registry->RegisterBooleanPref(kAutofillEnabled, true);
   pref_registry->RegisterBooleanPref(kAutofillWalletImportEnabled, true);
-  pref_registry->RegisterBooleanPref(kPasswordManagerSavingEnabled, true);
+  pref_registry->RegisterBooleanPref(kCredentialsEnableService, true);
 
   PrefServiceFactory pref_service_factory;
-  pref_service_factory.set_user_prefs(make_scoped_refptr(new InMemoryPrefStore()));
+  pref_service_factory.set_user_prefs(base::MakeRefCounted<InMemoryPrefStore>());
   pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError));
   user_pref_service_ = std::move(pref_service_factory.Create(pref_registry));
 
   user_prefs::UserPrefs::Set(this, user_pref_service_.get());
 
 #if defined(TIZEN_AUTOFILL_SUPPORT)
-  autofill::PersonalDataManagerFactory::GetInstance()
-      ->PersonalDataManagerAdd(this);
+  autofill::PersonalDataManagerFactory::GetInstance()->PersonalDataManagerAdd(
+      this);
 #endif
   BrowserContext::Initialize(this, GetPath());
 }
@@ -162,7 +162,8 @@ ResourceContext* BrowserContextEfl::GetResourceContext() {
   return GetResourceContextEfl();
 }
 
-BrowserContextEfl::ResourceContextEfl* BrowserContextEfl::GetResourceContextEfl() {
+BrowserContextEfl::ResourceContextEfl*
+BrowserContextEfl::GetResourceContextEfl() {
   if (!resource_context_) {
     resource_context_ = new ResourceContextEfl(web_context_->cookieManager());
   }
@@ -219,16 +220,16 @@ net::URLRequestContextGetter* BrowserContextEfl::CreateRequestContext(
     // NetWorkDelegate must be created on IO thread
     base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC,
                              base::WaitableEvent::InitialState::NOT_SIGNALED);
-    BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-                            base::Bind(CreateNetworkDelegateOnIOThread, this, &done));
-    ScopedAllowWaitForLegacyWebViewApi allow_wait;
+    BrowserThread::PostTask(
+        BrowserThread::IO, FROM_HERE,
+        base::Bind(CreateNetworkDelegateOnIOThread, this, &done));
     done.Wait();
   }
 
   request_context_getter_ = new URLRequestContextGetterEfl(
       std::move(network_delegate_for_getter_), false, cache_base_path,
-      BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
-      BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+      BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+      BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
       protocol_handlers, std::move(request_interceptors), NULL);
   web_context_->cookieManager()->SetRequestContextGetter(
       request_context_getter_);
@@ -241,19 +242,23 @@ void BrowserContextEfl::SetCertificate(const char* certificate_file) {
   base::FilePath* certificate_path = new base::FilePath(certificate_file);
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
-      base::Bind(&BrowserContextEfl::ReadCertificateAndAdd, base::Owned(certificate_path)));
+                          base::Bind(&BrowserContextEfl::ReadCertificateAndAdd,
+                                     base::Owned(certificate_path)));
 }
 
 void BrowserContextEfl::ReadCertificateAndAdd(base::FilePath* file_path) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
   std::string cert_contents;
   base::ReadFileToString(*file_path, &cert_contents);
-  scoped_refptr<net::X509Certificate> cert(net::X509Certificate::CreateFromBytes(
-      cert_contents.c_str(), cert_contents.size()));
+  scoped_refptr<net::X509Certificate> cert(
+      net::X509Certificate::CreateFromBytes(cert_contents.c_str(),
+                                            cert_contents.size()));
   if (!cert.get()) {
     DLOG(ERROR) << "User certificate could not be parsed.";
     return;
   }
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   int err_code = net::CertDatabase::GetInstance()->CheckUserCert(cert.get());
   if (net::OK != err_code) {
     DLOG(ERROR) << "User certificate is not valid. Error code : " << err_code;
@@ -261,14 +266,17 @@ void BrowserContextEfl::ReadCertificateAndAdd(base::FilePath* file_path) {
   }
   err_code = net::CertDatabase::GetInstance()->AddUserCert(cert.get());
   if (net::OK != err_code) {
-    DLOG(ERROR) << "User certificate could not be added. Error code : " << err_code;
+    DLOG(ERROR) << "User certificate could not be added. Error code : "
+                << err_code;
     return;
   }
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void BrowserContextEfl::InitVisitedLinkMaster() {
   if (!IsOffTheRecord()) {
-    visitedlink_master_.reset(new visitedlink::VisitedLinkMaster(this, this, false));
+    visitedlink_master_.reset(
+        new visitedlink::VisitedLinkMaster(this, this, false));
     visitedlink_master_->Init();
   }
 }
@@ -280,7 +288,8 @@ void BrowserContextEfl::AddVisitedURLs(const std::vector<GURL>& urls) {
   }
 }
 
-void BrowserContextEfl::RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) {
+void BrowserContextEfl::RebuildTable(
+    const scoped_refptr<URLEnumerator>& enumerator) {
   if (!IsOffTheRecord()) {
     // WebView rebuilds from WebChromeClient.getVisitedHistory. The client
     // can change in the lifetime of this WebView and may not yet be set here.
@@ -297,7 +306,7 @@ SSLHostStateDelegate* BrowserContextEfl::GetSSLHostStateDelegate() {
 }
 
 const GeolocationPermissionContextEfl&
-    BrowserContextEfl::GetGeolocationPermissionContext() const {
+BrowserContextEfl::GetGeolocationPermissionContext() const {
   if (!geolocation_permission_context_.get()) {
     geolocation_permission_context_.reset(
         new GeolocationPermissionContextEfl());
@@ -306,4 +315,11 @@ const GeolocationPermissionContextEfl&
   return *(geolocation_permission_context_.get());
 }
 
+BackgroundFetchDelegate* BrowserContextEfl::GetBackgroundFetchDelegate() {
+  return nullptr;
+}
+
+BrowsingDataRemoverDelegate* BrowserContextEfl::GetBrowsingDataRemoverDelegate() {
+  return nullptr;
+}
 }
index 78f4ee6dde647d097bbe3a6f3951d886cb54e89c..d66a6bf98ab7ce5538f4cc76644e29c1dbe8f9eb 100644 (file)
@@ -33,23 +33,21 @@ typedef std::map<std::string, std::string> HTTPCustomHeadersEflMap;
 
 namespace content {
 
-class BrowserContextEfl
-  : public BrowserContext,
-    public visitedlink::VisitedLinkDelegate {
+class BrowserContextEfl : public BrowserContext,
+                          public visitedlink::VisitedLinkDelegate {
  public:
   class ResourceContextEfl : public ResourceContext {
    public:
     ResourceContextEfl(scoped_refptr<CookieManager> cookie_manager);
-    virtual ~ResourceContextEfl();
+    ~ResourceContextEfl();
 
     bool HTTPCustomHeaderAdd(const std::string& name, const std::string& value);
     bool HTTPCustomHeaderRemove(const std::string& name);
     void HTTPCustomHeaderClear();
     const HTTPCustomHeadersEflMap GetHTTPCustomHeadersEflMap() const;
 
-
-    virtual net::HostResolver* GetHostResolver() override;
-    virtual net::URLRequestContext* GetRequestContext() override;
+    net::HostResolver* GetHostResolver() override;
+    net::URLRequestContext* GetRequestContext() override;
     void set_url_request_context_getter(URLRequestContextGetterEfl* getter);
 
     scoped_refptr<CookieManager> GetCookieManager() const;
@@ -66,67 +64,67 @@ class BrowserContextEfl
   BrowserContextEfl(EWebContext*, bool incognito = false);
   ~BrowserContextEfl();
 
+  // BrowserContext implementation.
   net::URLRequestContextGetter* CreateMediaRequestContext() override;
-  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool) override;
-  virtual std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
-      const base::FilePath& partition_path);
-  virtual bool IsOffTheRecord() const override { return incognito_; }
-  URLRequestContextGetterEfl* GetRequestContextEfl()
-  { return request_context_getter_.get(); }
+  net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
+      const base::FilePath&,
+      bool) override;
+  bool IsOffTheRecord() const override { return incognito_; }
 
-  // These methods map to Add methods in visitedlink::VisitedLinkMaster.
-  void AddVisitedURLs(const std::vector<GURL>& urls);
   // visitedlink::VisitedLinkDelegate implementation.
-  virtual void RebuildTable(
-      const scoped_refptr<URLEnumerator>& enumerator) override;
-  // Reset visitedlink master and initialize it.
-  void InitVisitedLinkMaster();
-
-  virtual ResourceContext* GetResourceContext() override;
-
-  virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() override
-  { return &download_manager_delegate_; }
+  void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override;
 
-  virtual BrowserPluginGuestManager* GetGuestManager() override
-  { return 0; }
-  virtual ResourceContextEfl* GetResourceContextEfl();
-
-  virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override
-  { return 0; }
+  ResourceContext* GetResourceContext() override;
+  content::DownloadManagerDelegate* GetDownloadManagerDelegate() override {
+    return &download_manager_delegate_;
+  }
+  BrowserPluginGuestManager* GetGuestManager() override { return 0; }
+  storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override {
+    return 0;
+  }
+  PushMessagingService* GetPushMessagingService() override { return 0; }
+  base::FilePath GetPath() const override;
+  PermissionManager* GetPermissionManager() override;
+  BackgroundSyncController* GetBackgroundSyncController() override;
+  net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
+      const base::FilePath& partition_path,
+      bool in_memory,
+      ProtocolHandlerMap* protocol_handlers,
+      URLRequestInterceptorScopedVector request_interceptors) override {
+    return nullptr;
+  }
+  BackgroundFetchDelegate* GetBackgroundFetchDelegate() override;
+  BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate() override;
 
-  virtual PushMessagingService* GetPushMessagingService() override
-  { return 0; }
+  std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
+      const base::FilePath& partition_path);
+  URLRequestContextGetterEfl* GetRequestContextEfl() {
+    return request_context_getter_.get();
+  }
 
-  virtual const GeolocationPermissionContextEfl&
-      GetGeolocationPermissionContext() const;
+  // These methods map to Add methods in visitedlink::VisitedLinkMaster.
+  void AddVisitedURLs(const std::vector<GURL>& urls);
 
-  virtual base::FilePath GetPath() const override;
+  // Reset visitedlink master and initialize it.
+  void InitVisitedLinkMaster();
 
-  virtual PermissionManager* GetPermissionManager() override;
+  ResourceContextEfl* GetResourceContextEfl();
 
-  virtual BackgroundSyncController* GetBackgroundSyncController() override;
+  const GeolocationPermissionContextEfl& GetGeolocationPermissionContext()
+      const;
 
   net::URLRequestContextGetter* CreateRequestContext(
       content::ProtocolHandlerMap* protocol_handlers,
       URLRequestInterceptorScopedVector request_interceptors);
 
-  virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
-      const base::FilePath& partition_path,
-      bool in_memory,
-      ProtocolHandlerMap* protocol_handlers,
-      URLRequestInterceptorScopedVector request_interceptors) override {
-    return nullptr;
-  }
-
   void SetCertificate(const char* certificate_file);
-  EWebContext* WebContext() const
-  { return web_context_; }
+  EWebContext* WebContext() const { return web_context_; }
 
   void CreateNetworkDelegate();
 
  private:
   static void ReadCertificateAndAdd(base::FilePath* file_path);
-  virtual SSLHostStateDelegate* GetSSLHostStateDelegate() override;
+  SSLHostStateDelegate* GetSSLHostStateDelegate() override;
   mutable std::unique_ptr<GeolocationPermissionContextEfl>
       geolocation_permission_context_;
   std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_;
@@ -145,7 +143,6 @@ class BrowserContextEfl
 
   DISALLOW_COPY_AND_ASSIGN(BrowserContextEfl);
 };
-
 }
 
 #endif
index 002e6ed0106c1bf00ecb3edf7713e60b418ae190..0bdc3eb2a424b7a39cecddffc4f042d8dd144166 100644 (file)
@@ -11,7 +11,7 @@
 #include "base/command_line.h"
 #include "content/public/common/content_switches.h"
 
-using devtools_http_handler::DevToolsDelegateEfl;
+using content::DevToolsDelegateEfl;
 
 namespace content {
 
index b18601c7fbbe450a1fab23cddd2f13a5750d0833..50d8110201ddd0c13f8c51db903e989235ef832e 100644 (file)
@@ -8,12 +8,10 @@
 #include "base/macros.h"
 #include "content/public/browser/browser_main_parts.h"
 
-namespace devtools_http_handler {
-class DevToolsDelegateEfl;
-}
-
 namespace content {
 
+class DevToolsDelegateEfl;
+
 // EFL port implementation of BrowserMainParts.
 // This class contains different "stages" to be executed by BrowserMain(),
 // Each stage is represented by a single BrowserMainParts method, called from
@@ -28,7 +26,7 @@ class BrowserMainPartsEfl : public BrowserMainParts {
   virtual void PostMainMessageLoopRun() override;
 
  private:
-  devtools_http_handler::DevToolsDelegateEfl* devtools_delegate_;
+  content::DevToolsDelegateEfl* devtools_delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserMainPartsEfl);
 };
index 650b86edcbec6b989a8093e62f0d7cb0adb962bd..74907f858d921b83e1cc660d9e5a0aef58a2d05c 100644 (file)
@@ -23,7 +23,6 @@ struct Hit_Test_Params {
   std::string linkTitle; // the title of link
   std::string linkLabel; // the text of the link
   std::string imageURI;
-  std::string mediaURI;
   bool isEditable;
   int mode;
 
index 7a815ddfb8539433780ce84f812bd74af515a96e..2b9f2db3b0335bc705152ea164268ffe7fcea1ce 100644 (file)
@@ -4,12 +4,12 @@
 
 #include "common/navigation_policy_params.h"
 
-#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
+#include "third_party/blink/public/web/WebNavigationPolicy.h"
 
 NavigationPolicyParams::NavigationPolicyParams()
     : render_view_id(-1)
-    , policy(blink::WebNavigationPolicyIgnore)
-    , type(blink::WebNavigationTypeOther)
+    , policy(blink::kWebNavigationPolicyIgnore)
+    , type(blink::kWebNavigationTypeOther)
     , should_replace_current_entry(false)
     , is_main_frame(false)
     , is_redirect(false) {
index ffaad14521c96e1ab97ae355ee2b3e920072f5e0..134d27edfc7430d7df1eb13913eab345934bb81e 100644 (file)
@@ -6,9 +6,9 @@
 #define POLICY_NAVIGATION_PARAMS_H_
 
 #include "content/public/common/referrer.h"
-#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
-#include "third_party/WebKit/public/web/WebNavigationType.h"
-#include "third_party/WebKit/public/platform/WebString.h"
+#include "third_party/blink/public/web/WebNavigationPolicy.h"
+#include "third_party/blink/public/web/WebNavigationType.h"
+#include "third_party/blink/public/platform/WebString.h"
 #include "url/gurl.h"
 
 struct NavigationPolicyParams {
index 2f8b3040e20df9a6ba851062e4e68648edd198e8..059aaca187ac8e4208f49b9db72cebe6548b4331 100644 (file)
@@ -12,7 +12,7 @@ PrintParams::PrintParams()
     desired_dpi(0),
     is_first_request(true),
     print_to_pdf(true),
-    print_scaling_option(blink::WebPrintScalingOptionSourceSize),
+    print_scaling_option(blink::kWebPrintScalingOptionSourceSize),
     document_cookie(0) {
 }
 
index 2a1fa00baa89c39865a10118a28bf2ef88210578..7b1603299a8b9a2b1b0fea9e93c4730b6bd527c8 100644 (file)
@@ -10,7 +10,7 @@
 #include "base/files/file_path.h"
 #include "base/memory/shared_memory.h"
 #include "printing/printing_export.h"
-#include "third_party/WebKit/public/web/WebPrintScalingOption.h"
+#include "third_party/blink/public/web/WebPrintScalingOption.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
 
index 7efca2271b7b93568fa72e60316d3951c82d14ec..1fc2af817851113fdc93ff6d6109317a4ccf3d36 100644 (file)
@@ -17,9 +17,9 @@
 #include "private/ewk_wrt_private.h"
 #include "public/ewk_hit_test.h"
 #include "public/ewk_view.h"
-#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
-#include "third_party/WebKit/public/web/WebNavigationType.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
+#include "third_party/blink/public/web/WebNavigationPolicy.h"
+#include "third_party/blink/public/web/WebNavigationType.h"
+#include "third_party/blink/public/web/WebViewModeEnums.h"
 #include "ipc_message_start_ewk.h"
 
 typedef std::map<std::string, std::string> StringMap;
@@ -55,7 +55,6 @@ IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params)
   IPC_STRUCT_TRAITS_MEMBER(linkTitle)
   IPC_STRUCT_TRAITS_MEMBER(linkLabel)
   IPC_STRUCT_TRAITS_MEMBER(imageURI)
-  IPC_STRUCT_TRAITS_MEMBER(mediaURI)
   IPC_STRUCT_TRAITS_MEMBER(isEditable)
   IPC_STRUCT_TRAITS_MEMBER(mode)
   IPC_STRUCT_TRAITS_MEMBER(nodeData)
@@ -265,6 +264,7 @@ IPC_SYNC_MESSAGE_CONTROL1_1(EwkHostMsg_DecideNavigationPolicy,
                             NavigationPolicyParams,
                             bool /*handled*/)
 
+// FIXME: error: ‘WebNavigationTypeOther’ is not a member of ‘blink’
 IPC_MESSAGE_ROUTED1(ViewMsg_SetViewMode,
                     blink::WebViewMode /* view_mode */)
 
index b1f427d055079fcd2ede4a6e145ae308d8a60cbe..43db755a06a0f70689f792f413b2a9a6a7534955 100644 (file)
@@ -124,7 +124,8 @@ std::string VersionInfo::ProductNameAndVersionForUserAgent() const {
   // if the browser supports the WebRTC feature.
   // TODO(max koo): Do we need to open our real version number
   // or just use Chrome/aa.bb.cc.dd as Chromium/Chrome do?
-  return std::string("Chrome/") + CHROMIUM_VERSION;
+  // TODO(suchit): Need to fix for chromium version in gn file
+  return std::string("Chrome/") /*+ CHROMIUM_VERSION*/;
 }
 
 std::string VersionInfo::DefaultUserAgent() const {
index 37c3b779f9b3092d7ad4605e118116b8459dee0d..dc0d580dda28af5664fefbe5d01ee3f4f15c5963 100644 (file)
@@ -44,6 +44,15 @@ WebContents* WebContentsFromFrameID(int render_process_id,
   return WebContents::FromRenderViewHost(render_view_host);
 }
 
+EWebView* WebViewFromFrameId(int render_process_id, int render_frame_id) {
+  content::WebContents* web_contents =
+      web_contents_utils::WebContentsFromFrameID(render_process_id,
+                                                 render_frame_id);
+  if (!web_contents)
+    return NULL;
+  return WebViewFromWebContents(web_contents);
+}
+
 EWebView* WebViewFromViewId(int render_process_id, int render_view_id) {
   content::WebContents* web_contents =
       web_contents_utils::WebContentsFromViewID(render_process_id,
@@ -73,4 +82,4 @@ bool MapsToHWBackKey(const char* keyname) {
   return strncmp(keyname, "Escape", 6) == 0;
 }
 
-} // namespace web_contents_utils
+}  // namespace web_contents_utils
index efc3b2aafab926756dcb39374ca15b151266e299..eb200e02819d1d7f6fb54eb15a1f2eb66809d8a3 100644 (file)
@@ -9,18 +9,18 @@ class EWebView;
 
 namespace content {
 class WebContents;
-} // namespace content
+}  // namespace content
 
 namespace web_contents_utils {
 content::WebContents* WebContentsFromViewID(int render_process_id,
                                             int render_view_id);
 content::WebContents* WebContentsFromFrameID(int render_process_id,
                                              int render_frame_id);
-EWebView* WebViewFromViewId(int render_process_id,
-                            int render_view_id);
+EWebView* WebViewFromFrameId(int render_process_id, int render_frame_id);
+EWebView* WebViewFromViewId(int render_process_id, int render_view_id);
 EWebView* WebViewFromWebContents(const content::WebContents*);
 bool MapsToHWBackKey(const char* keyname);
-} // namespace web_contents_utils
 
-#endif // WEB_CONTENTS_UTILS_H
+}  // namespace web_contents_utils
 
+#endif  // WEB_CONTENTS_UTILS_H
index 8cb7c6e2b07c30c69359cbbc0f630bc38e67c062..1f12f654997368f4b2f8a3fc4a5fc45caea680ca 100644 (file)
@@ -48,9 +48,9 @@ using content::BrowserThread;
 namespace content {
 
 ContentBrowserClientEfl::ContentBrowserClientEfl()
-  : browser_main_parts_efl_(nullptr)
+    : browser_main_parts_efl_(nullptr)
 #if defined(ENABLE_NOTIFICATIONS)
-  , notification_controller_(new NotificationControllerEfl)
+      , notification_controller_(new NotificationControllerEfl)
 #endif
 {
 }
@@ -61,40 +61,39 @@ BrowserMainParts* ContentBrowserClientEfl::CreateBrowserMainParts(
   return browser_main_parts_efl_;
 }
 
-void ContentBrowserClientEfl::AppendExtraCommandLineSwitches(base::CommandLine* command_line,
+void ContentBrowserClientEfl::AppendExtraCommandLineSwitches(
+    base::CommandLine* command_line,
     int child_process_id) {
   if (command_line->HasSwitch(switches::kProcessType)) {
-    std::string processType = command_line->
-        GetSwitchValueASCII(switches::kProcessType);
+    std::string processType =
+        command_line->GetSwitchValueASCII(switches::kProcessType);
     if (processType == switches::kRendererProcess) {
       if (content::RenderProcessHost* host =
               content::RenderProcessHost::FromID(child_process_id)) {
-        if (EWebContext* context = static_cast<BrowserContextEfl*>(
-                host->GetBrowserContext())->WebContext()) {
+        if (EWebContext* context =
+                static_cast<BrowserContextEfl*>(host->GetBrowserContext())
+                    ->WebContext()) {
           const std::string& injectedBundlePath =
               context->GetInjectedBundlePath();
           if (!injectedBundlePath.empty()) {
-            command_line->AppendSwitchASCII(
-                switches::kInjectedBundlePath, injectedBundlePath);
+            command_line->AppendSwitchASCII(switches::kInjectedBundlePath,
+                                            injectedBundlePath);
 
             const std::string& tizen_id = context->GetTizenId();
-            command_line->AppendSwitchASCII(
-                switches::kTizenId, tizen_id);
+            command_line->AppendSwitchASCII(switches::kTizenId, tizen_id);
 
             double scale = context->GetWidgetScale();
-            command_line->AppendSwitchASCII(
-                switches::kWidgetScale, base::DoubleToString(scale));
+            command_line->AppendSwitchASCII(switches::kWidgetScale,
+                                            base::DoubleToString(scale));
 
-            const std::string& widget_theme =
-                context->GetWidgetTheme();
-            command_line->AppendSwitchASCII(
-                switches::kWidgetTheme, widget_theme);
+            const std::string& widget_theme = context->GetWidgetTheme();
+            command_line->AppendSwitchASCII(switches::kWidgetTheme,
+                                            widget_theme);
 
             const std::string& widget_encoded_bundle =
                 context->GetWidgetEncodedBundle();
-            command_line->AppendSwitchASCII(
-                switches::kWidgetEncodedBundle,
-                widget_encoded_bundle);
+            command_line->AppendSwitchASCII(switches::kWidgetEncodedBundle,
+                                            widget_encoded_bundle);
           }
         }
       }
@@ -104,28 +103,29 @@ void ContentBrowserClientEfl::AppendExtraCommandLineSwitches(base::CommandLine*
 }
 
 bool ContentBrowserClientEfl::CanCreateWindow(
+    RenderFrameHost* opener,
     const GURL& opener_url,
     const GURL& opener_top_level_frame_url,
     const GURL& source_origin,
-    WindowContainerType container_type,
+    content::mojom::WindowContainerType container_type,
     const GURL& target_url,
     const Referrer& referrer,
+    const std::string& frame_name,
     WindowOpenDisposition disposition,
-    const blink::WebWindowFeatures& features,
+    const blink::mojom::WindowFeatures& features,
     bool user_gesture,
     bool opener_suppressed,
-    ResourceContext* context,
-    int render_process_id,
-    int opener_render_view_id,
-    int opener_render_frame_id,
     bool* no_javascript_access) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (!user_gesture) {
     *no_javascript_access = true;
-    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
-        &ContentBrowserClientEfl::DispatchPopupBlockedOnUIThread,
-        render_process_id, target_url));
+    BrowserThread::PostTask(
+        BrowserThread::UI, FROM_HERE,
+        base::Bind(&ContentBrowserClientEfl::DispatchPopupBlockedOnUIThread,
+                   render_process_id, target_url));
     return false;
   }
+#endif
 
   // TODO: shouldn't we call policy,decision,new,window smart callback here?
 
@@ -137,7 +137,8 @@ bool ContentBrowserClientEfl::CanCreateWindow(
 }
 
 void ContentBrowserClientEfl::DispatchPopupBlockedOnUIThread(
-    int render_process_id, const GURL &target_url) {
+    int render_process_id,
+    const GURL& target_url) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
   std::unique_ptr<RenderWidgetHostIterator> widgets(
@@ -160,9 +161,9 @@ void ContentBrowserClientEfl::DispatchPopupBlockedOnUIThread(
   if (!content)
     return;
 
-  EWebView *wv = WebViewFromWebContents(content);
-  wv->SmartCallback<EWebViewCallbacks::PopupBlocked>().
-      call(target_url.spec().c_str());
+  EWebViewwv = WebViewFromWebContents(content);
+  wv->SmartCallback<EWebViewCallbacks::PopupBlocked>().call(
+      target_url.spec().c_str());
 }
 
 void ContentBrowserClientEfl::ResourceDispatcherHostCreated() {
@@ -177,28 +178,35 @@ void ContentBrowserClientEfl::AllowCertificateError(
     const net::SSLInfo& ssl_info,
     const GURL& request_url,
     ResourceType resource_type,
-    bool overridable,
     bool strict_enforcement,
     bool expired_previous_decision,
-    const base::Callback<void(bool)>& callback,
-    CertificateRequestResultType* result) {
+    const base::Callback<void(CertificateRequestResultType)>& callback) {
   DCHECK(web_contents);
-  WebContentsDelegate * delegate = web_contents->GetDelegate();
+  WebContentsDelegate* delegate = web_contents->GetDelegate();
   if (!delegate) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+    // FIXME: EWK_BRINGUP definition should be removed.
     callback.Run(NULL);
+#endif  // !defined(EWK_BRINGUP)
     return;
   }
-  static_cast<content::WebContentsDelegateEfl*>(delegate)->
-     RequestCertificateConfirm(web_contents, cert_error, ssl_info, request_url,
-         resource_type, overridable, strict_enforcement, callback, result);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  static_cast<content::WebContentsDelegateEfl*>(delegate)
+      ->RequestCertificateConfirm(web_contents, cert_error, ssl_info,
+                                  request_url, resource_type, overridable,
+                                  strict_enforcement, callback);
+#endif  // !defined(EWK_BRINGUP)
 }
 
 #if defined(ENABLE_NOTIFICATIONS)
-PlatformNotificationService* ContentBrowserClientEfl::GetPlatformNotificationService() {
+PlatformNotificationService*
+ContentBrowserClientEfl::GetPlatformNotificationService() {
   return notification_controller_.get();
 }
 
-NotificationControllerEfl* ContentBrowserClientEfl::GetNotificationController() const {
+NotificationControllerEfl* ContentBrowserClientEfl::GetNotificationController()
+    const {
   return notification_controller_.get();
 }
 #endif
@@ -218,12 +226,8 @@ bool ContentBrowserClientEfl::AllowGetCookie(const GURL& url,
   if (!cookie_manager.get())
     return false;
 
-  return cookie_manager->AllowGetCookie(url,
-                                        first_party,
-                                        cookie_list,
-                                        context,
-                                        render_process_id,
-                                        render_frame_id);
+  return cookie_manager->AllowGetCookie(url, first_party, cookie_list, context,
+                                        render_process_id, render_frame_id);
 }
 
 bool ContentBrowserClientEfl::AllowSetCookie(
@@ -243,12 +247,8 @@ bool ContentBrowserClientEfl::AllowSetCookie(
   if (!cookie_manager.get())
     return false;
 
-  return cookie_manager->AllowSetCookie(url,
-                                        first_party,
-                                        cookie_line,
-                                        context,
-                                        render_process_id,
-                                        render_frame_id,
+  return cookie_manager->AllowSetCookie(url, first_party, cookie_line, context,
+                                        render_process_id, render_frame_id,
                                         options);
 }
 
@@ -290,28 +290,35 @@ void ContentBrowserClientEfl::SetCertificatePem(const net::SSLInfo& ssl_info,
     return;
 
   std::string pem_certificate;
-  if (!net::X509Certificate::GetPEMEncoded(
-          ssl_info.cert->os_cert_handle(), &pem_certificate))
+  if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->os_cert_handle(),
+                                           &pem_certificate))
     return;
 
-  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
-      &ContentBrowserClientEfl::SetCertificatePemOnUIThread,
-      render_process_id, render_view_id, pem_certificate));
+  BrowserThread::PostTask(
+      BrowserThread::UI, FROM_HERE,
+      base::Bind(&ContentBrowserClientEfl::SetCertificatePemOnUIThread,
+                 render_process_id, render_view_id, pem_certificate));
 }
 
 void ContentBrowserClientEfl::SetCertificatePemOnUIThread(
-    int render_process_id, int render_view_id, std::string certificate) {
-  WebContents* web_contents = WebContentsFromViewID(
-      render_process_id, render_view_id);
+    int render_process_id,
+    int render_view_id,
+    std::string certificate) {
+  WebContents* web_contents =
+      WebContentsFromViewID(render_process_id, render_view_id);
   if (!web_contents)
     return;
 
-  EWebView *wv = WebViewFromWebContents(web_contents);
+  EWebViewwv = WebViewFromWebContents(web_contents);
   wv->SetCertificatePem(certificate);
 }
 
-content::DevToolsManagerDelegate* ContentBrowserClientEfl::GetDevToolsManagerDelegate() {
+content::DevToolsManagerDelegate*
+ContentBrowserClientEfl::GetDevToolsManagerDelegate() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   return new DevToolsManagerDelegateEfl();
+#endif  // !defined(EWK_BRINGUP)
 }
 
 std::string ContentBrowserClientEfl::GetApplicationLocale() {
@@ -336,8 +343,8 @@ WebContentsViewDelegate* ContentBrowserClientEfl::GetWebContentsViewDelegate(
   return new WebContentsViewDelegateEwk(WebViewFromWebContents(web_contents));
 }
 
-QuotaPermissionContext* ContentBrowserClientEfl::CreateQuotaPermissionContext() {
+QuotaPermissionContext*
+ContentBrowserClientEfl::CreateQuotaPermissionContext() {
   return new QuotaPermissionContextEfl();
 }
-
 }
index 268c0816ff49b3186b96b5df3590fbc255285514..eb8f7fdf1bf2152a504b1d842e39a359aae2f202 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/content_browser_client.h"
+#include "third_party/blink/public/web/WebWindowFeatures.h"
 
 namespace base {
 class CommandLine;
@@ -23,7 +24,7 @@ class ResourceDispatcherHostDelegateEfl;
 class WebContents;
 class WebContentsView;
 
-class ContentBrowserClientEfl: public ContentBrowserClient {
+class ContentBrowserClientEfl : public ContentBrowserClient {
  public:
   typedef void (*Notification_Show_Callback)(Ewk_Notification*, void*);
   typedef void (*Notification_Cancel_Callback)(uint64_t, void*);
@@ -38,20 +39,18 @@ class ContentBrowserClientEfl: public ContentBrowserClient {
   virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
                                               int child_process_id) override;
 
-  bool CanCreateWindow(const GURL& opener_url,
+  bool CanCreateWindow(RenderFrameHost* opener,
+                       const GURL& opener_url,
                        const GURL& opener_top_level_frame_url,
                        const GURL& source_origin,
-                       WindowContainerType container_type,
+                       content::mojom::WindowContainerType container_type,
                        const GURL& target_url,
                        const Referrer& referrer,
+                       const std::string& frame_name,
                        WindowOpenDisposition disposition,
-                       const blink::WebWindowFeatures& features,
+                       const blink::mojom::WindowFeatures& features,
                        bool user_gesture,
                        bool opener_suppressed,
-                       ResourceContext* context,
-                       int render_process_id,
-                       int opener_render_view_id,
-                       int opener_render_frame_id,
                        bool* no_javascript_access) override;
 
   virtual void ResourceDispatcherHostCreated() override;
@@ -64,14 +63,14 @@ class ContentBrowserClientEfl: public ContentBrowserClient {
       const net::SSLInfo& ssl_info,
       const GURL& request_url,
       ResourceType resource_type,
-      bool overridable,
       bool strict_enforcement,
       bool expired_previous_decision,
-      const base::Callback<void(bool)>& callback,
-      CertificateRequestResultType* result) override;
+      const base::Callback<void(CertificateRequestResultType)>& callback)
+      override;
 
 #if defined(ENABLE_NOTIFICATIONS)
-  virtual PlatformNotificationService* GetPlatformNotificationService() override;
+  virtual PlatformNotificationService* GetPlatformNotificationService()
+      override;
 
   NotificationControllerEfl* GetNotificationController() const;
 #endif
@@ -94,7 +93,8 @@ class ContentBrowserClientEfl: public ContentBrowserClient {
   virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
                                    content::WebPreferences* prefs) override;
 
-  virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
+  virtual void RenderProcessWillLaunch(
+      content::RenderProcessHost* host) override;
 
   virtual void SetCertificatePem(const net::SSLInfo& ssl_info,
                                  int render_process_id,
@@ -109,11 +109,13 @@ class ContentBrowserClientEfl: public ContentBrowserClient {
 
  private:
   static void SetCertificatePemOnUIThread(int render_process_id,
-      int render_view_id, std::string certificate);
+                                          int render_view_id,
+                                          std::string certificate);
   static void DispatchPopupBlockedOnUIThread(int render_process_id,
-                                             const GURL &target_url);
+                                             const GURLtarget_url);
 
-  std::unique_ptr<ResourceDispatcherHostDelegateEfl> resource_disp_host_del_efl_;
+  std::unique_ptr<ResourceDispatcherHostDelegateEfl>
+      resource_disp_host_del_efl_;
   BrowserMainPartsEfl* browser_main_parts_efl_;
 #if defined(ENABLE_NOTIFICATIONS)
   std::unique_ptr<NotificationControllerEfl> notification_controller_;
@@ -121,7 +123,6 @@ class ContentBrowserClientEfl: public ContentBrowserClient {
 
   DISALLOW_COPY_AND_ASSIGN(ContentBrowserClientEfl);
 };
-
 }
 
-#endif // CONTENT_BROWSER_CLIENT_EFL
+#endif  // CONTENT_BROWSER_CLIENT_EFL
index 9b86696c20fc252a3fdc27310ac85878143311ed..f071716e5bbb165d473d6dfd3048032ef07b1ba6 100644 (file)
@@ -7,6 +7,7 @@
 #include "base/path_service.h"
 #include "browser/resource_dispatcher_host_delegate_efl.h"
 #include "command_line_efl.h"
+#include "content/browser/gpu/gpu_main_thread_factory.h"
 #include "content/browser/gpu/gpu_process_host.h"
 #include "content/common/paths_efl.h"
 #include "content/gpu/in_process_gpu_thread.h"
@@ -80,7 +81,7 @@ void ContentMainDelegateEfl::PreSandboxStartupBrowser() {
       switches::kBrowserSubprocessPath, base::FilePath(SubProcessPath()));
 
   // needed for gpu thread
-  GpuProcessHost::RegisterGpuMainThreadFactory(CreateInProcessGpuThread);
+  content::RegisterGpuMainThreadFactory(CreateInProcessGpuThread);
 }
 
 void ContentMainDelegateEfl::PreSandboxStartup() {
index 06b5160c954b4e9510cc79060b19d17abe2a36c2..b6aa001fce6e990ed1a7964036aa1369edb23e68 100644 (file)
@@ -19,8 +19,9 @@
 #include "content/public/browser/navigation_entry.h"
 #include "eweb_view.h"
 #include "net/base/filename_util.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
 #include "content/common/paths_efl.h"
-#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
+#include "third_party/blink/public/platform/WebReferrerPolicy.h"
 #include "ui/base/clipboard/clipboard.h"
 #include "private/ewk_context_menu_private.h"
 
@@ -129,12 +130,12 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
     AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_PASTE,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_PASTE")));
   }
-  if (params_.media_type != blink::WebContextMenuData::MediaTypeImage &&
+  if (params_.media_type != blink::WebContextMenuData::kMediaTypeImage &&
       !params_.selection_text.empty() && params_.is_editable) {
     AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_CUT,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CUT_ABB")));
   }
-  if (params_.media_type != blink::WebContextMenuData::MediaTypeImage &&
+  if (params_.media_type != blink::WebContextMenuData::kMediaTypeImage &&
       !params_.selection_text.empty()) {
     AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_COPY,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_COPY")));
@@ -181,7 +182,7 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
   }
 
   RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(web_contents_.GetRenderWidgetHostView());
-  if ((params_.media_type != blink::WebContextMenuData::MediaTypeImage &&
+  if ((params_.media_type != blink::WebContextMenuData::kMediaTypeImage &&
       !params_.selection_text.empty()) ||
       (params_.is_editable && (rwhv && !rwhv->IsLastAvailableTextEmpty()))) {
     AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_SELECT_WORD,
@@ -189,7 +190,7 @@ void ContextMenuControllerEfl::GetProposedContextMenu() {
     AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_SELECT_ALL,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB")));
   }
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (params_.is_draggable) {
     AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_DRAG,
         std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_DRAG_AND_DROP")));
@@ -514,7 +515,6 @@ void ContextMenuControllerEfl::OnDiskDownload(
   if (!item) {
     save_fail_dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(
         &web_contents_,
-        GURL(),
         JavaScriptModalDialogEfl::ALERT,
         base::UTF8ToUTF16(std::string(dgettext("WebKit", "IDS_WEBVIEW_POP_FAIL"))),
         base::string16(),
@@ -541,7 +541,6 @@ void ContextMenuControllerEfl::OnDownloadUpdated(content::DownloadItem* download
     if (disk_download_items_.find(download) != disk_download_items_.end()) {
       file_saved_dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(
           &web_contents_,
-          GURL(),
           JavaScriptModalDialogEfl::ALERT,
           base::UTF8ToUTF16(std::string(dgettext("WebKit", "IDS_WEBVIEW_POP_SAVED"))),
           base::string16(),
@@ -562,10 +561,10 @@ base::FilePath ContextMenuControllerEfl::DownloadFile(const GURL url,
       web_contents_.GetBrowserContext());
 
   std::unique_ptr<DownloadUrlParameters> dl_params(
-      DownloadUrlParameters::CreateForWebContentsMainFrame(&web_contents_, url));
+      DownloadUrlParameters::CreateForWebContentsMainFrame(&web_contents_, url, NO_TRAFFIC_ANNOTATION_YET));
   dl_params->set_post_id(-1);
   dl_params->set_referrer(
-      content::Referrer(referrer, blink::WebReferrerPolicyAlways));
+      content::Referrer(referrer, blink::kWebReferrerPolicyAlways));
   dl_params->set_referrer_encoding("utf8");
   base::FilePath fileName = net::GenerateFileName(url,"","","","","");
   base::FilePath fullPath = outputDir.Append(fileName);
@@ -613,7 +612,7 @@ void ContextMenuControllerEfl::OpenURL(
   content::OpenURLParams params(url,
                                 content::Referrer(
                                     web_contents_.GetVisibleURL(),
-                                    blink::WebReferrerPolicyAlways),
+                                    blink::kWebReferrerPolicyAlways),
                                 -1, /* -1 to indicate the main frame */
                                 disposition,
                                 ui::PAGE_TRANSITION_LINK,
@@ -786,11 +785,11 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
   switch(menu_item->GetContextMenuOption())
   {
     case EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK: {
-      OpenURL(GURL(params_.link_url.spec()), CURRENT_TAB);
+      OpenURL(GURL(params_.link_url.spec()), WindowOpenDisposition::CURRENT_TAB);
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW: {
-      OpenURL(GURL(params_.link_url.spec()), NEW_FOREGROUND_TAB);
+      OpenURL(GURL(params_.link_url.spec()), WindowOpenDisposition::NEW_FOREGROUND_TAB);
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_SHARE_LINK: {
@@ -846,7 +845,7 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_COPY_LINK_DATA: {
-      ClipboardHelperEfl::GetInstance()->SetData(UTF16ToUTF8(params_.link_text),
+      ClipboardHelperEfl::GetInstance()->SetData(base::UTF16ToUTF8(params_.link_text),
           ClipboardHelperEfl::CLIPBOARD_DATA_TYPE_URL);
       break;
     }
@@ -884,11 +883,11 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_OPEN_IMAGE_IN_CURRENT_WINDOW: {
-      OpenURL(GURL(params_.src_url.spec()), CURRENT_TAB);
+      OpenURL(GURL(params_.src_url.spec()), WindowOpenDisposition::CURRENT_TAB);
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_OPEN_IMAGE_IN_NEW_WINDOW: {
-      OpenURL(GURL(params_.src_url.spec()), NEW_FOREGROUND_TAB);
+      OpenURL(GURL(params_.src_url.spec()), WindowOpenDisposition::NEW_FOREGROUND_TAB);
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_SELECT_WORD: {
@@ -923,7 +922,7 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
       break;
     }
     case EWK_CONTEXT_MENU_ITEM_TAG_DRAG: {
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
       RenderViewHost* rvh = web_contents_.GetRenderViewHost();
       rvh->StartDragging();
       context_menu_show_pos_.SetPoint(params_.x, params_.y);
index a8d3811733202ef18336f4e87dd4d096ebb33ff1..a450046e4b43c1b81ee34961cf9e3f61b57d518b 100644 (file)
@@ -12,7 +12,6 @@
 #include "base/synchronization/waitable_event.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/browser/storage_partition_impl.h"
-#include "browser/scoped_allow_wait_for_legacy_web_view_api.h"
 #include "eweb_context.h"
 #include "net/base/net_errors.h"
 #include "net/base/static_cookie_policy.h"
@@ -25,6 +24,8 @@
 #include "net/url_request/url_request_context_getter.h"
 #include "url/gurl.h"
 
+#include "net/cookies/cookie_store_test_callbacks.h"
+
 #include <Eina.h>
 
 using content::BrowserThread;
@@ -88,8 +89,15 @@ void CookieManager::DeleteSessionCookiesOnIOThread() {
   DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
 
   std::unique_ptr<net::CookieStore> cookie_store = GetCookieStore();
-  if (cookie_store.get())
-    cookie_store->DeleteSessionCookiesAsync(base::Callback<void(int)>());
+  
+  // FIXME: EWK_BRINGUP: Check it.
+  if (cookie_store.get()) {
+    net::ResultSavingCookieCallback<uint32_t> callback;
+    cookie_store->DeleteSessionCookiesAsync(
+        base::Bind(&net::ResultSavingCookieCallback<uint32_t>::Run,
+                   base::Unretained(&callback)));
+    callback.WaitUntilDone();
+  }
 }
 
 static void DeleteCookiesOnIOThread(std::unique_ptr<net::CookieStore> cookie_store,
@@ -237,14 +245,7 @@ bool CookieManager::AllowCookies(const GURL& url,
 
   if (ShouldBlockThirdPartyCookies()) {
     net::StaticCookiePolicy policy(net::StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES);
-    int rv;
-    if (setting_cookie)
-      rv = policy.CanSetCookie(url, first_party_url);
-    else
-      rv = policy.CanGetCookies(url, first_party_url);
-
-    if (net::OK == rv)
-      return true;
+    return (policy.CanAccessCookies(url, first_party_url) == net::OK);
   }
 
   return false;
@@ -252,13 +253,13 @@ bool CookieManager::AllowCookies(const GURL& url,
 
 bool CookieManager::OnCanGetCookies(const net::URLRequest& request,
                                     const net::CookieList& cookie_list) {
-  return AllowCookies(request.url(), request.first_party_for_cookies(), false);
+  return AllowCookies(request.url(), request.site_for_cookies(), false);
 }
 
 bool CookieManager::OnCanSetCookie(const net::URLRequest& request,
                                    const std::string& cookie_line,
                                    net::CookieOptions* options) {
-  return AllowCookies(request.url(), request.first_party_for_cookies(), true);
+  return AllowCookies(request.url(), request.site_for_cookies(), true);
 }
 
 bool CookieManager::AllowGetCookie(const GURL& url,
@@ -323,7 +324,6 @@ std::string CookieManager::GetCookiesForURL(const std::string& url) {
                                      base::Passed(std::move(cookie_store)),
                                      GURL(url), &cookie_value, &completion));
   // allow wait temporarily.
-  ScopedAllowWaitForLegacyWebViewApi allow_wait;
   completion.Wait();
   return cookie_value;
 }
index e80b3a8d5b03f8528d0acad1e2e469e4a4114a4c..5bfac6f4ae11ec3585965489dbde9cc06c053b9f 100644 (file)
@@ -6,6 +6,9 @@
 
 #include <vector>
 
+#include <stdlib.h>
+#include <time.h>
+#include <unistd.h>
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "common/version_info.h"
-#include "components/devtools_discovery/devtools_target_descriptor.h"
-#include "components/devtools_http_handler/devtools_http_handler.h"
+#include "content/browser/devtools/devtools_http_handler.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/devtools_agent_host.h"
 #include "content/public/browser/devtools_frontend_host.h"
+#include "content/public/browser/devtools_socket_factory.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/url_constants.h"
 #include "content/public/common/user_agent.h"
 #include "content/shell/browser/shell.h"
-#include "grit/shell_resources.h"
-#include "grit/devtools_resources.h"
+#include "content/browser/devtools/grit/devtools_resources.h"
+#include "content/shell/grit/shell_resources.h"
 #include "net/base/net_errors.h"
 #include "net/socket/tcp_server_socket.h"
-#include "net/base/net_errors.h"
 #include "ui/base/resource/resource_bundle.h"
-#include <stdlib.h>
-#include <time.h>
-#include <unistd.h>
 
 using content::BrowserThread;
-using devtools_http_handler::DevToolsHttpHandler;
+using content::DevToolsHttpHandler;
 
 namespace {
 
@@ -46,17 +45,15 @@ const uint16_t kMinTetheringPort = 9333;
 const uint16_t kMaxTetheringPort = 9444;
 const int kBackLog = 10;
 
-class TCPServerSocketFactory
-    : public DevToolsHttpHandler::ServerSocketFactory {
+class TCPServerSocketFactory : public content::DevToolsSocketFactory {
  public:
   TCPServerSocketFactory(const std::string& address, uint16_t port)
-      : address_(address),
-        port_(port) {}
+      : address_(address), port_(port) {}
 
  private:
   std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
     std::unique_ptr<net::ServerSocket> socket(
-        new net::TCPServerSocket(nullptr, net::NetLog::Source()));
+        new net::TCPServerSocket(nullptr, net::NetLogSource()));
     if (socket->ListenWithAddressAndPort(address_, port_, kBackLog) != net::OK)
       return std::unique_ptr<net::ServerSocket>();
 
@@ -69,27 +66,27 @@ class TCPServerSocketFactory
 
 }  // namespace
 
-
-namespace devtools_http_handler {
+namespace content {
 
 DevToolsDelegateEfl::DevToolsDelegateEfl(int port)
-    : port_(0)
-    , browser_context_(NULL) {
+    : port_(0), browser_context_(NULL) {
   // It's a hacky way to early detected if port is available. The problem is
   // that the only thing we can do after checking is hope that noone will take
   // the port until it's initialized on IO thread again. The best approach would
   // be creating async callbacks that would inform when inspector server started
   // and on which port.
   static std::string addr = "0.0.0.0";
-  std::unique_ptr<net::ServerSocket> sock(new net::TCPServerSocket(NULL, net::NetLog::Source()));
+  std::unique_ptr<net::ServerSocket> sock(
+      new net::TCPServerSocket(NULL, net::NetLogSource()));
 
-  const base::CommandLine* const command_line = base::CommandLine::ForCurrentProcess();
+  const base::CommandLine* const command_line =
+      base::CommandLine::ForCurrentProcess();
   // See if the user specified a port on the command line (useful for
   // automation). If not, use an ephemeral port by specifying 0.
   if (!port && command_line->HasSwitch(switches::kRemoteDebuggingPort)) {
     int temp_port = 0;
     std::string port_str =
-    command_line->GetSwitchValueASCII(switches::kRemoteDebuggingPort);
+        command_line->GetSwitchValueASCII(switches::kRemoteDebuggingPort);
     base::StringToInt(port_str, &temp_port);
     if (temp_port > 0 && temp_port < 65535) {
       port = temp_port;
@@ -108,18 +105,21 @@ DevToolsDelegateEfl::DevToolsDelegateEfl(int port)
   sock->GetLocalAddress(&givenIp);
   port_ = givenIp.port();
 
-  std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  std::unique_ptr<content::DevToolsSocketFactory> factory(
       new TCPServerSocketFactory(addr, port_));
 
-  devtools_http_handler_.reset(new devtools_http_handler::DevToolsHttpHandler(
+  devtools_http_handler_.reset(new content::DevToolsHttpHandler(
       std::move(factory), std::string(), this, base::FilePath(),
-      base::FilePath(), EflWebView::VersionInfo::GetInstance()
-                            ->ProductNameAndVersionForUserAgent(),
+      base::FilePath(),
+      EflWebView::VersionInfo::GetInstance()
+          ->ProductNameAndVersionForUserAgent(),
       EflWebView::VersionInfo::GetInstance()->DefaultUserAgent()));
+#endif  // !defined(EWK_BRINGUP)
 }
 
-DevToolsDelegateEfl::~DevToolsDelegateEfl() {
-}
+DevToolsDelegateEfl::~DevToolsDelegateEfl() {}
 
 void DevToolsDelegateEfl::Stop() {
   if (devtools_http_handler_) {
@@ -131,21 +131,13 @@ void DevToolsDelegateEfl::Stop() {
 }
 
 std::string DevToolsDelegateEfl::GetDiscoveryPageHTML() {
-  return ResourceBundle::GetSharedInstance().GetRawDataResource(
-      IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string();
+  return ResourceBundle::GetSharedInstance()
+      .GetRawDataResource(IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE)
+      .as_string();
 }
 
 std::string DevToolsDelegateEfl::GetFrontendResource(const std::string& path) {
   return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
 }
 
-std::string DevToolsDelegateEfl::GetPageThumbnailData(const GURL& url) {
-  return std::string();
-}
-
-content::DevToolsExternalAgentProxyDelegate*
-DevToolsDelegateEfl::HandleWebSocketConnection(const std::string& path) {
-  return nullptr;
-}
-
 }  // namespace content
index 82343b5c348573808aad129fcc201c4b4afa583c..c282c54d429f4e52c236516db57dcd56241f8c92 100644 (file)
@@ -5,22 +5,19 @@
 #ifndef DEVTOOLS_DELEGATE_EFL_H_
 #define DEVTOOLS_DELEGATE_EFL_H_
 
-
 #include "base/compiler_specific.h"
-#include "components/devtools_http_handler/devtools_http_handler_delegate.h"
+#include "content/browser/devtools/devtools_http_handler.h"
+#include "content/public/browser/devtools_manager_delegate.h"
 
 namespace content {
-class BrowserContext;
-}
-
-namespace devtools_http_handler {
 
+class BrowserContext;
 class DevToolsHttpHandler;
 
 // This class is to create RemoteInspector Server(Remote Debugger) and return devtools front resources.
 // This class implements DevToolsHttpHandlerDelegate interface.
 // This class is similar to ShellDevToolsDelegate, which also implements DevToolsHttpHandlerDelegate interface.
-class DevToolsDelegateEfl : public DevToolsHttpHandlerDelegate {
+class DevToolsDelegateEfl : public DevToolsManagerDelegate {
  public:
   // explicit ChromiumEflDevToolsDelegate();
   explicit DevToolsDelegateEfl(int = 0);
@@ -32,13 +29,6 @@ class DevToolsDelegateEfl : public DevToolsHttpHandlerDelegate {
   // ChromiumDevToolsHttpHandler::Delegate overrides.
   virtual std::string GetDiscoveryPageHTML() override;
   virtual std::string GetFrontendResource(const std::string& path) override;
-  virtual std::string GetPageThumbnailData(const GURL& url) override;
-
-  // Allows embedder to handle custom websocket-based protocol connection
-  // pointing remote debugging port. Returns ownership.
-  virtual content::DevToolsExternalAgentProxyDelegate*
-      HandleWebSocketConnection(const std::string& path) override;
-
 
   DevToolsHttpHandler* devtools_http_handler() {
     return devtools_http_handler_.get();
index d64965271c0a1e6ca70033cea891245d2bcc8d62..5a16bfe24d766aab87e3b5a3a9a40cda3cddb438 100644 (file)
@@ -15,12 +15,12 @@ using content::DevToolsAgentHost;
 using content::WebContents;
 using content::RenderViewHost;
 
+#if 0
 namespace {
 
 const char kTargetTypePage[] = "page";
 const char kTargetTypeServiceWorker[] = "service_worker";
 const char kTargetTypeOther[] = "other";
-
 class Target : public devtools_discovery::DevToolsTargetDescriptor {
  public:
 
@@ -93,8 +93,8 @@ bool Target::Close() const {
   web_contents->ClosePage();
   return true;
 }
-
 }
+#endif
 
 namespace content {
 
@@ -104,10 +104,11 @@ DevToolsManagerDelegateEfl::DevToolsManagerDelegateEfl() {
 DevToolsManagerDelegateEfl::~DevToolsManagerDelegateEfl() {
 }
 
-base::DictionaryValue* DevToolsManagerDelegateEfl::HandleCommand(
+bool DevToolsManagerDelegateEfl::HandleCommand(
     content::DevToolsAgentHost* agent_host,
+    int session_id,
     base::DictionaryValue* command_dict) {
-  return NULL;
+  return false;
 }
 
 }  // namespace content
index 91a31f103e0af9ebff8c7b2ec4c31659dc73624f..622d02096aa5d204a6c87bf690f08ca9f05b0eb4 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef DEVTOOLS_MANAGER_DELEGATE_EFL_H_
 #define DEVTOOLS_MANAGER_DELEGATE_EFL_H_
 
-#include "components/devtools_discovery/devtools_target_descriptor.h"
 #include "content/public/browser/devtools_manager_delegate.h"
 
 namespace content {
@@ -16,13 +15,10 @@ class DevToolsManagerDelegateEfl : public DevToolsManagerDelegate {
   virtual ~DevToolsManagerDelegateEfl();
 
   // content::DevToolsManagerDelegate implementation.
-  virtual void Inspect(content::BrowserContext* browser_context,
-                       content::DevToolsAgentHost* agent_host) override {};
-  virtual void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
-                                         bool attached) override {};
-  virtual base::DictionaryValue* HandleCommand(
-      content::DevToolsAgentHost* agent_host,
-      base::DictionaryValue* command_dict) override;
+  virtual void Inspect(content::DevToolsAgentHost* agent_host) override{};
+  virtual bool HandleCommand(DevToolsAgentHost* agent_host,
+                             int session_id,
+                             base::DictionaryValue* command) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(DevToolsManagerDelegateEfl);
index 0a37d6015c1ac784f7b4279476bcf11268c21f4d..270ab48b8604524b214422001d3f049abb33c95c 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "base/synchronization/waitable_event.h"
 #include "components/autofill/content/browser/content_autofill_driver.h"
-#include "content/browser/memory/memory_pressure_controller_impl.h"
+//#include "content/browser/memory/memory_pressure_controller_impl.h"
 #include "content/public/browser/appcache_service.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
@@ -55,16 +55,19 @@ namespace {
 /**
  * @brief Helper class for obtaining WebStorage origins
  */
-class WebStorageGetAllOriginsDispatcher: public base::RefCountedThreadSafe<WebStorageGetAllOriginsDispatcher> {
-public:
-  WebStorageGetAllOriginsDispatcher(Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data)
-    : callback_(callback)
-    , user_data_(user_data) {
+class WebStorageGetAllOriginsDispatcher
+    : public base::RefCountedThreadSafe<WebStorageGetAllOriginsDispatcher> {
+ public:
+  WebStorageGetAllOriginsDispatcher(
+      Ewk_Web_Storage_Origins_Get_Callback callback,
+      void* user_data)
+      : callback_(callback), user_data_(user_data) {
     DCHECK(callback_);
     DCHECK(user_data_);
   }
 
-  void Dispatch(const std::vector<content::LocalStorageUsageInfo> &local_storage) {
+  void Dispatch(
+      const std::vector<content::LocalStorageUsageInfo>& local_storage) {
     DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
     Eina_List* lorigins = NULL;
@@ -79,14 +82,15 @@ public:
     callback_(lorigins, user_data_);
   }
 
-private:
+ private:
   Ewk_Web_Storage_Origins_Get_Callback callback_;
   void* user_data_;
 };
 
-void SetProxyConfigCallbackOnIOThread(base::WaitableEvent* done,
-                            net::URLRequestContextGetter* url_request_context_getter,
-                            const net::ProxyConfig& proxy_config) {
+void SetProxyConfigCallbackOnIOThread(
+    base::WaitableEvent* done,
+    net::URLRequestContextGetter* url_request_context_getter,
+    const net::ProxyConfig& proxy_config) {
   net::ProxyService* proxy_service =
       url_request_context_getter->GetURLRequestContext()->proxy_service();
   proxy_service->ResetConfigService(
@@ -94,14 +98,15 @@ void SetProxyConfigCallbackOnIOThread(base::WaitableEvent* done,
   done->Signal();
 }
 
-void OnOriginsWithApplicationCacheObtained(Ewk_Web_Application_Cache_Origins_Get_Callback callback,
-                                           void* user_data,
-                                           scoped_refptr<content::AppCacheInfoCollection> collection,
-                                           int result) {
+void OnOriginsWithApplicationCacheObtained(
+    Ewk_Web_Application_Cache_Origins_Get_Callback callback,
+    void* user_data,
+    scoped_refptr<content::AppCacheInfoCollection> collection,
+    int result) {
   Eina_List* origins = 0;
-  for (map<GURL, content::AppCacheInfoVector>::iterator iter = collection->infos_by_origin.begin();
-      iter != collection->infos_by_origin.end();
-      ++iter) {
+  for (map<GURL, content::AppCacheInfoVector>::iterator iter =
+           collection->infos_by_origin.begin();
+       iter != collection->infos_by_origin.end(); ++iter) {
     _Ewk_Security_Origin* origin = new _Ewk_Security_Origin(iter->first);
     origins = eina_list_append(origins, origin);
   }
@@ -119,24 +124,20 @@ void OnTemporaryUsageAndQuotaObtained(
     // We still trigger callback.
     usage = 0;
   }
-  BrowserThread::PostTask(BrowserThread::UI,
-                          FROM_HERE,
+  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
                           base::Bind(callback, usage, user_data));
 }
 
-void OnGetWebDBOrigins(
-    Ewk_Web_Database_Origins_Get_Callback callback,
-    void* user_data,
-    const std::set<GURL>& origins_ref) {
+void OnGetWebDBOrigins(Ewk_Web_Database_Origins_Get_Callback callback,
+                       void* user_data,
+                       const std::set<GURL>& origins_ref) {
   Eina_List* origins = 0;
-  for (std::set<GURL>::iterator iter =
-         origins_ref.begin();
-         iter != origins_ref.end(); ++iter) {
-      _Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
-      origins = eina_list_append(origins, sec_origin);
+  for (std::set<GURL>::iterator iter = origins_ref.begin();
+       iter != origins_ref.end(); ++iter) {
+    _Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
+    origins = eina_list_append(origins, sec_origin);
   }
-  BrowserThread::PostTask(BrowserThread::UI,
-                          FROM_HERE,
+  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
                           base::Bind(callback, origins, user_data));
 }
 
@@ -144,44 +145,45 @@ void GetWebDBOriginsOnDBThread(Ewk_Web_Database_Origins_Get_Callback callback,
                                void* user_data,
                                content::StoragePartition* partition) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
-  storage::DatabaseQuotaClient client(
-      base::ThreadTaskRunnerHandle::Get().get(),
-      partition->GetDatabaseTracker());
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  storage::DatabaseQuotaClient client(partition->GetDatabaseTracker());
   client.GetOriginsForType(storage::kStorageTypeTemporary,
                            base::Bind(&OnGetWebDBOrigins, callback, user_data));
+#endif
 }
 
-void OnGetFileSystemOrigins(
-    Ewk_Local_File_System_Origins_Get_Callback callback,
-    void* user_data,
-    const std::set<GURL>& origins_ref) {
+void OnGetFileSystemOrigins(Ewk_Local_File_System_Origins_Get_Callback callback,
+                            void* user_data,
+                            const std::set<GURL>& origins_ref) {
   Eina_List* origins = 0;
-  for (std::set<GURL>::iterator iter =
-         origins_ref.begin();
-         iter != origins_ref.end(); ++iter) {
-      _Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
-      origins = eina_list_append(origins, sec_origin);
+  for (std::set<GURL>::iterator iter = origins_ref.begin();
+       iter != origins_ref.end(); ++iter) {
+    _Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
+    origins = eina_list_append(origins, sec_origin);
   }
-  BrowserThread::PostTask(BrowserThread::UI,
-                          FROM_HERE,
+  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
                           base::Bind(callback, origins, user_data));
 }
 
-void GetFileSystemOriginsOnFILEThread(Ewk_Web_Database_Origins_Get_Callback callback,
-                                    void* user_data,
-                                    content::StoragePartition* partition) {
+void GetFileSystemOriginsOnFILEThread(
+    Ewk_Web_Database_Origins_Get_Callback callback,
+    void* user_data,
+    content::StoragePartition* partition) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
-  std::unique_ptr<storage::FileSystemQuotaClient> client( new storage::FileSystemQuotaClient(partition->GetFileSystemContext(), false));
+  std::unique_ptr<storage::FileSystemQuotaClient> client(
+      new storage::FileSystemQuotaClient(partition->GetFileSystemContext(),
+                                         false));
 
-  client->GetOriginsForType(storage::kStorageTypeTemporary,
-                            base::Bind(&OnGetFileSystemOrigins, callback, user_data));
+  client->GetOriginsForType(
+      storage::kStorageTypeTemporary,
+      base::Bind(&OnGetFileSystemOrigins, callback, user_data));
 }
 
-} // namespace
+}  // namespace
 
 void EwkDidStartDownloadCallback::TriggerCallback(const string& url) {
-  if(callback_)
-    (*callback_)(url.c_str(),user_data_);
+  if (callback_)
+    (*callback_)(url.c_str(), user_data_);
 }
 
 bool EwkMimeOverrideCallback::TriggerCallback(const std::string& url_spec,
@@ -194,7 +196,10 @@ bool EwkMimeOverrideCallback::TriggerCallback(const std::string& url_spec,
   return result;
 }
 
-void EWebContext::SendWidgetInfo(const std::string& tizen_id, double scale, const string &theme, const string &encoded_bundle) {
+void EWebContext::SendWidgetInfo(const std::string& tizen_id,
+                                 double scale,
+                                 const string& theme,
+                                 const string& encoded_bundle) {
   tizen_id_ = tizen_id;
   widget_scale_ = scale;
   widget_theme_ = theme;
@@ -206,9 +211,10 @@ void EWebContext::SendWrtMessage(const Ewk_Wrt_Message_Data& data) {
 }
 
 void EWebContext::SetMimeOverrideCallback(
-    Ewk_Context_Override_Mime_For_Url_Callback callback, void* user_data) {
-  mime_override_callback_.reset(new EwkMimeOverrideCallback(callback,
-                                                            user_data));
+    Ewk_Context_Override_Mime_For_Url_Callback callback,
+    void* user_data) {
+  mime_override_callback_.reset(
+      new EwkMimeOverrideCallback(callback, user_data));
 }
 
 bool EWebContext::OverrideMimeForURL(const std::string& url_spec,
@@ -216,7 +222,7 @@ bool EWebContext::OverrideMimeForURL(const std::string& url_spec,
                                      std::string& new_mime_type) const {
   if (!mime_override_callback_)
     return false;
-  char *new_mime_type_string = NULL;
+  charnew_mime_type_string = NULL;
   bool overridden = mime_override_callback_->TriggerCallback(
       url_spec, mime_type, &new_mime_type_string);
   if (overridden) {
@@ -229,12 +235,10 @@ bool EWebContext::OverrideMimeForURL(const std::string& url_spec,
 }
 
 EWebContext::EWebContext(bool incognito)
-    : EWebContext(incognito, std::string()) {
-}
+    : EWebContext(incognito, std::string()) {}
 
 EWebContext::EWebContext(const std::string& injectedBundlePath)
-    : EWebContext(false, injectedBundlePath) {
-}
+    : EWebContext(false, injectedBundlePath) {}
 
 EWebContext::EWebContext(bool incognito, const std::string& injectedBundlePath)
     : injected_bundle_path_(injectedBundlePath),
@@ -254,7 +258,8 @@ EWebContext::EWebContext(bool incognito, const std::string& injectedBundlePath)
   // there are ewk_cookie_manager APIs that can be called before a
   // WebView instance is created. In such circumstances, APIs including
   // ewk_cookie_manager_persistent_storage_set fail to execute.
-  BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext();
+  BrowserContext::GetDefaultStoragePartition(browser_context())
+      ->GetURLRequestContext();
 
   // Notification Service gets init in BrowserMainRunner init,
   // so cache manager can register for notifications only after that.
@@ -265,13 +270,13 @@ EWebContext::EWebContext(bool incognito, const std::string& injectedBundlePath)
   tizen_extensible_.reset(TizenExtensible::create());
 }
 
-EWebContext::~EWebContext() {
-}
+EWebContext::~EWebContext() {}
 
 void EWebContext::ClearNetworkCache() {
-  BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
+  BrowsingDataRemoverEfl* remover =
+      BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
   remover->ClearNetworkCache();
-  //remover deletes itself once it is done with clearing operation.
+  // remover deletes itself once it is done with clearing operation.
   return;
 }
 
@@ -290,11 +295,14 @@ Ewk_Cache_Model EWebContext::GetCacheModel() const {
 }
 
 void EWebContext::SetNetworkCacheEnable(bool enable) {
-  net::URLRequestContextGetter* url_context = BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext();
+  net::URLRequestContextGetter* url_context =
+      BrowserContext::GetDefaultStoragePartition(browser_context())
+          ->GetURLRequestContext();
   if (!url_context)
     return;
 
-  net::HttpTransactionFactory* transaction_factory = url_context->GetURLRequestContext()->http_transaction_factory();
+  net::HttpTransactionFactory* transaction_factory =
+      url_context->GetURLRequestContext()->http_transaction_factory();
   if (!transaction_factory)
     return;
 
@@ -309,17 +317,21 @@ void EWebContext::SetNetworkCacheEnable(bool enable) {
 }
 
 bool EWebContext::GetNetworkCacheEnable() const {
-  net::HttpCache* http_cache = BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext()->
-                  GetURLRequestContext()->http_transaction_factory()->GetCache();
+  net::HttpCache* http_cache =
+      BrowserContext::GetDefaultStoragePartition(browser_context())
+          ->GetURLRequestContext()
+          ->GetURLRequestContext()
+          ->http_transaction_factory()
+          ->GetCache();
   if (!http_cache)
     return false;
 
   return (http_cache->mode() != net::HttpCache::DISABLE);
 }
 
-void EWebContext::AddExtraPluginDir(const char *path) {
+void EWebContext::AddExtraPluginDir(const charpath) {
 #if defined(ENABLE_PLUGINS)
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   // [M51_2704] The AddExtraPluginDir API was removed in content::PluginList
   //            class. It will be fixed by webview team.
   //            FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-1132
@@ -338,27 +350,33 @@ void EWebContext::NotifyLowMemory() {
   // Also, newer chromium rebases (m49+) have a new API for this named
   // MemoryPressureController::SendPressureNotification. Use it when available.
   DLOG(WARNING) << "Releasing as much memory as possible.";
-  content::MemoryPressureControllerImpl::GetInstance()->
-      SimulatePressureNotificationInAllProcesses(
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  content::MemoryPressureControllerImpl::GetInstance()
+      ->SimulatePressureNotificationInAllProcesses(
           base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
+#endif
 }
 
-bool EWebContext::HTTPCustomHeaderAdd(const std::string& name, const std::string& value) {
-  BrowserContextEfl::ResourceContextEfl* rc = browser_context_->GetResourceContextEfl();
+bool EWebContext::HTTPCustomHeaderAdd(const std::string& name,
+                                      const std::string& value) {
+  BrowserContextEfl::ResourceContextEfl* rc =
+      browser_context_->GetResourceContextEfl();
   if (!rc)
     return false;
   return rc->HTTPCustomHeaderAdd(name, value);
 }
 
 bool EWebContext::HTTPCustomHeaderRemove(const std::string& name) {
-  BrowserContextEfl::ResourceContextEfl* rc = browser_context_->GetResourceContextEfl();
+  BrowserContextEfl::ResourceContextEfl* rc =
+      browser_context_->GetResourceContextEfl();
   if (!rc)
     return false;
   return rc->HTTPCustomHeaderRemove(name);
 }
 
 void EWebContext::HTTPCustomHeaderClear() {
-  BrowserContextEfl::ResourceContextEfl* rc = browser_context_->GetResourceContextEfl();
+  BrowserContextEfl::ResourceContextEfl* rc =
+      browser_context_->GetResourceContextEfl();
   if (!rc)
     return;
   rc->HTTPCustomHeaderClear();
@@ -373,15 +391,19 @@ void EWebContext::SetProxyUri(const char* uri) {
   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,
       base::Bind(&SetProxyConfigCallbackOnIOThread, &done,
-                 base::RetainedRef(BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext()),
+                 base::RetainedRef(BrowserContext::GetDefaultStoragePartition(
+                                       browser_context())
+                                       ->GetURLRequestContext()),
                  config));
   done.Wait();
 }
 
-void EWebContext::SetDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback,
-                                              void* user_data) {
+void EWebContext::SetDidStartDownloadCallback(
+    Ewk_Context_Did_Start_Download_Callback callback,
+    void* user_data) {
   DCHECK(start_download_callback_.get() == NULL);
-  start_download_callback_.reset(new EwkDidStartDownloadCallback(callback,user_data));
+  start_download_callback_.reset(
+      new EwkDidStartDownloadCallback(callback, user_data));
 }
 
 EwkDidStartDownloadCallback* EWebContext::DidStartDownloadCallback() {
@@ -396,36 +418,40 @@ Ewk_Cookie_Manager* EWebContext::ewkCookieManager() {
 
 void EWebContext::DeleteAllApplicationCache() {
   if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
-    BrowserThread::PostTask(
-        BrowserThread::IO, FROM_HERE,
-        base::Bind(&EWebContext::DeleteAllApplicationCache,
-          base::Unretained(this)));
+    BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+                            base::Bind(&EWebContext::DeleteAllApplicationCache,
+                                       base::Unretained(this)));
     return;
   }
-  BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
+  BrowsingDataRemoverEfl* remover =
+      BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_APPCACHE, GURL());
 }
 
 void EWebContext::DeleteApplicationCacheForSite(const GURL& site) {
-  content::StoragePartition* partition = BrowserContext::GetStoragePartitionForSite(browser_context_.get(),
-                                                                                    site);
-  partition->ClearDataForOrigin(content::StoragePartition::REMOVE_DATA_MASK_APPCACHE,
-                                content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
-                                site,
-                                partition->GetURLRequestContext(), base::Bind(&base::DoNothing));
+  content::StoragePartition* partition =
+      BrowserContext::GetStoragePartitionForSite(browser_context_.get(), site);
+  partition->ClearDataForOrigin(
+      content::StoragePartition::REMOVE_DATA_MASK_APPCACHE,
+      content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, site,
+      partition->GetURLRequestContext(), base::Bind(&base::DoNothing));
 }
 
-void EWebContext::GetAllOriginsWithApplicationCache(Ewk_Web_Application_Cache_Origins_Get_Callback callback,
-                                                    void* user_data) {
+void EWebContext::GetAllOriginsWithApplicationCache(
+    Ewk_Web_Application_Cache_Origins_Get_Callback callback,
+    void* user_data) {
   content::StoragePartition* partition =
       BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
 
-  scoped_refptr<content::AppCacheInfoCollection> collection(new content::AppCacheInfoCollection());
+  scoped_refptr<content::AppCacheInfoCollection> collection(
+      new content::AppCacheInfoCollection());
   // As per comments on AppCacheService,
-  // there is only one instance of AppCacheService per profile.(i.e. context in our case).
+  // there is only one instance of AppCacheService per profile.(i.e. context in
+  // our case).
   // So, we don't need to iterate over all StoragePartitions.
-  partition->GetAppCacheService()->GetAllAppCacheInfo(collection.get(),
-      base::Bind(&OnOriginsWithApplicationCacheObtained, callback, user_data, collection));
+  partition->GetAppCacheService()->GetAllAppCacheInfo(
+      collection.get(), base::Bind(&OnOriginsWithApplicationCacheObtained,
+                                   callback, user_data, collection));
 }
 
 void EWebContext::GetApplicationCacheUsage(
@@ -433,36 +459,33 @@ void EWebContext::GetApplicationCacheUsage(
     Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback,
     void* user_data) {
   content::StoragePartition* partition =
-        BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
+      BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
 
   BrowserThread::PostTask(
-      BrowserThread::IO,
-      FROM_HERE,
-      base::Bind(&storage::QuotaManager::GetUsageAndQuota,
-                 partition->GetQuotaManager(),
-                 url,
-                 storage::kStorageTypeTemporary,
-                 base::Bind(&OnTemporaryUsageAndQuotaObtained, callback, user_data)));
+      BrowserThread::IO, FROM_HERE,
+      base::Bind(
+          &storage::QuotaManager::GetUsageAndQuota,
+          partition->GetQuotaManager(), url, storage::kStorageTypeTemporary,
+          base::Bind(&OnTemporaryUsageAndQuotaObtained, callback, user_data)));
 }
 
 void EWebContext::WebStorageDelete() {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebContext::WebStorageDelete,
-          base::Unretained(this)));
+        base::Bind(&EWebContext::WebStorageDelete, base::Unretained(this)));
     return;
   }
-  BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
+  BrowsingDataRemoverEfl* remover =
+      BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_LOCAL_STORAGE, GURL());
 }
 
 void EWebContext::WebStorageDeleteForOrigin(const GURL& origin) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
-    BrowserThread::PostTask(
-        BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebContext::WebStorageDeleteForOrigin,
-          base::Unretained(this), origin));
+    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+                            base::Bind(&EWebContext::WebStorageDeleteForOrigin,
+                                       base::Unretained(this), origin));
     return;
   }
   content::StoragePartition* partition =
@@ -471,25 +494,28 @@ void EWebContext::WebStorageDeleteForOrigin(const GURL& origin) {
   partition->GetDOMStorageContext()->DeleteLocalStorage(origin);
 }
 
-void EWebContext::WebStorageOriginsAllGet(Ewk_Web_Storage_Origins_Get_Callback callback,
-                                                    void* user_data) {
+void EWebContext::WebStorageOriginsAllGet(
+    Ewk_Web_Storage_Origins_Get_Callback callback,
+    void* user_data) {
   content::StoragePartition* partition =
       BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
 
-  WebStorageGetAllOriginsDispatcher* dispatcher = new WebStorageGetAllOriginsDispatcher(callback, user_data);
+  WebStorageGetAllOriginsDispatcher* dispatcher =
+      new WebStorageGetAllOriginsDispatcher(callback, user_data);
 
-  partition->GetDOMStorageContext()->GetLocalStorageUsage(base::Bind(&WebStorageGetAllOriginsDispatcher::Dispatch, dispatcher));
+  partition->GetDOMStorageContext()->GetLocalStorageUsage(
+      base::Bind(&WebStorageGetAllOriginsDispatcher::Dispatch, dispatcher));
 }
 
 void EWebContext::IndexedDBDelete() {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebContext::IndexedDBDelete,
-          base::Unretained(this)));
+        base::Bind(&EWebContext::IndexedDBDelete, base::Unretained(this)));
     return;
   }
-  BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
+  BrowsingDataRemoverEfl* remover =
+      BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_INDEXEDDB, GURL());
 }
 
@@ -497,48 +523,52 @@ void EWebContext::WebDBDelete(const GURL& host) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebContext::WebDBDelete,
-          base::Unretained(this), host));
+        base::Bind(&EWebContext::WebDBDelete, base::Unretained(this), host));
     return;
   }
-  BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
+  BrowsingDataRemoverEfl* remover =
+      BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_WEBSQL, host);
 }
 
-void EWebContext::GetAllOriginsWithWebDB(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data) {
-  content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
+void EWebContext::GetAllOriginsWithWebDB(
+    Ewk_Web_Database_Origins_Get_Callback callback,
+    void* user_data) {
+  content::StoragePartition* partition =
+      BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
   BrowserThread::PostTask(
-      BrowserThread::DB,
-      FROM_HERE,
-      base::Bind(&GetWebDBOriginsOnDBThread,
-                 callback, user_data, partition));
+      BrowserThread::DB, FROM_HERE,
+      base::Bind(&GetWebDBOriginsOnDBThread, callback, user_data, partition));
 }
 
 void EWebContext::FileSystemDelete(const GURL& host) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
-    BrowserThread::PostTask(
-        BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebContext::FileSystemDelete,
-          base::Unretained(this), host));
+    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+                            base::Bind(&EWebContext::FileSystemDelete,
+                                       base::Unretained(this), host));
     return;
   }
-  BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
+  BrowsingDataRemoverEfl* remover =
+      BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_FILE_SYSTEMS, host);
 }
 
-void EWebContext::GetAllOriginsWithFileSystem(Ewk_Local_File_System_Origins_Get_Callback callback, void* user_data) const {
-  content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
-  BrowserThread::PostTask(
-      BrowserThread::FILE,
-      FROM_HERE,
-        base::Bind(&GetFileSystemOriginsOnFILEThread, callback, user_data, partition));
+void EWebContext::GetAllOriginsWithFileSystem(
+    Ewk_Local_File_System_Origins_Get_Callback callback,
+    void* user_data) const {
+  content::StoragePartition* partition =
+      BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
+  BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+                          base::Bind(&GetFileSystemOriginsOnFILEThread,
+                                     callback, user_data, partition));
 }
 
 bool EWebContext::SetFaviconDatabasePath(const base::FilePath& path) {
   return FaviconDatabase::Instance()->SetPath(path);
 }
 
-Evas_Object *EWebContext::AddFaviconObject(const char* uri, Evas* canvas) const {
+Evas_Object* EWebContext::AddFaviconObject(const char* uri,
+                                           Evas* canvas) const {
   if (uri == NULL || canvas == NULL) {
     return NULL;
   }
@@ -547,17 +577,20 @@ Evas_Object *EWebContext::AddFaviconObject(const char* uri, Evas* canvas) const
     return NULL;
   }
 
-  Evas_Object *favicon = evas_object_image_filled_add(canvas);
+  Evas_Objectfavicon = evas_object_image_filled_add(canvas);
   evas_object_image_size_set(favicon, bitmap.width(), bitmap.height());
   evas_object_image_colorspace_set(favicon, EVAS_COLORSPACE_ARGB8888);
   evas_object_image_fill_set(favicon, 0, 0, bitmap.width(), bitmap.height());
   evas_object_image_filled_set(favicon, EINA_TRUE);
   evas_object_image_alpha_set(favicon, EINA_TRUE);
+
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   void* pixels = evas_object_image_data_get(favicon, EINA_TRUE);
   if (pixels) {
     bitmap.copyPixelsTo(pixels, bitmap.getSize());
     evas_object_image_data_set(favicon, pixels);
   }
+#endif
 
   return favicon;
 }
@@ -567,8 +600,7 @@ void EWebContext::ClearCandidateData() {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebContext::ClearCandidateData,
-          base::Unretained(this)));
+        base::Bind(&EWebContext::ClearCandidateData, base::Unretained(this)));
     return;
   }
   WebDataServiceFactory* webDataServiceInstance =
@@ -578,9 +610,8 @@ void EWebContext::ClearCandidateData() {
   if (autofillWebDataService.get()) {
     // RemoveFormElementsAddedBetween will schedule task on proper thread,
     // it is done in WebDatabaseService::ScheduleDBTask
-    autofillWebDataService->RemoveFormElementsAddedBetween(
-        base::Time(),
-        base::Time::Max());
+    autofillWebDataService->RemoveFormElementsAddedBetween(base::Time(),
+                                                           base::Time::Max());
   } else {
     DLOG(WARNING) << "AutofillWebDataService is NULL";
   }
@@ -594,7 +625,8 @@ void EWebContext::ClearPasswordData() {
   scoped_refptr<password_manager::PasswordStore> store =
       password_manager::PasswordStoreFactory::GetPasswordStore();
   if (store.get())
-    store->RemoveLoginsCreatedBetween(base::Time(), base::Time::Max(), base::Closure());
+    store->RemoveLoginsCreatedBetween(base::Time(), base::Time::Max(),
+                                      base::Closure());
 #else
   DLOG(WARNING) << "TIZEN_AUTOFILL_SUPPORT is not enabled";
 #endif
@@ -602,7 +634,7 @@ void EWebContext::ClearPasswordData() {
 
 unsigned int EWebContext::InspectorServerStart(unsigned int port) {
   InspectorServerStop();
-  inspector_server_ = new devtools_http_handler::DevToolsDelegateEfl(port);
+  inspector_server_ = new content::DevToolsDelegateEfl(port);
   return inspector_server_ ? inspector_server_->port() : 0;
 }
 
@@ -620,14 +652,13 @@ void EWebContext::SetNotificationCallbacks(
     Ewk_Context_Notification_Show_Callback show_callback,
     Ewk_Context_Notification_Cancel_Callback cancel_callback,
     void* user_data) {
-  notification_cb_.reset(
-      new EWebContextNotificationCallback(
-          context, show_callback, cancel_callback, user_data));
+  notification_cb_.reset(new EWebContextNotificationCallback(
+      context, show_callback, cancel_callback, user_data));
 }
 
 bool EWebContext::HasNotificationCallbacks() const {
   return notification_cb_->HasShowCallback() &&
-      notification_cb_->HasCancelCallback();
+         notification_cb_->HasCancelCallback();
 }
 
 bool EWebContext::NotificationShowCallback(Ewk_Notification* notification) {
index 5519c20086d8aeeb5fa42dba20871ed258e9a544..e02e19f13630f2bdd9df7c16021d39308584f970 100644 (file)
@@ -194,7 +194,7 @@ class EWebContext {
   std::unique_ptr<EwkDidStartDownloadCallback> start_download_callback_;
   std::unique_ptr<EwkMimeOverrideCallback> mime_override_callback_;
   int m_pixmap;
-  devtools_http_handler::DevToolsDelegateEfl* inspector_server_;
+  content::DevToolsDelegateEfl* inspector_server_;
   std::unique_ptr<EWebContextNotificationCallback> notification_cb_;
 };
 
index 3edb475fe71ae56cf6657b63ecdc49e9ddfc7794..b2e27287b6099facd66ee3c73cf6a8c93b2efb59 100644 (file)
@@ -3,12 +3,10 @@
 // found in the LICENSE file.
 
 #include "eweb_view.h"
-//#include <config.h>
 
 #include "base/pickle.h"
 #include "browser/navigation_policy_handler_efl.h"
 #include "browser/quota_permission_context_efl.h"
-#include "browser/scoped_allow_wait_for_legacy_web_view_api.h"
 #include "browser/web_view_browser_message_filter.h"
 #include "common/content_client_efl.h"
 #include "common/render_messages_ewk.h"
@@ -50,7 +48,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/host_zoom_map.h"
 #include "skia/ext/platform_canvas.h"
-#include "third_party/WebKit/public/web/WebFindOptions.h"
+#include "third_party/blink/public/web/WebFindOptions.h"
 #include "ui/events/event_switches.h"
 #include "web_contents_efl_delegate_ewk.h"
 #include "web_contents_view_efl_delegate_ewk.h"
@@ -85,8 +83,8 @@ inline void SetDefaultStringIfNull(const char*& variable,
   }
 }
 
-void GetEinaRectFromGfxRect(const gfx::Rect& gfx_rect, Eina_Rectangle* eina_rect)
-{
+void GetEinaRectFromGfxRect(const gfx::Rect& gfx_rect,
+                            Eina_Rectangle* eina_rect) {
   eina_rect->x = gfx_rect.x();
   eina_rect->y = gfx_rect.y();
   eina_rect->w = gfx_rect.width();
@@ -97,19 +95,15 @@ static content::WebContents* NullCreateWebContents(void*) {
   return NULL;
 }
 
-} // namespace
+}  // namespace
 
-class WebViewAsyncRequestHitTestDataCallback
-{
+class WebViewAsyncRequestHitTestDataCallback {
  public:
   WebViewAsyncRequestHitTestDataCallback(int x, int y, Ewk_Hit_Test_Mode mode)
-      : x_(x)
-      , y_(y)
-      , mode_(mode) {
-  }
-  virtual ~WebViewAsyncRequestHitTestDataCallback() {};
+      : x_(x), y_(y), mode_(mode) {}
+  virtual ~WebViewAsyncRequestHitTestDataCallback(){};
 
-  virtual void Run(_Ewk_Hit_Test *hit_test, EWebView* web_view) = 0;
+  virtual void Run(_Ewk_Hit_Testhit_test, EWebView* web_view) = 0;
 
  protected:
   int GetX() const { return x_; }
@@ -122,22 +116,23 @@ class WebViewAsyncRequestHitTestDataCallback
   Ewk_Hit_Test_Mode mode_;
 };
 
-class WebViewAsyncRequestHitTestDataUserCallback: public WebViewAsyncRequestHitTestDataCallback
-{
+class WebViewAsyncRequestHitTestDataUserCallback
+    : public WebViewAsyncRequestHitTestDataCallback {
  public:
-  WebViewAsyncRequestHitTestDataUserCallback(int x,
-                                             int y,
-                                             Ewk_Hit_Test_Mode mode,
-                                             Ewk_View_Hit_Test_Request_Callback callback,
-                                             void* user_data)
-      : WebViewAsyncRequestHitTestDataCallback(x, y, mode)
-      , callback_(callback)
-      , user_data_(user_data) {
-  }
-
-  void Run(_Ewk_Hit_Test *hit_test, EWebView* web_view) override {
+  WebViewAsyncRequestHitTestDataUserCallback(
+      int x,
+      int y,
+      Ewk_Hit_Test_Mode mode,
+      Ewk_View_Hit_Test_Request_Callback callback,
+      void* user_data)
+      : WebViewAsyncRequestHitTestDataCallback(x, y, mode),
+        callback_(callback),
+        user_data_(user_data) {}
+
+  void Run(_Ewk_Hit_Testhit_test, EWebView* web_view) override {
     DCHECK(callback_);
-    callback_(web_view->evas_object(), GetX(), GetY(), GetMode(), hit_test, user_data_);
+    callback_(web_view->evas_object(), GetX(), GetY(), GetMode(), hit_test,
+              user_data_);
   }
 
  private:
@@ -151,12 +146,12 @@ content::WebContentsEflDelegate::WebContentsCreateCallback
         base::Bind(&NullCreateWebContents);
 
 EWebView* EWebView::FromEvasObject(Evas_Object* eo) {
-  return WebViewDelegateEwk::GetInstance().
-    GetWebViewFromEvasObject(eo);
+  return WebViewDelegateEwk::GetInstance().GetWebViewFromEvasObject(eo);
 }
 
 RenderWidgetHostViewEfl* EWebView::rwhv() const {
-  return static_cast<RenderWidgetHostViewEfl*>(web_contents_->GetRenderWidgetHostView());
+  return static_cast<RenderWidgetHostViewEfl*>(
+      web_contents_->GetRenderWidgetHostView());
 }
 
 EWebView::EWebView(Ewk_Context* context, Evas_Object* object)
@@ -172,8 +167,7 @@ EWebView::EWebView(Ewk_Context* context, Evas_Object* object)
       hit_test_completion_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
                            base::WaitableEvent::InitialState::NOT_SIGNALED),
       page_scale_factor_(1.0),
-      is_initialized_(false) {
-}
+      is_initialized_(false) {}
 
 void EWebView::Initialize() {
   if (is_initialized_) {
@@ -188,16 +182,17 @@ void EWebView::Initialize() {
 
   web_contents_delegate_.reset(new WebContentsDelegateEfl(this));
   web_contents_->SetDelegate(web_contents_delegate_.get());
-  back_forward_list_.reset(new _Ewk_Back_Forward_List(
-      web_contents_->GetController()));
+  back_forward_list_.reset(
+      new _Ewk_Back_Forward_List(web_contents_->GetController()));
 
   DCHECK(web_contents_->GetRenderViewHost());
   // Settings (content::WebPreferences) will be initalized by
   // RenderViewHostImpl::ComputeWebkitPrefs() based on command line switches.
-  settings_.reset(new Ewk_Settings(evas_object_,
-                                   web_contents_->GetRenderViewHost()->GetWebkitPreferences()));
+  settings_.reset(new Ewk_Settings(
+      evas_object_,
+      web_contents_->GetRenderViewHost()->GetWebkitPreferences()));
 
-  base::CommandLine *cmdline = base::CommandLine::ForCurrentProcess();
+  base::CommandLinecmdline = base::CommandLine::ForCurrentProcess();
   if (cmdline->HasSwitch(switches::kTouchEvents))
     SetTouchEventsEnabled(true);
   else
@@ -211,21 +206,22 @@ void EWebView::Initialize() {
   formNavigation_.prevState = false;
   formNavigation_.nextState = false;
 
-  //allow this object and its children to get a focus
+  // allow this object and its children to get a focus
   elm_object_tree_focus_allow_set(native_view_, EINA_TRUE);
   is_initialized_ = true;
 }
 
-EWebView::~EWebView()
-{
-  std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*>::iterator hit_test_callback_iterator;
+EWebView::~EWebView() {
+  std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*>::iterator
+      hit_test_callback_iterator;
   for (hit_test_callback_iterator = hit_test_callback_.begin();
-      hit_test_callback_iterator != hit_test_callback_.end();
-      hit_test_callback_iterator++)
+       hit_test_callback_iterator != hit_test_callback_.end();
+       hit_test_callback_iterator++)
     delete hit_test_callback_iterator->second;
   hit_test_callback_.clear();
 
-  for (auto iter = delayed_messages_.begin(); iter != delayed_messages_.end(); ++iter)
+  for (auto iter = delayed_messages_.begin(); iter != delayed_messages_.end();
+       ++iter)
     delete *iter;
 
   delayed_messages_.clear();
@@ -247,7 +243,7 @@ EWebView::~EWebView()
   formNavigation_.prevState = false;
   formNavigation_.nextState = false;
 
-//  evas_object_del(evas_object());
+  //  evas_object_del(evas_object());
 
   // Release manually those scoped pointers to
   // make sure they are released in correct order
@@ -287,8 +283,7 @@ void EWebView::ResetContextMenuController() {
   return context_menu_.reset();
 }
 
-void EWebView::SetFocus(Eina_Bool focus)
-{
+void EWebView::SetFocus(Eina_Bool focus) {
   if (HasFocus() != focus)
     elm_object_focus_set(native_view_, focus);
 }
@@ -302,9 +297,8 @@ void EWebView::CreateNewWindow(
   DCHECK(new_object);
 }
 
-//static
-Evas_Object* EWebView::GetHostWindowDelegate(
-    const content::WebContents* wc) {
+// static
+Evas_Object* EWebView::GetHostWindowDelegate(const content::WebContents* wc) {
   EWebView* thiz = WebViewFromWebContents(wc);
   DCHECK(thiz->evas_object_);
   Evas_Object* parent = evas_object_above_get(thiz->evas_object_);
@@ -335,11 +329,11 @@ const GURL& EWebView::GetURL() const {
 }
 
 void EWebView::Reload() {
-  web_contents_->GetController().Reload(true);
+  web_contents_->GetController().Reload(content::ReloadType::NORMAL, true);
 }
 
 void EWebView::ReloadBypassingCache() {
-  web_contents_->GetController().ReloadBypassingCache(true);
+  web_contents_->GetController().Reload(content::ReloadType::BYPASSING_CACHE, true);
 }
 
 Eina_Bool EWebView::CanGoBack() {
@@ -377,32 +371,41 @@ void EWebView::Stop() {
 
 void EWebView::Suspend() {
   CHECK(web_contents_);
-  RenderViewHost *rvh = web_contents_->GetRenderViewHost();
+  RenderViewHostrvh = web_contents_->GetRenderViewHost();
   RenderFrameHost* rfh = web_contents_->GetMainFrame();
   CHECK(rvh);
   CHECK(rfh);
 
+  rfh->BlockRequestsForFrame();
+#if 0
   content::BrowserThread::PostTask(
-    content::BrowserThread::IO, FROM_HERE,
-    base::Bind(&content::ResourceDispatcherHost::BlockRequestsForFrameFromUI, rfh));
+      content::BrowserThread::IO, FROM_HERE,
+      base::Bind(&content::ResourceDispatcherHost::BlockRequestsForFrameFromUI,
+                 rfh));
 
   if (rvh)
     rvh->Send(new EwkViewMsg_SuspendScheduledTask(rvh->GetRoutingID()));
+#endif
 }
 
 void EWebView::Resume() {
   CHECK(web_contents_);
-  RenderViewHost *rvh = web_contents_->GetRenderViewHost();
-  RenderFrameHost *rfh = web_contents_->GetMainFrame();
+  RenderViewHostrvh = web_contents_->GetRenderViewHost();
+  RenderFrameHostrfh = web_contents_->GetMainFrame();
   CHECK(rvh);
   CHECK(rfh);
 
+  rfh->ResumeBlockedRequestsForFrame();
+#if 0
   content::BrowserThread::PostTask(
-    content::BrowserThread::IO, FROM_HERE,
-    base::Bind(&content::ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI, rfh));
+      content::BrowserThread::IO, FROM_HERE,
+      base::Bind(
+          &content::ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI,
+          rfh));
 
   if (rvh)
     rvh->Send(new EwkViewMsg_ResumeScheduledTasks(rvh->GetRoutingID()));
+#endif
 }
 
 double EWebView::GetTextZoomFactor() const {
@@ -442,15 +445,18 @@ void EWebView::ExecuteEditCommand(const char* command, const char* value) {
 
   RenderWidgetHostImpl* rwhi = static_cast<RenderWidgetHostImpl*>(
       web_contents_->GetRenderViewHost()->GetWidget());
+
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // This is moved to mojo in upstream. Change it.
+  // https://chromium-review.googlesource.com/c/chromium/src/+/541036
   rwhi->ExecuteEditCommand(command, value);
+#endif
 
   // This is workaround for rich text toolbar buttons in email application
-  if ( !strcmp(command, "InsertOrderedList")
-    || !strcmp(command, "InsertUnorderedList")
-    || !strcmp(command, "AlignCenter")
-    || !strcmp(command, "AlignJustified")
-    || !strcmp(command, "AlignLeft")
-    || !strcmp(command, "AlignRight") ) {
+  if (!strcmp(command, "InsertOrderedList") ||
+      !strcmp(command, "InsertUnorderedList") ||
+      !strcmp(command, "AlignCenter") || !strcmp(command, "AlignJustified") ||
+      !strcmp(command, "AlignLeft") || !strcmp(command, "AlignRight")) {
     QuerySelectionStyle();
   }
 }
@@ -463,10 +469,8 @@ void EWebView::SetOrientation(int orientation) {
     orientation = 270;
   screen_orientation_ = orientation;
 
-  if (screen_orientation_ == 0   ||
-      screen_orientation_ == 90  ||
-      screen_orientation_ == 180 ||
-      screen_orientation_ == 270) {
+  if (screen_orientation_ == 0 || screen_orientation_ == 90 ||
+      screen_orientation_ == 180 || screen_orientation_ == 270) {
     GetWebContentsViewEfl()->SetOrientation(screen_orientation_);
 
     // workaround for platform issue not resizing popup after rotation
@@ -475,7 +479,8 @@ void EWebView::SetOrientation(int orientation) {
     int width = 0;
     int height = 0;
 #if defined(USE_WAYLAND)
-    // Screen orientation is already considered in ecore_wl_screen_size_get function.
+    // Screen orientation is already considered in ecore_wl_screen_size_get
+    // function.
     ecore_wl_screen_size_get(&width, &height);
 #else
     if (orientation == 0 || orientation == 180) {
@@ -525,8 +530,10 @@ void EWebView::InvokeAuthCallback(LoginDelegateEfl* login_delegate,
   }
 }
 
-void EWebView::InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision) {
-  SmartCallback<EWebViewCallbacks::PolicyResponseDecide>().call(policy_decision);
+void EWebView::InvokePolicyResponseCallback(
+    _Ewk_Policy_Decision* policy_decision) {
+  SmartCallback<EWebViewCallbacks::PolicyResponseDecide>().call(
+      policy_decision);
 
   if (policy_decision->isSuspended())
     return;
@@ -537,30 +544,37 @@ void EWebView::InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decisio
   delete policy_decision;
 }
 
-void EWebView::InvokePolicyNavigationCallback(RenderViewHost* rvh,
-    const NavigationPolicyParams params, bool* handled) {
+void EWebView::InvokePolicyNavigationCallback(
+    RenderViewHost* rvh,
+    const NavigationPolicyParams params,
+    bool* handled) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
   SmartCallback<EWebViewCallbacks::SaveSessionData>().call();
 
-  std::unique_ptr<_Ewk_Policy_Decision> policy_decision(new _Ewk_Policy_Decision(params, rvh));
+  std::unique_ptr<_Ewk_Policy_Decision> policy_decision(
+      new _Ewk_Policy_Decision(params, rvh));
 
-  SmartCallback<EWebViewCallbacks::NavigationPolicyDecision>().call(policy_decision.get());
+  SmartCallback<EWebViewCallbacks::NavigationPolicyDecision>().call(
+      policy_decision.get());
 
   CHECK(!policy_decision->isSuspended());
 
   // TODO: Navigation can't be suspended
   // this aproach is synchronous and requires immediate response
-  // Maybe there is different approach (like resource throttle response mechanism) that allows us to
+  // Maybe there is different approach (like resource throttle response
+  // mechanism) that allows us to
   // suspend navigation
   if (!policy_decision->isDecided())
     policy_decision->Use();
 
-  *handled = policy_decision->GetNavigationPolicyHandler()->GetDecision() == NavigationPolicyHandlerEfl::Handled;
+  *handled = policy_decision->GetNavigationPolicyHandler()->GetDecision() ==
+             NavigationPolicyHandlerEfl::Handled;
 }
 
-void EWebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers)
-{
+void EWebView::HandleTouchEvents(Ewk_Touch_Event_Type type,
+                                 const Eina_List* points,
+                                 const Evas_Modifier* modifiers) {
   const Eina_List* l;
   void* data;
   EINA_LIST_FOREACH(points, l, data) {
@@ -573,8 +587,8 @@ void EWebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *poi
       Evas_Coord_Point pt;
       pt.x = point->x;
       pt.y = point->y;
-      ui::TouchEvent touch_event = MakeTouchEvent(
-          pt, point->state, point->id, evas_object());
+      ui::TouchEvent touch_event =
+          MakeTouchEvent(pt, point->state, point->id, evas_object());
       rwhv()->HandleTouchEvent(&touch_event);
     }
   }
@@ -599,11 +613,14 @@ void EWebView::SetTouchEventsEnabled(bool enabled) {
   touch_events_enabled_ = enabled;
   GetWebContentsViewEfl()->SetTouchEventsEnabled(enabled);
 
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // there is no flag touch_enabled in web preferences
   GetSettings()->getPreferences().touch_enabled = enabled;
+#endif
   GetSettings()->getPreferences().double_tap_to_zoom_enabled = enabled;
   GetSettings()->getPreferences().editing_behavior =
-      enabled ? content::EDITING_BEHAVIOR_ANDROID :
-          content::EDITING_BEHAVIOR_UNIX;
+      enabled ? content::EDITING_BEHAVIOR_ANDROID
+              : content::EDITING_BEHAVIOR_UNIX;
   UpdateWebKitPreferences();
 }
 
@@ -623,32 +640,37 @@ namespace {
 
 class JavaScriptCallbackDetails {
  public:
-  JavaScriptCallbackDetails(Ewk_View_Script_Execute_Callback callback_func, void *user_data, Evas_Object* view)
-    : callback_func_(callback_func)
-    , user_data_(user_data)
-    , view_(view) {}
+  JavaScriptCallbackDetails(Ewk_View_Script_Execute_Callback callback_func,
+                            void* user_data,
+                            Evas_Object* view)
+      : callback_func_(callback_func), user_data_(user_data), view_(view) {}
 
   Ewk_View_Script_Execute_Callback callback_func_;
-  void *user_data_;
+  voiduser_data_;
   Evas_Object* view_;
 };
 
-void JavaScriptComplete(JavaScriptCallbackDetails* script_callback_data, const base::Value* result) {
+void JavaScriptComplete(JavaScriptCallbackDetails* script_callback_data,
+                        const base::Value* result) {
   if (!script_callback_data->callback_func_)
     return;
 
   std::string return_string;
   result->GetAsString(&return_string);
-  script_callback_data->callback_func_(script_callback_data->view_, return_string.c_str(), script_callback_data->user_data_);
+  script_callback_data->callback_func_(script_callback_data->view_,
+                                       return_string.c_str(),
+                                       script_callback_data->user_data_);
 }
 
-} //namespace
+}  // namespace
 
-bool EWebView::ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata) {
+bool EWebView::ExecuteJavaScript(const char* script,
+                                 Ewk_View_Script_Execute_Callback callback,
+                                 void* userdata) {
   if (!script)
     return false;
 
-  if (!web_contents_delegate_)   // question, can I remove this check?
+  if (!web_contents_delegate_)  // question, can I remove this check?
     return false;
 
   if (!web_contents_)
@@ -658,20 +680,25 @@ bool EWebView::ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Cal
   if (!render_frame_host)
     return false;
 
-  // Note: M37. Execute JavaScript, |script| with |RenderFrameHost::ExecuteJavaScript|.
+  // Note: M37. Execute JavaScript, |script| with
+  // |RenderFrameHost::ExecuteJavaScript|.
   // @see also https://codereview.chromium.org/188893005 for more details.
   base::string16 js_script;
   base::UTF8ToUTF16(script, strlen(script), &js_script);
   if (callback) {
-    JavaScriptCallbackDetails* script_callback_data = new JavaScriptCallbackDetails(callback, userdata, evas_object_);
+    JavaScriptCallbackDetails* script_callback_data =
+        new JavaScriptCallbackDetails(callback, userdata, evas_object_);
     // In M47, it isn't possible anymore to execute javascript in the generic
     // case. We need to call ExecuteJavaScriptForTests to keep the behaviour
     // unchanged @see https://codereview.chromium.org/1123783002
     render_frame_host->ExecuteJavaScriptWithUserGestureForTests(
-        js_script, base::Bind(&JavaScriptComplete, base::Owned(script_callback_data)));
+        js_script,
+        base::Bind(&JavaScriptComplete, base::Owned(script_callback_data)));
   } else {
-    // We use ExecuteJavaScriptWithUserGestureForTests instead of ExecuteJavaScript because
-    // ExecuteJavaScriptWithUserGestureForTests sets user_gesture to true. This was the
+    // We use ExecuteJavaScriptWithUserGestureForTests instead of
+    // ExecuteJavaScript because
+    // ExecuteJavaScriptWithUserGestureForTests sets user_gesture to true. This
+    // was the
     // behaviour is m34, and we want to keep it that way.
     render_frame_host->ExecuteJavaScriptWithUserGestureForTests(js_script);
   }
@@ -695,8 +722,8 @@ bool EWebView::SetUserAgent(const char* userAgent) {
 }
 
 bool EWebView::SetUserAgentAppName(const char* application_name) {
-  EflWebView::VersionInfo::GetInstance()->
-    SetProductName(application_name ? application_name : "");
+  EflWebView::VersionInfo::GetInstance()->SetProductName(
+      application_name ? application_name : "");
 
   return true;
 }
@@ -750,7 +777,7 @@ const char* EWebView::GetSelectedText() const {
   if (!rwhv())
     return "";
 
-  return UTF16ToUTF8(rwhv()->GetSelectedText()).c_str();
+  return base::UTF16ToUTF8(rwhv()->GetSelectedText()).c_str();
 }
 
 _Ewk_Frame* EWebView::GetMainFrame() {
@@ -782,9 +809,8 @@ void EWebView::UpdateWebKitPreferences() {
 void EWebView::UpdateWebkitPreferencesEfl(RenderViewHost* render_view_host) {
   DCHECK(render_view_host);
 
-  IPC::Message* message =
-      new EwkSettingsMsg_UpdateWebKitPreferencesEfl(render_view_host->GetRoutingID(),
-                                                    settings_->getPreferencesEfl());
+  IPC::Message* message = new EwkSettingsMsg_UpdateWebKitPreferencesEfl(
+      render_view_host->GetRoutingID(), settings_->getPreferencesEfl());
 
   if (render_view_host->IsRenderViewLive()) {
     render_view_host->Send(message);
@@ -793,11 +819,15 @@ void EWebView::UpdateWebkitPreferencesEfl(RenderViewHost* render_view_host) {
   }
 }
 
-void EWebView::SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type) {
-  web_contents_delegate_->SetContentSecurityPolicy((policy ? policy : std::string()), type);
+void EWebView::SetContentSecurityPolicy(const char* policy,
+                                        Ewk_CSP_Header_Type type) {
+  web_contents_delegate_->SetContentSecurityPolicy(
+      (policy ? policy : std::string()), type);
 }
 
-void EWebView::LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri) {
+void EWebView::LoadHTMLString(const char* html,
+                              const char* base_uri,
+                              const char* unreachable_uri) {
   LoadData(html, std::string::npos, NULL, NULL, base_uri, unreachable_uri);
 }
 
@@ -805,8 +835,12 @@ void EWebView::LoadPlainTextString(const char* plain_text) {
   LoadData(plain_text, std::string::npos, "text/plain", NULL, NULL, NULL);
 }
 
-void EWebView::LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri)
-{
+void EWebView::LoadData(const char* data,
+                        size_t size,
+                        const char* mime_type,
+                        const char* encoding,
+                        const char* base_uri,
+                        const char* unreachable_uri) {
   SetDefaultStringIfNull(mime_type, "text/html");
   SetDefaultStringIfNull(encoding, "utf-8");
   SetDefaultStringIfNull(base_uri, "about:blank");  // Webkit2 compatible
@@ -835,24 +869,27 @@ void EWebView::LoadData(const char* data, size_t size, const char* mime_type, co
   web_contents_->GetController().LoadURLWithParams(data_params);
 }
 
-void EWebView::InvokeLoadError(const GURL& url, int error_code,
-      const std::string& error_description, bool is_main_frame) {
+void EWebView::InvokeLoadError(const GURL& url,
+                               int error_code,
+                               const std::string& error_description,
+                               bool is_main_frame) {
   if (!is_main_frame)
     return;
 
-  std::unique_ptr<_Ewk_Error> err(new _Ewk_Error(error_code,
-      url.possibly_invalid_spec().c_str(), error_description.c_str()));
+  std::unique_ptr<_Ewk_Error> err(
+      new _Ewk_Error(error_code, url.possibly_invalid_spec().c_str(),
+                     error_description.c_str()));
 
   SmartCallback<EWebViewCallbacks::LoadError>().call(err.get());
 }
 
 void EWebView::ShowPopupMenu(const std::vector<content::MenuItem>& items,
-    int selectedIndex, bool multiple) {
-
+                             int selectedIndex,
+                             bool multiple) {
   // Request form navigation information as early as possible,
   // given that is renderer will ping-back with actual requested data.
-  RenderFrameHostImpl* render_frame_host = static_cast<RenderFrameHostImpl*>(
-      web_contents_->GetMainFrame());
+  RenderFrameHostImpl* render_frame_host =
+      static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
   if (render_frame_host)
     render_frame_host->Send(new EwkFrameMsg_RequestSelectCollectionInformation(
         render_frame_host->GetRoutingID()));
@@ -878,11 +915,14 @@ void EWebView::ShowPopupMenu(const std::vector<content::MenuItem>& items,
   popupPicker_ = 0;
 
   if (multiple)
-    popupPicker_ = popup_picker_new(this, evas_object(), popupMenuItems_, 0, multiple);
+    popupPicker_ =
+        popup_picker_new(this, evas_object(), popupMenuItems_, 0, multiple);
   else
-    popupPicker_ = popup_picker_new(this, evas_object(), popupMenuItems_, selectedIndex, multiple);
+    popupPicker_ = popup_picker_new(this, evas_object(), popupMenuItems_,
+                                    selectedIndex, multiple);
 
-  popup_picker_buttons_update(popupPicker_, formNavigation_.position, formNavigation_.count, false);
+  popup_picker_buttons_update(popupPicker_, formNavigation_.position,
+                              formNavigation_.count, false);
 }
 
 Eina_Bool EWebView::HidePopupMenu() {
@@ -897,8 +937,10 @@ Eina_Bool EWebView::HidePopupMenu() {
   return true;
 }
 
-void EWebView::UpdateFormNavigation(int formElementCount, int currentNodeIndex,
-    bool prevState, bool nextState) {
+void EWebView::UpdateFormNavigation(int formElementCount,
+                                    int currentNodeIndex,
+                                    bool prevState,
+                                    bool nextState) {
   formNavigation_.count = formElementCount;
   formNavigation_.position = currentNodeIndex;
   formNavigation_.prevState = prevState;
@@ -922,19 +964,22 @@ Eina_Bool EWebView::PopupMenuUpdate(Eina_List* items, int selectedIndex) {
     return false;
 
   popup_picker_update(evas_object(), popupPicker_, items, selectedIndex);
-  popup_picker_buttons_update(popupPicker_, formNavigation_.position, formNavigation_.count, false);
+  popup_picker_buttons_update(popupPicker_, formNavigation_.position,
+                              formNavigation_.count, false);
   return true;
 }
 
 void EWebView::FormNavigate(bool direction) {
-  RenderFrameHostImpl* render_frame_host = static_cast<RenderFrameHostImpl*>(
-      web_contents_->GetMainFrame());
+  RenderFrameHostImpl* render_frame_host =
+      static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
   if (!render_frame_host)
     return;
 
-  popup_picker_buttons_update(popupPicker_, formNavigation_.position, formNavigation_.count, true);
+  popup_picker_buttons_update(popupPicker_, formNavigation_.position,
+                              formNavigation_.count, true);
 
-  if ((direction && formNavigation_.nextState) || (!direction && formNavigation_.prevState))
+  if ((direction && formNavigation_.nextState) ||
+      (!direction && formNavigation_.prevState))
     SetFormIsNavigating(true);
 
   listClosed(popupPicker_, 0, 0, 0);
@@ -943,20 +988,26 @@ void EWebView::FormNavigate(bool direction) {
 }
 
 Eina_Bool EWebView::DidSelectPopupMenuItem(int selectedIndex) {
-  RenderFrameHostImpl* render_frame_host = static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
+  RenderFrameHostImpl* render_frame_host =
+      static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
   if (!render_frame_host)
     return false;
 
   if (!popupMenuItems_)
     return false;
 
-  // When user select empty space then no index is selected, so selectedIndex value is -1
-  // In that case we should call valueChanged() with -1 index.That in turn call popupDidHide()
-  // in didChangeSelectedIndex() for reseting the value of m_popupIsVisible in RenderMenuList.
-  if (selectedIndex != -1 && selectedIndex >= (int)eina_list_count(popupMenuItems_))
+  // When user select empty space then no index is selected, so selectedIndex
+  // value is -1
+  // In that case we should call valueChanged() with -1 index.That in turn call
+  // popupDidHide()
+  // in didChangeSelectedIndex() for reseting the value of m_popupIsVisible in
+  // RenderMenuList.
+  if (selectedIndex != -1 &&
+      selectedIndex >= (int)eina_list_count(popupMenuItems_))
     return false;
 
-  // In order to reuse RenderFrameHostImpl::DidSelectPopupMenuItems() method in Android,
+  // In order to reuse RenderFrameHostImpl::DidSelectPopupMenuItems() method in
+  // Android,
   // put selectedIndex into std::vector<int>.
   std::vector<int> selectedIndices;
   selectedIndices.push_back(selectedIndex);
@@ -965,8 +1016,10 @@ Eina_Bool EWebView::DidSelectPopupMenuItem(int selectedIndex) {
   return true;
 }
 
-Eina_Bool EWebView::DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices) {
-  RenderFrameHostImpl* render_frame_host = static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
+Eina_Bool EWebView::DidMultipleSelectPopupMenuItem(
+    std::vector<int>& selectedIndices) {
+  RenderFrameHostImpl* render_frame_host =
+      static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
   if (!render_frame_host)
     return false;
 
@@ -995,7 +1048,8 @@ Eina_Bool EWebView::PopupMenuClose() {
   delete static_cast<Popup_Menu_Item*>(item);
   popupMenuItems_ = 0;
 
-  RenderFrameHostImpl* render_frame_host = static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
+  RenderFrameHostImpl* render_frame_host =
+      static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
   if (!render_frame_host)
     return false;
 
@@ -1003,11 +1057,14 @@ Eina_Bool EWebView::PopupMenuClose() {
   return true;
 }
 
-void EWebView::HandleLongPressGesture(const content::ContextMenuParams& params) {
+void EWebView::HandleLongPressGesture(
+    const content::ContextMenuParams& params) {
   // This menu is created in renderer process and it does not now anything about
-  // view scaling factor and it has another calling sequence, so coordinates is not updated.
+  // view scaling factor and it has another calling sequence, so coordinates is
+  // not updated.
   content::ContextMenuParams convertedParams = params;
-  gfx::Point convertedPoint = rwhv()->ConvertPointInViewPix(gfx::Point(params.x, params.y));
+  gfx::Point convertedPoint =
+      rwhv()->ConvertPointInViewPix(gfx::Point(params.x, params.y));
   convertedParams.x = convertedPoint.x();
   convertedParams.y = convertedPoint.y();
 
@@ -1018,7 +1075,8 @@ void EWebView::HandleLongPressGesture(const content::ContextMenuParams& params)
 
   if (GetSelectionController() && GetSelectionController()->GetLongPressed()) {
     bool show_context_menu_now =
-        !GetSelectionController()->HandleLongPressEvent(convertedPoint, convertedParams);
+        !GetSelectionController()->HandleLongPressEvent(convertedPoint,
+                                                        convertedParams);
     if (show_context_menu_now)
       ShowContextMenuInternal(convertedParams);
   }
@@ -1026,9 +1084,11 @@ void EWebView::HandleLongPressGesture(const content::ContextMenuParams& params)
 
 void EWebView::ShowContextMenu(const content::ContextMenuParams& params) {
   // This menu is created in renderer process and it does not now anything about
-  // view scaling factor and it has another calling sequence, so coordinates is not updated.
+  // view scaling factor and it has another calling sequence, so coordinates is
+  // not updated.
   content::ContextMenuParams convertedParams = params;
-  gfx::Point convertedPoint = rwhv()->ConvertPointInViewPix(gfx::Point(params.x, params.y));
+  gfx::Point convertedPoint =
+      rwhv()->ConvertPointInViewPix(gfx::Point(params.x, params.y));
   convertedParams.x = convertedPoint.x();
   convertedParams.y = convertedPoint.y();
 
@@ -1042,8 +1102,10 @@ void EWebView::ShowContextMenu(const content::ContextMenuParams& params) {
   ShowContextMenuInternal(convertedParams);
 }
 
-void EWebView::ShowContextMenuInternal(const content::ContextMenuParams& params) {
-  context_menu_.reset(new content::ContextMenuControllerEfl(this, *web_contents_.get()));
+void EWebView::ShowContextMenuInternal(
+    const content::ContextMenuParams& params) {
+  context_menu_.reset(
+      new content::ContextMenuControllerEfl(this, *web_contents_.get()));
   if (!context_menu_->PopulateAndShowContextMenu(params)) {
     context_menu_.reset();
     if (GetSelectionController())
@@ -1067,8 +1129,9 @@ void EWebView::Find(const char* text, Ewk_Find_Options find_options) {
 
   blink::WebFindOptions web_find_options;
   web_find_options.forward = !(find_options & EWK_FIND_OPTIONS_BACKWARDS);
-  web_find_options.matchCase = !(find_options & EWK_FIND_OPTIONS_CASE_INSENSITIVE);
-  web_find_options.findNext = find_next;
+  web_find_options.match_case =
+      !(find_options & EWK_FIND_OPTIONS_CASE_INSENSITIVE);
+  web_find_options.find_next = find_next;
 
   web_contents_->Find(current_find_request_id_, find_text, web_find_options);
 }
@@ -1078,7 +1141,8 @@ void EWebView::SetScale(double scale_factor, int x, int y) {
   // Do not cache |scale_factor| here as it may be discarded by Blink's
   // minimumPageScaleFactor and maximumPageScaleFactor.
   // |scale_factor| is cached as responde to DidChangePageScaleFactor.
-  render_view_host->Send(new EwkViewMsg_Scale(render_view_host->GetRoutingID(), scale_factor, x, y));
+  render_view_host->Send(new EwkViewMsg_Scale(render_view_host->GetRoutingID(),
+                                              scale_factor, x, y));
 }
 
 bool EWebView::GetScrollPosition(int* x, int* y) const {
@@ -1089,7 +1153,8 @@ bool EWebView::GetScrollPosition(int* x, int* y) const {
     *x = previous_scroll_position_.x();
     *y = previous_scroll_position_.y();
   } else {
-    const gfx::Vector2d scroll_position = scroll_detector_->GetLastScrollPosition();
+    const gfx::Vector2d scroll_position =
+        scroll_detector_->GetLastScrollPosition();
     *x = scroll_position.x();
     *y = scroll_position.y();
   }
@@ -1108,13 +1173,15 @@ void EWebView::SetScroll(int x, int y) {
 
   scroll_detector_->SetScrollOffsetChanged();
 
-  render_view_host->Send(new EwkViewMsg_SetScroll(render_view_host->GetRoutingID(), x, y));
+  render_view_host->Send(
+      new EwkViewMsg_SetScroll(render_view_host->GetRoutingID(), x, y));
 }
 
 void EWebView::UseSettingsFont() {
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
   if (render_view_host)
-    render_view_host->Send(new EwkViewMsg_UseSettingsFont(render_view_host->GetRoutingID()));
+    render_view_host->Send(
+        new EwkViewMsg_UseSettingsFont(render_view_host->GetRoutingID()));
 }
 
 void EWebView::DidChangeContentsSize(int width, int height) {
@@ -1124,7 +1191,8 @@ void EWebView::DidChangeContentsSize(int width, int height) {
 
 const Eina_Rectangle EWebView::GetContentsSize() const {
   Eina_Rectangle rect;
-  EINA_RECTANGLE_SET(&rect, 0, 0, contents_size_.width(), contents_size_.height());
+  EINA_RECTANGLE_SET(&rect, 0, 0, contents_size_.width(),
+                     contents_size_.height());
   return rect;
 }
 
@@ -1136,8 +1204,10 @@ void EWebView::GetScrollSize(int* width, int* height) {
 
   Eina_Rectangle last_view_port =
       WebViewDelegateEwk::GetInstance().GetLastUsedViewPortArea(evas_object());
-  int scaled_content_width = static_cast<int>(contents_size_.width() * page_scale_factor_);
-  int scaled_content_height = static_cast<int>(contents_size_.height() * page_scale_factor_);
+  int scaled_content_width =
+      static_cast<int>(contents_size_.width() * page_scale_factor_);
+  int scaled_content_height =
+      static_cast<int>(contents_size_.height() * page_scale_factor_);
 
   if (width && scaled_content_width > last_view_port.w)
     *width = scaled_content_width - last_view_port.w;
@@ -1153,7 +1223,8 @@ void EWebView::MoveCaret(const gfx::Point& point) {
 void EWebView::QuerySelectionStyle() {
   if (GetSettings()->textStyleStateState()) {
     RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
-    render_view_host->Send(new EwkViewMsg_GetSelectionStyle(render_view_host->GetRoutingID()));
+    render_view_host->Send(
+        new EwkViewMsg_GetSelectionStyle(render_view_host->GetRoutingID()));
   }
 }
 
@@ -1161,21 +1232,22 @@ void EWebView::OnQuerySelectionStyleReply(const SelectionStylePrams& params) {
   gfx::Rect left_rect, right_rect;
   if (GetSelectionController()) {
     GetSelectionController()->GetSelectionBounds(&left_rect, &right_rect);
-    _Ewk_Text_Style style_data(params, left_rect.origin(), right_rect.bottom_right());
+    _Ewk_Text_Style style_data(params, left_rect.origin(),
+                               right_rect.bottom_right());
     SmartCallback<EWebViewCallbacks::TextStyleState>().call(&style_data);
   }
 }
 
 SelectionControllerEfl* EWebView::GetSelectionController() const {
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
-  RenderWidgetHostViewEfl* view =
-      static_cast<RenderWidgetHostViewEfl*>(render_view_host->GetWidget()->GetView());
+  RenderWidgetHostViewEfl* view = static_cast<RenderWidgetHostViewEfl*>(
+      render_view_host->GetWidget()->GetView());
   return view ? view->GetSelectionController() : 0;
 }
 
 void EWebView::SelectLinkText(const gfx::Point& touch_point) {
-  float device_scale_factor = display::Screen::GetScreen()->
-      GetPrimaryDisplay().device_scale_factor();
+  float device_scale_factor =
+      display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
   render_view_host->Send(new ViewMsg_SelectLinkText(
       render_view_host->GetRoutingID(),
@@ -1183,7 +1255,8 @@ void EWebView::SelectLinkText(const gfx::Point& touch_point) {
                  touch_point.y() / device_scale_factor)));
 }
 
-bool EWebView::GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect) {
+bool EWebView::GetSelectionRange(Eina_Rectangle* left_rect,
+                                 Eina_Rectangle* right_rect) {
   if (left_rect && right_rect) {
     gfx::Rect left, right;
     if (GetSelectionController()) {
@@ -1209,8 +1282,9 @@ Eina_Bool EWebView::ClearSelection() {
   return EINA_FALSE;
 }
 
-_Ewk_Hit_Test* EWebView::RequestHitTestDataAt(int x, int y,
-    Ewk_Hit_Test_Mode mode) {
+_Ewk_Hit_Test* EWebView::RequestHitTestDataAt(int x,
+                                              int y,
+                                              Ewk_Hit_Test_Mode mode) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
   int view_x, view_y;
@@ -1219,33 +1293,35 @@ _Ewk_Hit_Test* EWebView::RequestHitTestDataAt(int x, int y,
   return RequestHitTestDataAtBlinkCoords(view_x, view_y, mode);
 }
 
-Eina_Bool EWebView::AsyncRequestHitTestDataAt(int x, int y,
+Eina_Bool EWebView::AsyncRequestHitTestDataAt(
+    int x,
+    int y,
     Ewk_Hit_Test_Mode mode,
     Ewk_View_Hit_Test_Request_Callback callback,
     void* user_data) {
   int view_x, view_y;
   EvasToBlinkCords(x, y, &view_x, &view_y);
   return AsyncRequestHitTestDataAtBlinkCords(
-      view_x,
-      view_y,
-      mode,
-      new WebViewAsyncRequestHitTestDataUserCallback(x, y, mode, callback, user_data));
+      view_x, view_y, mode, new WebViewAsyncRequestHitTestDataUserCallback(
+                                x, y, mode, callback, user_data));
 }
 
-Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(int x, int y,
+Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(
+    int x,
+    int y,
     Ewk_Hit_Test_Mode mode,
     Ewk_View_Hit_Test_Request_Callback callback,
     void* user_data) {
   return AsyncRequestHitTestDataAtBlinkCords(
-      x,
-      y,
-      mode,
-      new WebViewAsyncRequestHitTestDataUserCallback(x, y, mode, callback, user_data));
+      x, y, mode, new WebViewAsyncRequestHitTestDataUserCallback(
+                      x, y, mode, callback, user_data));
 }
 
-Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(int x, int y,
+Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(
+    int x,
+    int y,
     Ewk_Hit_Test_Mode mode,
-    WebViewAsyncRequestHitTestDataCallback *cb) {
+    WebViewAsyncRequestHitTestDataCallbackcb) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   DCHECK(cb);
 
@@ -1253,12 +1329,9 @@ Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(int x, int y,
 
   if (cb) {
     RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
-    content::RenderProcessHost* render_process_host =
-        web_contents_->GetRenderProcessHost();
     DCHECK(render_view_host);
-    DCHECK(render_process_host);
 
-    if (render_view_host && render_process_host) {
+    if (render_view_host) {
       render_view_host->Send(new EwkViewMsg_DoHitTestAsync(
           render_view_host->GetRoutingID(), x, y, mode, request_id));
       hit_test_callback_[request_id] = cb;
@@ -1272,7 +1345,8 @@ Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(int x, int y,
   return EINA_FALSE;
 }
 
-void EWebView::DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id) {
+void EWebView::DispatchAsyncHitTestData(const Hit_Test_Params& params,
+                                        int64_t request_id) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
   std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*>::iterator it =
@@ -1287,18 +1361,19 @@ void EWebView::DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t r
   hit_test_callback_.erase(it);
 }
 
-_Ewk_Hit_Test* EWebView::RequestHitTestDataAtBlinkCoords(int x, int y, Ewk_Hit_Test_Mode mode) {
+_Ewk_Hit_Test* EWebView::RequestHitTestDataAtBlinkCoords(
+    int x,
+    int y,
+    Ewk_Hit_Test_Mode mode) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
-  content::RenderProcessHost* render_process_host = web_contents_->GetRenderProcessHost();
   DCHECK(render_view_host);
-  DCHECK(render_process_host);
 
-  if (render_view_host && render_process_host && rwhv()) {
+  if (render_view_host) {
     // We wait on UI thread till hit test data is updated.
-    ScopedAllowWaitForLegacyWebViewApi allow_wait;
-    render_view_host->Send(new EwkViewMsg_DoHitTest(render_view_host->GetRoutingID(), x, y, mode));
+    render_view_host->Send(
+        new EwkViewMsg_DoHitTest(render_view_host->GetRoutingID(), x, y, mode));
     hit_test_completion_.Wait();
     return new _Ewk_Hit_Test(hit_test_params_);
   }
@@ -1313,14 +1388,14 @@ void EWebView::EvasToBlinkCords(int x, int y, int* view_x, int* view_y) {
 
   if (view_x) {
     *view_x = x - tmpX;
-    *view_x /= display::Screen::GetScreen()->
-        GetPrimaryDisplay().device_scale_factor();
+    *view_x /=
+        display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
   }
 
   if (view_y) {
     *view_y = y - tmpY;
-    *view_y /= display::Screen::GetScreen()->
-        GetPrimaryDisplay().device_scale_factor();
+    *view_y /=
+        display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
   }
 }
 
@@ -1330,14 +1405,13 @@ void EWebView::UpdateHitTestData(const Hit_Test_Params& params) {
   hit_test_completion_.Signal();
 }
 
-void EWebView::OnCopyFromBackingStore(bool success, const SkBitmap& bitmap) {
-}
+void EWebView::OnCopyFromBackingStore(bool success, const SkBitmap& bitmap) {}
 
 void EWebView::RenderViewCreated(RenderViewHost* render_view_host) {
   SendDelayedMessages(render_view_host);
   UpdateWebkitPreferencesEfl(render_view_host);
-  RenderWidgetHostViewEfl* view =
-      static_cast<RenderWidgetHostViewEfl*>(render_view_host->GetWidget()->GetView());
+  RenderWidgetHostViewEfl* view = static_cast<RenderWidgetHostViewEfl*>(
+      render_view_host->GetWidget()->GetView());
   if (view)
     view->SetEvasHandler(evas_event_handler_);
 
@@ -1352,15 +1426,21 @@ void EWebView::RenderViewCreated(RenderViewHost* render_view_host) {
 }
 
 void EWebView::SetOverrideEncoding(const std::string& encoding) {
+  // EWK_BRINGUP definition should be removed.
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   web_contents_->SetOverrideEncoding(encoding);
+#endif  // !defined(EWK_BRINGUP)
 }
 
-void EWebView::SetQuotaPermissionRequestCallback(Ewk_Quota_Permission_Request_Callback callback, void *user_data) {
+void EWebView::SetQuotaPermissionRequestCallback(
+    Ewk_Quota_Permission_Request_Callback callback,
+    void* user_data) {
   quota_request_callback_.Set(callback, user_data);
 }
 
-void EWebView::InvokeQuotaPermissionRequest(_Ewk_Quota_Permission_Request* request,
-                                            const content::QuotaPermissionContext::PermissionCallback& cb) {
+void EWebView::InvokeQuotaPermissionRequest(
+    _Ewk_Quota_Permission_Request* request,
+    const content::QuotaPermissionContext::PermissionCallback& cb) {
   quota_permission_request_map_[request] = cb;
   request->setView(evas_object());
   if (quota_request_callback_.IsCallbackSet())
@@ -1369,32 +1449,42 @@ void EWebView::InvokeQuotaPermissionRequest(_Ewk_Quota_Permission_Request* reque
     QuotaRequestCancel(request);
 }
 
-void EWebView::QuotaRequestReply(const _Ewk_Quota_Permission_Request *request,
+void EWebView::QuotaRequestReply(const _Ewk_Quota_Permission_Requestrequest,
                                  bool allow) {
-  DCHECK(quota_permission_request_map_.find(request) != quota_permission_request_map_.end());
+  DCHECK(quota_permission_request_map_.find(request) !=
+         quota_permission_request_map_.end());
 
-  QuotaPermissionContext::PermissionCallback cb = quota_permission_request_map_[request];
+  QuotaPermissionContext::PermissionCallback cb =
+      quota_permission_request_map_[request];
 
   if (allow)
-    QuotaPermissionContextEfl::DispatchCallback(cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_ALLOW);
+    QuotaPermissionContextEfl::DispatchCallback(
+        cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_ALLOW);
   else
-    QuotaPermissionContextEfl::DispatchCallback(cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_DISALLOW);
+    QuotaPermissionContextEfl::DispatchCallback(
+        cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_DISALLOW);
 
   quota_permission_request_map_.erase(request);
   delete request;
 }
 
-void EWebView::QuotaRequestCancel(const _Ewk_Quota_Permission_Request *request) {
-  DCHECK(quota_permission_request_map_.find(request) != quota_permission_request_map_.end());
+void EWebView::QuotaRequestCancel(
+    const _Ewk_Quota_Permission_Request* request) {
+  DCHECK(quota_permission_request_map_.find(request) !=
+         quota_permission_request_map_.end());
 
-  QuotaPermissionContext::PermissionCallback cb = quota_permission_request_map_[request];
-  QuotaPermissionContextEfl::DispatchCallback(cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
+  QuotaPermissionContext::PermissionCallback cb =
+      quota_permission_request_map_[request];
+  QuotaPermissionContextEfl::DispatchCallback(
+      cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
   quota_permission_request_map_.erase(request);
   delete request;
 }
 
 bool EWebView::GetLinkMagnifierEnabled() const {
-  return web_contents_->GetMutableRendererPrefs()->tap_multiple_targets_strategy == TAP_MULTIPLE_TARGETS_STRATEGY_POPUP;
+  return web_contents_->GetMutableRendererPrefs()
+             ->tap_multiple_targets_strategy ==
+         TAP_MULTIPLE_TARGETS_STRATEGY_POPUP;
 }
 
 void EWebView::SetLinkMagnifierEnabled(bool enabled) {
@@ -1404,7 +1494,8 @@ void EWebView::SetLinkMagnifierEnabled(bool enabled) {
   web_contents_->GetRenderViewHost()->SyncRendererPrefs();
 }
 
-bool EWebView::GetSnapshotAsync(Eina_Rectangle rect,
+bool EWebView::GetSnapshotAsync(
+    Eina_Rectangle rect,
     Ewk_Web_App_Screenshot_Captured_Callback callback,
     void* user_data) {
   if (!rwhv())
@@ -1432,7 +1523,7 @@ Evas_Object* EWebView::GetSnapshot(Eina_Rectangle rect) {
 
   Evas_GL_API* gl_api = rwhv()->evasGlApi();
   DCHECK(gl_api);
-  int size = width * height *  sizeof(GLuint);
+  int size = width * height * sizeof(GLuint);
 
   GLuint* tmp = (GLuint*)malloc(size);
   if (!tmp)
@@ -1444,7 +1535,8 @@ Evas_Object* EWebView::GetSnapshot(Eina_Rectangle rect) {
     return NULL;
   }
 
-  gl_api->glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, (GLubyte*)bits);
+  gl_api->glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE,
+                       (GLubyte*)bits);
 
   // flip the Y axis and change color format from RGBA to BGRA
   int i, j, idx1, idx2;
@@ -1454,7 +1546,8 @@ Evas_Object* EWebView::GetSnapshot(Eina_Rectangle rect) {
       idx1 = (j * width) + i;
       idx2 = ((height - 1) - j) * width + i;
       d = bits[idx1];
-      tmp[idx2] = ((d & 0x000000ff) << 16) + ((d & 0x00ff0000) >> 16) + ((d & 0xff00ff00));
+      tmp[idx2] = ((d & 0x000000ff) << 16) + ((d & 0x00ff0000) >> 16) +
+                  ((d & 0xff00ff00));
     }
   }
 
@@ -1501,52 +1594,66 @@ _Ewk_History* EWebView::GetBackForwardHistory() const {
   return new _Ewk_History(web_contents_->GetController());
 }
 
-bool EWebView::WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData) {
-  RenderViewHost *renderViewHost = web_contents_->GetRenderViewHost();
+bool EWebView::WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback,
+                                void* userData) {
+  RenderViewHost* renderViewHost = web_contents_->GetRenderViewHost();
   if (!renderViewHost) {
     return false;
   }
-  WebApplicationCapableGetCallback *cb = new WebApplicationCapableGetCallback(callback, userData);
+  WebApplicationCapableGetCallback* cb =
+      new WebApplicationCapableGetCallback(callback, userData);
   int callbackId = web_app_capable_get_callback_map_.Add(cb);
-  return renderViewHost->Send(new EwkViewMsg_WebAppCapableGet(renderViewHost->GetRoutingID(), callbackId));
+  return renderViewHost->Send(new EwkViewMsg_WebAppCapableGet(
+      renderViewHost->GetRoutingID(), callbackId));
 }
 
-bool EWebView::WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData) {
+bool EWebView::WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback,
+                                void* userData) {
   RenderViewHost* renderViewHost = web_contents_->GetRenderViewHost();
   if (!renderViewHost) {
     return false;
   }
-  WebApplicationIconUrlGetCallback *cb = new WebApplicationIconUrlGetCallback(callback, userData);
+  WebApplicationIconUrlGetCallback* cb =
+      new WebApplicationIconUrlGetCallback(callback, userData);
   int callbackId = web_app_icon_url_get_callback_map_.Add(cb);
-  return renderViewHost->Send(new EwkViewMsg_WebAppIconUrlGet(renderViewHost->GetRoutingID(), callbackId));
+  return renderViewHost->Send(new EwkViewMsg_WebAppIconUrlGet(
+      renderViewHost->GetRoutingID(), callbackId));
 }
 
-bool EWebView::WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData) {
+bool EWebView::WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback,
+                                 void* userData) {
   RenderViewHost* renderViewHost = web_contents_->GetRenderViewHost();
   if (!renderViewHost) {
     return false;
   }
-  WebApplicationIconUrlsGetCallback *cb = new WebApplicationIconUrlsGetCallback(callback, userData);
+  WebApplicationIconUrlsGetCallback* cb =
+      new WebApplicationIconUrlsGetCallback(callback, userData);
   int callbackId = web_app_icon_urls_get_callback_map_.Add(cb);
-  return renderViewHost->Send(new EwkViewMsg_WebAppIconUrlsGet(renderViewHost->GetRoutingID(), callbackId));
+  return renderViewHost->Send(new EwkViewMsg_WebAppIconUrlsGet(
+      renderViewHost->GetRoutingID(), callbackId));
 }
 
 void EWebView::InvokeWebAppCapableGetCallback(bool capable, int callbackId) {
-  WebApplicationCapableGetCallback *callback = web_app_capable_get_callback_map_.Lookup(callbackId);
+  WebApplicationCapableGetCallback* callback =
+      web_app_capable_get_callback_map_.Lookup(callbackId);
   if (!callback)
     return;
   callback->Run(capable);
 }
 
-void EWebView::InvokeWebAppIconUrlGetCallback(const std::string& iconUrl, int callbackId) {
-  WebApplicationIconUrlGetCallback *callback = web_app_icon_url_get_callback_map_.Lookup(callbackId);
+void EWebView::InvokeWebAppIconUrlGetCallback(const std::string& iconUrl,
+                                              int callbackId) {
+  WebApplicationIconUrlGetCallback* callback =
+      web_app_icon_url_get_callback_map_.Lookup(callbackId);
   if (!callback)
     return;
   callback->Run(iconUrl);
 }
 
-void EWebView::InvokeWebAppIconUrlsGetCallback(const StringMap &iconUrls, int callbackId) {
-  WebApplicationIconUrlsGetCallback *callback = web_app_icon_urls_get_callback_map_.Lookup(callbackId);
+void EWebView::InvokeWebAppIconUrlsGetCallback(const StringMap& iconUrls,
+                                               int callbackId) {
+  WebApplicationIconUrlsGetCallback* callback =
+      web_app_icon_urls_get_callback_map_.Lookup(callbackId);
   if (!callback) {
     return;
   }
@@ -1554,7 +1661,8 @@ void EWebView::InvokeWebAppIconUrlsGetCallback(const StringMap &iconUrls, int ca
 }
 
 void EWebView::SetNotificationPermissionCallback(
-    Ewk_View_Notification_Permission_Callback callback, void *user_data) {
+    Ewk_View_Notification_Permission_Callback callback,
+    void* user_data) {
   notification_permission_callback_.Set(callback, user_data);
 }
 
@@ -1563,42 +1671,56 @@ bool EWebView::IsNotificationPermissionCallbackSet() const {
 }
 
 bool EWebView::InvokeNotificationPermissionCallback(
-    Ewk_Notification_Permission_Request *request) {
+    Ewk_Notification_Permission_Requestrequest) {
   Eina_Bool ret = EINA_FALSE;
   notification_permission_callback_.Run(evas_object_, request, &ret);
   return ret;
 }
 
-int EWebView::SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) {
-  EwkViewPlainTextGetCallback* view_plain_text_callback_ptr = new EwkViewPlainTextGetCallback;
+int EWebView::SetEwkViewPlainTextGetCallback(
+    Ewk_View_Plain_Text_Get_Callback callback,
+    void* user_data) {
+  EwkViewPlainTextGetCallback* view_plain_text_callback_ptr =
+      new EwkViewPlainTextGetCallback;
   view_plain_text_callback_ptr->Set(callback, user_data);
   return plain_text_get_callback_map_.Add(view_plain_text_callback_ptr);
 }
 
-bool EWebView::PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) {
+bool EWebView::PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback,
+                            void* user_data) {
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
   if (!render_view_host)
     return false;
-  int plain_text_get_callback_id = SetEwkViewPlainTextGetCallback(callback, user_data);
-  return render_view_host->Send(new EwkViewMsg_PlainTextGet(render_view_host->GetRoutingID(), plain_text_get_callback_id));
+  int plain_text_get_callback_id =
+      SetEwkViewPlainTextGetCallback(callback, user_data);
+  return render_view_host->Send(new EwkViewMsg_PlainTextGet(
+      render_view_host->GetRoutingID(), plain_text_get_callback_id));
 }
 
-void EWebView::InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id) {
-  EwkViewPlainTextGetCallback* view_plain_text_callback_invoke_ptr = plain_text_get_callback_map_.Lookup(plain_text_get_callback_id);
+void EWebView::InvokePlainTextGetCallback(const std::string& content_text,
+                                          int plain_text_get_callback_id) {
+  EwkViewPlainTextGetCallback* view_plain_text_callback_invoke_ptr =
+      plain_text_get_callback_map_.Lookup(plain_text_get_callback_id);
   view_plain_text_callback_invoke_ptr->Run(evas_object(), content_text.c_str());
   plain_text_get_callback_map_.Remove(plain_text_get_callback_id);
 }
 
-void EWebView::SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data) {
+void EWebView::SetViewGeolocationPermissionCallback(
+    Ewk_View_Geolocation_Permission_Callback callback,
+    void* user_data) {
   geolocation_permission_cb_.Set(callback, user_data);
 }
 
-bool EWebView::InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* permission_context, Eina_Bool* callback_result) {
-  return geolocation_permission_cb_.Run(evas_object_, permission_context, callback_result);
+bool EWebView::InvokeViewGeolocationPermissionCallback(
+    _Ewk_Geolocation_Permission_Request* permission_context,
+    Eina_Bool* callback_result) {
+  return geolocation_permission_cb_.Run(evas_object_, permission_context,
+                                        callback_result);
 }
 
 void EWebView::SetViewUserMediaPermissionCallback(
-    Ewk_View_User_Media_Permission_Callback callback, void* user_data) {
+    Ewk_View_User_Media_Permission_Callback callback,
+    void* user_data) {
   user_media_permission_cb_.Set(callback, user_data);
 }
 
@@ -1606,16 +1728,17 @@ bool EWebView::InvokeViewUserMediaPermissionCallback(
     _Ewk_User_Media_Permission_Request* permission_context,
     Eina_Bool* callback_result) {
   return user_media_permission_cb_.Run(evas_object_, permission_context,
-      callback_result);
+                                       callback_result);
 }
 
 void EWebView::SetViewUnfocusAllowCallback(
-    Ewk_View_Unfocus_Allow_Callback callback, void* user_data) {
+    Ewk_View_Unfocus_Allow_Callback callback,
+    void* user_data) {
   unfocus_allow_cb_.Set(callback, user_data);
 }
 
-bool EWebView::InvokeViewUnfocusAllowCallback(
-    Ewk_Unfocus_Direction direction, Eina_Bool* callback_result) {
+bool EWebView::InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction,
+                                              Eina_Bool* callback_result) {
   return unfocus_allow_cb_.Run(evas_object_, direction, callback_result);
 }
 
@@ -1632,7 +1755,7 @@ double EWebView::GetProgressValue() {
 }
 
 const char* EWebView::GetTitle() {
-  title_ = UTF16ToUTF8(web_contents_->GetTitle());
+  title_ = base::UTF16ToUTF8(web_contents_->GetTitle());
   return title_.c_str();
 }
 
@@ -1641,11 +1764,13 @@ bool EWebView::SaveAsPdf(int width, int height, const std::string& filename) {
   if (!render_view_host)
     return false;
 
-  return render_view_host->Send(new EwkViewMsg_PrintToPdf(render_view_host->GetRoutingID(),
-      width, height, base::FilePath(filename)));
+  return render_view_host->Send(
+      new EwkViewMsg_PrintToPdf(render_view_host->GetRoutingID(), width, height,
+                                base::FilePath(filename)));
 }
 
-bool EWebView::GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data) {
+bool EWebView::GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback,
+                            void* user_data) {
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
   if (!render_view_host)
     return false;
@@ -1653,17 +1778,21 @@ bool EWebView::GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* use
   MHTMLCallbackDetails* callback_details = new MHTMLCallbackDetails;
   callback_details->Set(callback, user_data);
   int mhtml_callback_id = mhtml_callback_map_.Add(callback_details);
-  return render_view_host->Send(new EwkViewMsg_GetMHTMLData(render_view_host->GetRoutingID(), mhtml_callback_id));
+  return render_view_host->Send(new EwkViewMsg_GetMHTMLData(
+      render_view_host->GetRoutingID(), mhtml_callback_id));
 }
 
-void EWebView::OnMHTMLContentGet(const std::string& mhtml_content, int callback_id) {
-  MHTMLCallbackDetails* callback_details = mhtml_callback_map_.Lookup(callback_id);
+void EWebView::OnMHTMLContentGet(const std::string& mhtml_content,
+                                 int callback_id) {
+  MHTMLCallbackDetails* callback_details =
+      mhtml_callback_map_.Lookup(callback_id);
   callback_details->Run(evas_object(), mhtml_content.c_str());
   mhtml_callback_map_.Remove(callback_id);
 }
 
 bool EWebView::IsFullscreen() {
-  return web_contents_delegate_->IsFullscreenForTabOrPending(web_contents_.get());
+  return web_contents_delegate_->IsFullscreenForTabOrPending(
+      web_contents_.get());
 }
 
 void EWebView::ExitFullscreen() {
@@ -1685,34 +1814,43 @@ inline JavaScriptDialogManagerEfl* EWebView::GetJavaScriptDialogManagerEfl() {
       web_contents_delegate_->GetJavaScriptDialogManager(web_contents_.get()));
 }
 
-void EWebView::SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data) {
+void EWebView::SetJavaScriptAlertCallback(
+    Ewk_View_JavaScript_Alert_Callback callback,
+    void* user_data) {
   GetJavaScriptDialogManagerEfl()->SetAlertCallback(callback, user_data);
 }
 
 void EWebView::JavaScriptAlertReply() {
-  GetJavaScriptDialogManagerEfl()->ExecuteDialogClosedCallBack(true, std::string());
+  GetJavaScriptDialogManagerEfl()->ExecuteDialogClosedCallBack(true,
+                                                               std::string());
   SmartCallback<EWebViewCallbacks::PopupReplyWaitFinish>().call(0);
 }
 
-void EWebView::SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data) {
+void EWebView::SetJavaScriptConfirmCallback(
+    Ewk_View_JavaScript_Confirm_Callback callback,
+    void* user_data) {
   GetJavaScriptDialogManagerEfl()->SetConfirmCallback(callback, user_data);
 }
 
 void EWebView::JavaScriptConfirmReply(bool result) {
-  GetJavaScriptDialogManagerEfl()->ExecuteDialogClosedCallBack(result, std::string());
+  GetJavaScriptDialogManagerEfl()->ExecuteDialogClosedCallBack(result,
+                                                               std::string());
   SmartCallback<EWebViewCallbacks::PopupReplyWaitFinish>().call(0);
 }
 
-void EWebView::SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data) {
+void EWebView::SetJavaScriptPromptCallback(
+    Ewk_View_JavaScript_Prompt_Callback callback,
+    void* user_data) {
   GetJavaScriptDialogManagerEfl()->SetPromptCallback(callback, user_data);
 }
 
 void EWebView::JavaScriptPromptReply(const char* result) {
-  GetJavaScriptDialogManagerEfl()->ExecuteDialogClosedCallBack(true, (std::string(result)));
+  GetJavaScriptDialogManagerEfl()->ExecuteDialogClosedCallBack(
+      true, (std::string(result)));
   SmartCallback<EWebViewCallbacks::PopupReplyWaitFinish>().call(0);
 }
 
-void EWebView::GetPageScaleRange(double *min_scale, double *max_scale) {
+void EWebView::GetPageScaleRange(double* min_scale, double* max_scale) {
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
   if (!render_view_host) {
     if (min_scale)
@@ -1734,13 +1872,14 @@ void EWebView::SetDrawsTransparentBackground(bool enabled) {
   if (!render_view_host)
     return;
 
-  render_view_host->Send(new EwkViewMsg_SetDrawsTransparentBackground(render_view_host->GetRoutingID(), enabled));
+  render_view_host->Send(new EwkViewMsg_SetDrawsTransparentBackground(
+      render_view_host->GetRoutingID(), enabled));
 }
 
-void EWebView::GetSessionData(const char **data, unsigned *length) const {
+void EWebView::GetSessionData(const char** data, unsigned* length) const {
   static const int MAX_SESSION_ENTRY_SIZE = std::numeric_limits<int>::max();
 
-  NavigationController &navigationController = web_contents_->GetController();
+  NavigationControllernavigationController = web_contents_->GetController();
   base::Pickle sessionPickle;
   const int itemCount = navigationController.GetEntryCount();
 
@@ -1748,18 +1887,19 @@ void EWebView::GetSessionData(const char **data, unsigned *length) const {
   sessionPickle.WriteInt(navigationController.GetCurrentEntryIndex());
 
   for (int i = 0; i < itemCount; i++) {
-    NavigationEntry *navigationEntry = navigationController.GetEntryAtIndex(i);
+    NavigationEntrynavigationEntry = navigationController.GetEntryAtIndex(i);
     sessions::SerializedNavigationEntry serializedEntry =
-      sessions::ContentSerializedNavigationBuilder::FromNavigationEntry(i, *navigationEntry);
+        sessions::ContentSerializedNavigationBuilder::FromNavigationEntry(
+            i, *navigationEntry);
     serializedEntry.WriteToPickle(MAX_SESSION_ENTRY_SIZE, &sessionPickle);
   }
 
-  *data = static_cast<char *>(malloc(sizeof(char) * sessionPickle.size()));
-  memcpy(const_cast<char *>(*data), sessionPickle.data(), sessionPickle.size());
+  *data = static_cast<char*>(malloc(sizeof(char) * sessionPickle.size()));
+  memcpy(const_cast<char*>(*data), sessionPickle.data(), sessionPickle.size());
   *length = sessionPickle.size();
 }
 
-bool EWebView::RestoreFromSessionData(const char *data, unsigned length) {
+bool EWebView::RestoreFromSessionData(const chardata, unsigned length) {
   base::Pickle sessionPickle(data, length);
   base::PickleIterator pickleIterator(sessionPickle);
   int entryCount;
@@ -1784,7 +1924,7 @@ bool EWebView::RestoreFromSessionData(const char *data, unsigned length) {
       sessions::ContentSerializedNavigationBuilder::ToNavigationEntries(
           serializedEntries, context()->browser_context());
 
-  NavigationController &navigationController = web_contents_->GetController();
+  NavigationControllernavigationController = web_contents_->GetController();
 
   if (currentEntry < 0)
     currentEntry = 0;
@@ -1792,21 +1932,26 @@ bool EWebView::RestoreFromSessionData(const char *data, unsigned length) {
   if (currentEntry >= static_cast<int>(scopedEntries.size()))
     currentEntry = scopedEntries.size() - 1;
 
-  navigationController.Restore(currentEntry,
-                               NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY,
-                               &scopedEntries);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
+  navigationController.Restore(
+      currentEntry, NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY,
+      &scopedEntries);
+#endif  // !defined(EWK_BRINGUP)
   return true;
 }
 
 void EWebView::SetBrowserFont() {
   RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
   if (render_view_host)
-    render_view_host->Send(new EwkViewMsg_SetBrowserFont(render_view_host->GetRoutingID()));
+    render_view_host->Send(
+        new EwkViewMsg_SetBrowserFont(render_view_host->GetRoutingID()));
 }
 
 void EWebView::SetCertificatePem(const std::string& certificate) {
   pem_certificate_ = certificate;
-  SmartCallback<EWebViewCallbacks::SetCertificatePem>().call(pem_certificate_.c_str());
+  SmartCallback<EWebViewCallbacks::SetCertificatePem>().call(
+      pem_certificate_.c_str());
 }
 
 bool EWebView::IsDragging() const {
@@ -1816,10 +1961,11 @@ bool EWebView::IsDragging() const {
 void EWebView::ShowFileChooser(content::RenderFrameHost* render_frame_host,
                                const content::FileChooserParams& params) {
 #if defined(OS_TIZEN_MOBILE)
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (params.capture) {
     const std::string capture_types[] = {"video/*", "audio/*", "image/*"};
-    unsigned int capture_types_num = sizeof(capture_types)/sizeof(*capture_types);
+    unsigned int capture_types_num =
+        sizeof(capture_types) / sizeof(*capture_types);
     for (unsigned int i = 0; i < capture_types_num; ++i) {
       for (unsigned int j = 0; j < params.accept_types.size(); ++j) {
         if (UTF16ToUTF8(params.accept_types[j]) == capture_types[i]) {
@@ -1832,7 +1978,8 @@ void EWebView::ShowFileChooser(content::RenderFrameHost* render_frame_host,
   }
 #endif
 #endif
-  file_chooser_.reset(new content::FileChooserControllerEfl(render_frame_host, &params));
+  file_chooser_.reset(
+      new content::FileChooserControllerEfl(render_frame_host, &params));
   file_chooser_->Open();
 }
 
@@ -1841,7 +1988,8 @@ void EWebView::SetViewMode(blink::WebViewMode view_mode) {
   if (!render_view_host)
     return;
 
-  IPC::Message* message = new ViewMsg_SetViewMode(render_view_host->GetRoutingID(), view_mode);
+  IPC::Message* message =
+      new ViewMsg_SetViewMode(render_view_host->GetRoutingID(), view_mode);
   if (render_view_host->IsRenderViewLive()) {
     render_view_host->Send(message);
   } else {
@@ -1872,8 +2020,8 @@ bool EWebView::SetColorPickerColor(int r, int g, int b, int a) {
   return true;
 }
 
-void EWebView::InputPickerShow(ui::TextInputType input_type, double input_value)
-{
+void EWebView::InputPickerShow(ui::TextInputType input_type,
+                               double input_value) {
   inputPicker_.reset(new InputPicker(*this));
   inputPicker_->showDatePicker(input_type, input_value);
 }
@@ -1882,7 +2030,7 @@ void EWebView::LoadNotFoundErrorPage(const std::string& invalidUrl) {
   RenderFrameHost* render_frame_host = web_contents_->GetMainFrame();
   if (render_frame_host)
     render_frame_host->Send(new EwkFrameMsg_LoadNotFoundErrorPage(
-      render_frame_host->GetRoutingID(), invalidUrl));
+        render_frame_host->GetRoutingID(), invalidUrl));
 }
 
 std::string EWebView::GetPlatformLocale() {
@@ -1913,13 +2061,14 @@ void EWebView::InvokeWebProcessCrashedCallback() {
   bool callback_handled = false;
   SmartCallback<EWebViewCallbacks::WebProcessCrashed>().call(&callback_handled);
   if (!callback_handled)
-    LoadHTMLString(kRendererCrashedHTMLMessage, NULL, last_url.possibly_invalid_spec().c_str());
+    LoadHTMLString(kRendererCrashedHTMLMessage, NULL,
+                   last_url.possibly_invalid_spec().c_str());
 }
 
 void EWebView::HandleRendererProcessCrash() {
   BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-      base::Bind(&EWebView::InvokeWebProcessCrashedCallback,
-                 base::Unretained(this)));
+                          base::Bind(&EWebView::InvokeWebProcessCrashedCallback,
+                                     base::Unretained(this)));
 }
 
 void EWebView::InitializeContent() {
@@ -1930,8 +2079,8 @@ void EWebView::InitializeContent() {
   if (!new_contents) {
     WebContents::CreateParams params(context_->browser_context());
     params.initial_size = gfx::Size(width, height);
-    web_contents_.reset(new WebContentsImplEfl(
-        context_->browser_context(), this));
+    web_contents_.reset(
+        new WebContentsImplEfl(context_->browser_context(), this));
     static_cast<WebContentsImpl*>(web_contents_.get())->Init(params);
     VLOG(1) << "Initial WebContents size: " << params.initial_size.ToString();
   } else {
@@ -1956,7 +2105,8 @@ void EWebView::InitializeContent() {
     //
     // void OnNewWindowRequest(void *data, Evas_Object*, void* out_view) {
     //   (..)
-    //   EvasObject* new_web_view = ewk_view_add_with_context(GetEvas(), ewk_context_new());
+    //   EvasObject* new_web_view = ewk_view_add_with_context(GetEvas(),
+    //   ewk_context_new());
     //   *static_cast<Evas_Object**>(out_view) = new_web_view;
     //   (..)
     // }
@@ -1966,25 +2116,26 @@ void EWebView::InitializeContent() {
     // than the one the new WebContents object will hold.
     //
     // CHECK below aims at catching misuse of this API.
-    bool should_crash =
-        context_->GetImpl()->browser_context() != web_contents_->GetBrowserContext();
+    bool should_crash = context_->GetImpl()->browser_context() !=
+                        web_contents_->GetBrowserContext();
     if (should_crash) {
-      CHECK(false) << "BrowserContext of new WebContents does not match EWebView's. "
-                   << "Please see 'ewk_view_add*' documentation. "
-                   << "Aborting execution ...";
+      CHECK(false)
+          << "BrowserContext of new WebContents does not match EWebView's. "
+          << "Please see 'ewk_view_add*' documentation. "
+          << "Aborting execution ...";
     }
   }
   web_contents_delegate_.reset(new WebContentsDelegateEfl(this));
   web_contents_->SetDelegate(web_contents_delegate_.get());
   GetWebContentsViewEfl()->SetEflDelegate(
       new WebContentsViewEflDelegateEwk(this));
-  WebContentsImplEfl* wc_efl = static_cast<WebContentsImplEfl*>(
-      web_contents_.get());
+  WebContentsImplEfl* wc_efl =
+      static_cast<WebContentsImplEfl*>(web_contents_.get());
   wc_efl->SetEflDelegate(new WebContentsEflDelegateEwk(this));
-  back_forward_list_.reset(new _Ewk_Back_Forward_List(
-      web_contents_->GetController()));
   back_forward_list_.reset(
-    new _Ewk_Back_Forward_List(web_contents_->GetController()));
+      new _Ewk_Back_Forward_List(web_contents_->GetController()));
+  back_forward_list_.reset(
+      new _Ewk_Back_Forward_List(web_contents_->GetController()));
 
   permission_popup_manager_.reset(new PermissionPopupManager(evas_object_));
 
@@ -1996,18 +2147,18 @@ void EWebView::InitializeContent() {
 void EWebView::cameraResultCb(service_h request,
                               service_h reply,
                               service_result_e result,
-                              void* data)
-{
+                              void* data) {
   EWebView* webview = static_cast<EWebView*>(data);
-  RenderViewHost* render_view_host = webview->web_contents_->GetRenderViewHost();
+  RenderViewHost* render_view_host =
+      webview->web_contents_->GetRenderViewHost();
   if (result == SERVICE_RESULT_SUCCEEDED) {
     int ret = -1;
     char** filesarray;
     int number;
-    ret =service_get_extra_data_array(reply, SERVICE_DATA_SELECTED,
-      &filesarray,&number);
+    ret = service_get_extra_data_array(reply, SERVICE_DATA_SELECTED,
+                                       &filesarray, &number);
     if (filesarray) {
-      for(int i =0; i< number;i++) {
+      for (int i = 0; i < number; i++) {
         std::vector<ui::SelectedFileInfo> files;
         if (!render_view_host) {
           return;
@@ -2015,26 +2166,25 @@ void EWebView::cameraResultCb(service_h request,
         if (filesarray[i]) {
           GURL url(filesarray[i]);
           if (!url.is_valid()) {
-            base::FilePath path(url.SchemeIsFile() ? url.path() :
-              filesarray[i]);
+            base::FilePath path(url.SchemeIsFile() ? url.path()
+                                                   : filesarray[i]);
             files.push_back(ui::SelectedFileInfo(path, base::FilePath()));
           }
         }
         render_view_host->FilesSelectedInChooser(files,
-          webview->filechooser_mode_);
+                                                 webview->filechooser_mode_);
       }
     }
   } else {
     std::vector<ui::SelectedFileInfo> files;
     if (render_view_host) {
       render_view_host->FilesSelectedInChooser(files,
-        webview->filechooser_mode_);
+                                               webview->filechooser_mode_);
     }
   }
 }
 
-bool EWebView::LaunchCamera(base::string16 mimetype)
-{
+bool EWebView::LaunchCamera(base::string16 mimetype) {
   service_h svcHandle = 0;
   if (service_create(&svcHandle) < 0 || !svcHandle) {
     LOG(ERROR) << __FUNCTION__ << " Service Creation Failed ";
@@ -2055,9 +2205,11 @@ bool EWebView::LaunchCamera(base::string16 mimetype)
 }
 #endif
 
-void EWebView::UrlRequestSet(const char* url,
+void EWebView::UrlRequestSet(
+    const char* url,
     content::NavigationController::LoadURLType loadtype,
-    Eina_Hash* headers, const char* body) {
+    Eina_Hash* headers,
+    const char* body) {
   content::NavigationController::LoadURLParams params =
       content::NavigationController::LoadURLParams(GURL(url));
   params.load_type = loadtype;
@@ -2065,8 +2217,8 @@ void EWebView::UrlRequestSet(const char* url,
 
   if (body) {
     std::string s(body);
-    params.post_data = content::ResourceRequestBody::CreateFromBytes(
-        s.data(), s.size());
+    params.post_data =
+        content::ResourceRequestBody::CreateFromBytes(s.data(), s.size());
   }
 
   net::HttpRequestHeaders header;
@@ -2080,7 +2232,7 @@ void EWebView::UrlRequestSet(const char* url,
         base::StringPiece name = static_cast<const char*>(t->key);
         base::StringPiece value = value_str;
         header.SetHeader(name, value);
-        //net::HttpRequestHeaders.ToString() returns string with newline
+        // net::HttpRequestHeaders.ToString() returns string with newline
         params.extra_headers += header.ToString();
       }
     }
@@ -2140,12 +2292,13 @@ void EWebView::HandleTapGestureForSelection(bool is_content_editable) {
 }
 
 void EWebView::HandleZoomGesture(blink::WebGestureEvent& event) {
-  if (event.type == blink::WebInputEvent::GestureDoubleTap ||
-      event.type == blink::WebInputEvent::GesturePinchBegin) {
+  blink::WebInputEvent::Type event_type = event.GetType();
+  if (event_type == blink::WebInputEvent::kGestureDoubleTap ||
+      event_type == blink::WebInputEvent::kGesturePinchBegin) {
     SmartCallback<EWebViewCallbacks::ZoomStarted>().call();
   }
-  if (event.type == blink::WebInputEvent::GestureDoubleTap ||
-      event.type == blink::WebInputEvent::GesturePinchEnd) {
+  if (event_type == blink::WebInputEvent::kGestureDoubleTap ||
+      event_type == blink::WebInputEvent::kGesturePinchEnd) {
     SmartCallback<EWebViewCallbacks::ZoomFinished>().call();
   }
 }
@@ -2154,12 +2307,15 @@ void EWebView::SendDelayedMessages(RenderViewHost* render_view_host) {
   DCHECK(render_view_host);
 
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
-    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-        base::Bind(&EWebView::SendDelayedMessages, base::Unretained(this), render_view_host));
+    BrowserThread::PostTask(
+        BrowserThread::UI, FROM_HERE,
+        base::Bind(&EWebView::SendDelayedMessages, base::Unretained(this),
+                   render_view_host));
     return;
   }
 
-  for (auto iter = delayed_messages_.begin(); iter != delayed_messages_.end(); ++iter) {
+  for (auto iter = delayed_messages_.begin(); iter != delayed_messages_.end();
+       ++iter) {
     IPC::Message* message = *iter;
     message->set_routing_id(render_view_host->GetRoutingID());
     render_view_host->Send(message);
index f39e90861ee3a73aef925df2683cbc6f2b9709c8..e54b6564cea73ed16c06890a9ab9f5f8bea0e725 100644 (file)
@@ -6,8 +6,9 @@
 #define EWEB_VIEW_H
 
 #if defined(OS_TIZEN_MOBILE)
-#if !defined(EWK_BRINGUP)
-// FIXME: appfw/app_service.h is no more in Tizen 2.3, figure out what to include instead.
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: appfw/app_service.h is no more in Tizen 2.3, figure out what to
+// include instead.
 #include <appcore-agent/service_app.h>
 #endif
 #include <vector>
@@ -19,7 +20,7 @@
 #include <locale.h>
 
 #include "base/callback.h"
-#include "base/id_map.h"
+#include "base/containers/id_map.h"
 #include "base/synchronization/waitable_event.h"
 #include "browser/inputpicker/InputPicker.h"
 #include "browser/selectpicker/popup_picker.h"
@@ -52,6 +53,7 @@
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/size.h"
 #include "web_contents_delegate_efl.h"
+#include "third_party/blink/public/web/WebViewModeEnums.h"
 
 namespace content {
 class RenderFrameHost;
@@ -80,11 +82,11 @@ class WebViewCallback {
     user_data_ = data;
   }
 
-  bool IsCallbackSet() const {
-    return callback_;
-  }
+  bool IsCallbackSet() const { return callback_; }
 
-  Eina_Bool Run(Evas_Object* webview, CallbackParameter param, Eina_Bool* callback_result) {
+  Eina_Bool Run(Evas_Object* webview,
+                CallbackParameter param,
+                Eina_Bool* callback_result) {
     CHECK(callback_result);
     if (IsCallbackSet()) {
       *callback_result = callback_(webview, param, user_data_);
@@ -105,10 +107,10 @@ class WebViewCallback {
 
 class WebApplicationIconUrlGetCallback {
  public:
-  WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func, void *user_data)
-    : func_(func), user_data_(user_data)
-  {}
-  void Run(const std::string &url) {
+  WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func,
+                                   void* user_data)
+      : func_(func), user_data_(user_data) {}
+  void Run(const std::stringurl) {
     if (func_) {
       (func_)(url.c_str(), user_data_);
     }
@@ -116,19 +118,21 @@ class WebApplicationIconUrlGetCallback {
 
  private:
   Ewk_Web_App_Icon_URL_Get_Callback func_;
-  void *user_data_;
+  voiduser_data_;
 };
 
 class WebApplicationIconUrlsGetCallback {
  public:
-  WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func, void *user_data)
-    : func_(func), user_data_(user_data)
-  {}
-  void Run(const std::map<std::string, std::string> &urls) {
+  WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func,
+                                    void* user_data)
+      : func_(func), user_data_(user_data) {}
+  void Run(const std::map<std::string, std::string>urls) {
     if (func_) {
-      Eina_List *list = NULL;
-      for (std::map<std::string, std::string>::const_iterator it = urls.begin(); it != urls.end(); ++it) {
-        _Ewk_Web_App_Icon_Data *data = ewkWebAppIconDataCreate(it->first, it->second);
+      Eina_List* list = NULL;
+      for (std::map<std::string, std::string>::const_iterator it = urls.begin();
+           it != urls.end(); ++it) {
+        _Ewk_Web_App_Icon_Data* data =
+            ewkWebAppIconDataCreate(it->first, it->second);
         list = eina_list_append(list, data);
       }
       (func_)(list, user_data_);
@@ -137,14 +141,14 @@ class WebApplicationIconUrlsGetCallback {
 
  private:
   Ewk_Web_App_Icon_URLs_Get_Callback func_;
-  void *user_data_;
+  voiduser_data_;
 };
 
 class WebApplicationCapableGetCallback {
  public:
-  WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func, void *user_data)
-    : func_(func), user_data_(user_data)
-  {}
+  WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func,
+                                   void* user_data)
+      : func_(func), user_data_(user_data) {}
   void Run(bool capable) {
     if (func_) {
       (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
@@ -153,7 +157,7 @@ class WebApplicationCapableGetCallback {
 
  private:
   Ewk_Web_App_Capable_Get_Callback func_;
-  void *user_data_;
+  voiduser_data_;
 };
 
 class WebViewAsyncRequestHitTestDataCallback;
@@ -172,26 +176,22 @@ class EWebView {
   // call this once after created and before use
   void Initialize();
 
-  void CreateNewWindow(content::WebContentsEflDelegate::WebContentsCreateCallback);
+  void CreateNewWindow(
+      content::WebContentsEflDelegate::WebContentsCreateCallback);
   static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
 
   Ewk_Context* context() const { return context_.get(); }
   Evas_Object* evas_object() const { return evas_object_; }
   Evas_Object* native_view() const { return native_view_; }
   Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
-  PermissionPopupManager* GetPermissionPopupManager() const
-  {
+  PermissionPopupManager* GetPermissionPopupManager() const {
     return permission_popup_manager_.get();
   }
 
-  content::WebContents& web_contents() const
-  {
-    return *web_contents_.get();
-  }
+  content::WebContents& web_contents() const { return *web_contents_.get(); }
 
-  template<EWebViewCallbacks::CallbackType callbackType>
-  EWebViewCallbacks::CallBack<callbackType> SmartCallback() const
-  {
+  template <EWebViewCallbacks::CallbackType callbackType>
+  EWebViewCallbacks::CallBack<callbackType> SmartCallback() const {
     return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
   }
 
@@ -221,10 +221,14 @@ class EWebView {
   void SetTouchEventsEnabled(bool enabled);
   bool MouseEventsEnabled() const;
   void SetMouseEventsEnabled(bool enabled);
-  void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers);
+  void HandleTouchEvents(Ewk_Touch_Event_Type type,
+                         const Eina_List* points,
+                         const Evas_Modifier* modifiers);
   void Show();
   void Hide();
-  bool ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata);
+  bool ExecuteJavaScript(const char* script,
+                         Ewk_View_Script_Execute_Callback callback,
+                         void* userdata);
   bool SetUserAgent(const char* userAgent);
   bool SetUserAgentAppName(const char* application_name);
   bool SetPrivateBrowsing(bool incognito);
@@ -235,21 +239,35 @@ class EWebView {
   Ewk_Settings* GetSettings() { return settings_.get(); }
   _Ewk_Frame* GetMainFrame();
   void UpdateWebKitPreferences();
-  void LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri);
+  void LoadHTMLString(const char* html,
+                      const char* base_uri,
+                      const char* unreachable_uri);
   void LoadPlainTextString(const char* plain_text);
-  void LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri = NULL);
-
-  void InvokeLoadError(const GURL& url, int error_code,
-      const std::string& error_description, bool is_main_frame);
-  void InvokeAuthCallback(LoginDelegateEfl* login_delegate, const GURL& url, const std::string& realm);
+  void LoadData(const char* data,
+                size_t size,
+                const char* mime_type,
+                const char* encoding,
+                const char* base_uri,
+                const char* unreachable_uri = NULL);
+
+  void InvokeLoadError(const GURL& url,
+                       int error_code,
+                       const std::string& error_description,
+                       bool is_main_frame);
+  void InvokeAuthCallback(LoginDelegateEfl* login_delegate,
+                          const GURL& url,
+                          const std::string& realm);
   void Find(const char* text, Ewk_Find_Options);
   void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
   void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
   void ShowPopupMenu(const std::vector<content::MenuItem>& items,
-                     int selectedIndex, bool multiple);
+                     int selectedIndex,
+                     bool multiple);
   Eina_Bool HidePopupMenu();
-  void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
-      bool prevState, bool nextState);
+  void UpdateFormNavigation(int formElementCount,
+                            int currentNodeIndex,
+                            bool prevState,
+                            bool nextState);
   void FormNavigate(bool direction);
   bool IsSelectPickerShown() const;
   void CloseSelectPicker();
@@ -266,12 +284,14 @@ class EWebView {
   bool GetScrollPosition(int* x, int* y) const;
   void SetScroll(int x, int y);
   void UrlRequestSet(const char* url,
-      content::NavigationController::LoadURLType loadtype,
-      Eina_Hash* headers,
-      const char* body);
+                     content::NavigationController::LoadURLType loadtype,
+                     Eina_Hash* headers,
+                     const char* body);
 
   content::SelectionControllerEfl* GetSelectionController() const;
-  content::PopupControllerEfl* GetPopupController() const { return popup_controller_.get(); }
+  content::PopupControllerEfl* GetPopupController() const {
+    return popup_controller_.get();
+  }
   ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
   void MoveCaret(const gfx::Point& point);
   void QuerySelectionStyle();
@@ -280,7 +300,8 @@ class EWebView {
   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
   Eina_Bool ClearSelection();
 
-  // Callback OnCopyFromBackingStore will be called once we get the snapshot from render
+  // Callback OnCopyFromBackingStore will be called once we get the snapshot
+  // from render
   void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
 
   void RenderViewCreated(content::RenderViewHost* render_view_host);
@@ -295,40 +316,57 @@ class EWebView {
   */
   Evas_Object* GetSnapshot(Eina_Rectangle rect);
 
-  bool GetSnapshotAsync(Eina_Rectangle rect, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data);
+  bool GetSnapshotAsync(Eina_Rectangle rect,
+                        Ewk_Web_App_Screenshot_Captured_Callback callback,
+                        void* user_data);
   void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision);
   void InvokePolicyNavigationCallback(content::RenderViewHost* rvh,
-      NavigationPolicyParams params, bool* handled);
+                                      NavigationPolicyParams params,
+                                      bool* handled);
   void UseSettingsFont();
 
   _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
-  Eina_Bool AsyncRequestHitTestDataAt(int x, int y,
+  Eina_Bool AsyncRequestHitTestDataAt(int x,
+                                      int y,
+                                      Ewk_Hit_Test_Mode mode,
+                                      Ewk_View_Hit_Test_Request_Callback,
+                                      void* user_data);
+  _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x,
+                                                 int y,
+                                                 Ewk_Hit_Test_Mode mode);
+  Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
+      int x,
+      int y,
       Ewk_Hit_Test_Mode mode,
       Ewk_View_Hit_Test_Request_Callback,
       void* user_data);
-  _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x, int y,
-      Ewk_Hit_Test_Mode mode);
-  Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
-      Ewk_Hit_Test_Mode mode,
-      Ewk_View_Hit_Test_Request_Callback,
-      void* user_data);
-  void DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id);
+  void DispatchAsyncHitTestData(const Hit_Test_Params& params,
+                                int64_t request_id);
   void UpdateHitTestData(const Hit_Test_Params& params);
 
   int current_find_request_id() const { return current_find_request_id_; }
   bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
-  void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id);
-  int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
-  void SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data);
-  bool InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* geolocation_permission_request_context, Eina_Bool* result);
+  void InvokePlainTextGetCallback(const std::string& content_text,
+                                  int plain_text_get_callback_id);
+  int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback,
+                                     void* user_data);
+  void SetViewGeolocationPermissionCallback(
+      Ewk_View_Geolocation_Permission_Callback callback,
+      void* user_data);
+  bool InvokeViewGeolocationPermissionCallback(
+      _Ewk_Geolocation_Permission_Request*
+          geolocation_permission_request_context,
+      Eina_Bool* result);
   void SetViewUserMediaPermissionCallback(
       Ewk_View_User_Media_Permission_Callback callback,
       void* user_data);
   bool InvokeViewUserMediaPermissionCallback(
       _Ewk_User_Media_Permission_Request* user_media_permission_request_context,
       Eina_Bool* result);
-  void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
-  bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction, Eina_Bool* result);
+  void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
+                                   void* user_data);
+  bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction,
+                                      Eina_Bool* result);
   void DidChangeContentsSize(int width, int height);
   const Eina_Rectangle GetContentsSize() const;
   void GetScrollSize(int* w, int* h);
@@ -341,15 +379,24 @@ class EWebView {
   _Ewk_Back_Forward_List* GetBackForwardList() const;
   void InvokeBackForwardListChangedCallback();
   _Ewk_History* GetBackForwardHistory() const;
-  bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData);
-  bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData);
-  bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData);
+  bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback,
+                        void* userData);
+  bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback,
+                        void* userData);
+  bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback,
+                         void* userData);
   void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
-  void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId);
-  void InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId);
-  void SetNotificationPermissionCallback(Ewk_View_Notification_Permission_Callback callback, void* user_data);
+  void InvokeWebAppIconUrlGetCallback(const std::string& iconUrl,
+                                      int callbackId);
+  void InvokeWebAppIconUrlsGetCallback(
+      const std::map<std::string, std::string>& iconUrls,
+      int callbackId);
+  void SetNotificationPermissionCallback(
+      Ewk_View_Notification_Permission_Callback callback,
+      void* user_data);
   bool IsNotificationPermissionCallbackSet() const;
-  bool InvokeNotificationPermissionCallback(Ewk_Notification_Permission_Request* request);
+  bool InvokeNotificationPermissionCallback(
+      Ewk_Notification_Permission_Request* request);
 
   bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
   void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
@@ -357,17 +404,21 @@ class EWebView {
   void ExitFullscreen();
   double GetScale();
   void DidChangePageScaleFactor(double scale_factor);
-  void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
+  void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
+                                  void* user_data);
   void JavaScriptAlertReply();
-  void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
+  void SetJavaScriptConfirmCallback(
+      Ewk_View_JavaScript_Confirm_Callback callback,
+      void* user_data);
   void JavaScriptConfirmReply(bool result);
-  void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
+  void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback,
+                                   void* user_data);
   void JavaScriptPromptReply(const char* result);
   void set_renderer_crashed();
-  void GetPageScaleRange(double *min_scale, double *max_scale);
+  void GetPageScaleRange(double* min_scale, double* max_scale);
   void SetDrawsTransparentBackground(bool enabled);
-  void GetSessionData(const char **data, unsigned *length) const;
-  bool RestoreFromSessionData(const char *data, unsigned length);
+  void GetSessionData(const char** data, unsigned* length) const;
+  bool RestoreFromSessionData(const chardata, unsigned length);
   void ShowFileChooser(content::RenderFrameHost* render_frame_host,
                        const content::FileChooserParams&);
   void SetBrowserFont();
@@ -391,13 +442,15 @@ class EWebView {
   void SetLinkMagnifierEnabled(bool enabled);
 
   void SetOverrideEncoding(const std::string& encoding);
-  void SetQuotaPermissionRequestCallback(Ewk_Quota_Permission_Request_Callback callback,
-                                         void* user_data);
-  void InvokeQuotaPermissionRequest(_Ewk_Quota_Permission_Request* request,
-                                    const content::QuotaPermissionContext::PermissionCallback& cb);
-  void QuotaRequestReply(const _Ewk_Quota_Permission_Request *request,
+  void SetQuotaPermissionRequestCallback(
+      Ewk_Quota_Permission_Request_Callback callback,
+      void* user_data);
+  void InvokeQuotaPermissionRequest(
+      _Ewk_Quota_Permission_Request* request,
+      const content::QuotaPermissionContext::PermissionCallback& cb);
+  void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
                          bool allow);
-  void QuotaRequestCancel(const _Ewk_Quota_Permission_Request *request);
+  void QuotaRequestCancel(const _Ewk_Quota_Permission_Requestrequest);
 
   void SetViewMode(blink::WebViewMode view_mode);
 
@@ -427,15 +480,19 @@ class EWebView {
   void SendDelayedMessages(content::RenderViewHost* render_view_host);
 
   void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
-  Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
+  Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
+      int x,
+      int y,
       Ewk_Hit_Test_Mode mode,
       WebViewAsyncRequestHitTestDataCallback* cb);
 
   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
 
 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
-  static void cameraResultCb(service_h request, service_h reply,
-    service_result_e result, void* data);
+  static void cameraResultCb(service_h request,
+                             service_h reply,
+                             service_result_e result,
+                             void* data);
 #endif
 
 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
@@ -485,11 +542,13 @@ class EWebView {
   int current_find_request_id_;
   static int find_request_id_counter_;
 
-  typedef WebViewCallback<Ewk_View_Plain_Text_Get_Callback, const char*> EwkViewPlainTextGetCallback;
-  IDMap<EwkViewPlainTextGetCallback, IDMapOwnPointer> plain_text_get_callback_map_;
+  typedef WebViewCallback<Ewk_View_Plain_Text_Get_Callback, const char*>
+      EwkViewPlainTextGetCallback;
+  base::IDMap<EwkViewPlainTextGetCallback*> plain_text_get_callback_map_;
 
-  typedef WebViewCallback<Ewk_View_MHTML_Data_Get_Callback, const char*> MHTMLCallbackDetails;
-  IDMap<MHTMLCallbackDetails, IDMapOwnPointer> mhtml_callback_map_;
+  typedef WebViewCallback<Ewk_View_MHTML_Data_Get_Callback, const char*>
+      MHTMLCallbackDetails;
+  base::IDMap<MHTMLCallbackDetails*> mhtml_callback_map_;
 
   gfx::Size contents_size_;
   double progress_;
@@ -502,27 +561,36 @@ class EWebView {
   double max_page_scale_factor_;
 
   WebViewCallback<Ewk_View_Geolocation_Permission_Callback,
-      _Ewk_Geolocation_Permission_Request*> geolocation_permission_cb_;
+                  _Ewk_Geolocation_Permission_Request*>
+      geolocation_permission_cb_;
   WebViewCallback<Ewk_View_User_Media_Permission_Callback,
-      _Ewk_User_Media_Permission_Request*> user_media_permission_cb_;
-  WebViewCallback<Ewk_View_Unfocus_Allow_Callback,
-      Ewk_Unfocus_Direction> unfocus_allow_cb_;
+                  _Ewk_User_Media_Permission_Request*>
+      user_media_permission_cb_;
+  WebViewCallback<Ewk_View_Unfocus_Allow_Callback, Ewk_Unfocus_Direction>
+      unfocus_allow_cb_;
   WebViewCallback<Ewk_View_Notification_Permission_Callback,
-      Ewk_Notification_Permission_Request*> notification_permission_callback_;
+                  Ewk_Notification_Permission_Request*>
+      notification_permission_callback_;
   WebViewCallback<Ewk_Quota_Permission_Request_Callback,
-      const _Ewk_Quota_Permission_Request*> quota_request_callback_;
+                  const _Ewk_Quota_Permission_Request*>
+      quota_request_callback_;
 
   std::unique_ptr<content::InputPicker> inputPicker_;
-  IDMap<WebApplicationIconUrlGetCallback, IDMapOwnPointer> web_app_icon_url_get_callback_map_;
-  IDMap<WebApplicationIconUrlsGetCallback, IDMapOwnPointer> web_app_icon_urls_get_callback_map_;
-  IDMap<WebApplicationCapableGetCallback, IDMapOwnPointer> web_app_capable_get_callback_map_;
+  base::IDMap<WebApplicationIconUrlGetCallback*>
+      web_app_icon_url_get_callback_map_;
+  base::IDMap<WebApplicationIconUrlsGetCallback*>
+      web_app_icon_urls_get_callback_map_;
+  base::IDMap<WebApplicationCapableGetCallback*>
+      web_app_capable_get_callback_map_;
   std::unique_ptr<PermissionPopupManager> permission_popup_manager_;
   std::unique_ptr<ScrollDetector> scroll_detector_;
 
 #if defined(OS_TIZEN_MOBILE)
   content::FileChooserParams::Mode filechooser_mode_;
 #endif
-  std::map<const _Ewk_Quota_Permission_Request*, content::QuotaPermissionContext::PermissionCallback> quota_permission_request_map_;
+  std::map<const _Ewk_Quota_Permission_Request*,
+           content::QuotaPermissionContext::PermissionCallback>
+      quota_permission_request_map_;
 
   bool is_initialized_;
 
@@ -531,7 +599,7 @@ class EWebView {
   static content::WebContentsEflDelegate::WebContentsCreateCallback
       create_new_window_web_contents_cb_;
 
-private:
+ private:
   gfx::Vector2d previous_scroll_position_;
 
   gfx::Point context_menu_position_;
@@ -543,5 +611,4 @@ private:
 
 const unsigned int g_default_tilt_motion_sensitivity = 3;
 
-
 #endif
index e5324124eeadbd7fc449469a64c0bd1d3655f06a..e3842d63262948da7506ee1969e62a91298ba07f 100644 (file)
@@ -32,6 +32,8 @@
 #include "message_pump_for_ui_efl.h"
 #include "ui/display/screen_efl.h"
 
+#include "content/browser/gpu/gpu_main_thread_factory.h"
+
 #ifdef OS_TIZEN
 #include <dlfcn.h>
 void* EflExtensionHandle = 0;
@@ -54,35 +56,43 @@ std::unique_ptr<base::MessagePump> MessagePumpFactory() {
   return std::unique_ptr<base::MessagePump>(new base::MessagePumpForUIEfl);
 }
 
-} // namespace
+}  // namespace
 
 EwkGlobalData::EwkGlobalData()
-  : content_main_runner_(ContentMainRunner::Create())
-  , browser_main_runner_(BrowserMainRunner::Create()) {
-}
+    : content_main_runner_(ContentMainRunner::Create()),
+      browser_main_runner_(BrowserMainRunner::Create()) {}
 
 EwkGlobalData::~EwkGlobalData() {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   // URLRequestContextGetterEfl needs to be deleted before loop stops
   system_request_context_ = NULL;
-  // We need to pretend that message loop was stopped so chromium unwinds correctly
-  MessageLoop *loop = MessageLoop::current();
+
+// MessageLoop::QuitNow is deprecated. Should use RunLoop::Quit()
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // We need to pretend that message loop was stopped so chromium unwinds
+  // correctly
+  MessageLoop* loop = MessageLoop::current();
   loop->QuitNow();
+#endif
 
-  // Since we forcibly shutdown our UI message loop, it is possible
-  // that important pending Tasks are simply not executed.
-  // Among these, the destruction of RenderProcessHostImpl class
-  // (scheduled with DeleteSoon) performs various process umplumbing
-  // stuff and also holds strong references of lots of other objects
-  // (e.g. URLRequestContextGetterEfl, RenderWidgetHelper,
-  // ChildProcessLauncher). Not performing the proper destruction
-  // of them might result in crashes or other undefined problems.
-  //
-  // Line below gives the message loop a extra run ('till it gets idle)
-  // to perform such pending tasks.
+// Since we forcibly shutdown our UI message loop, it is possible
+// that important pending Tasks are simply not executed.
+// Among these, the destruction of RenderProcessHostImpl class
+// (scheduled with DeleteSoon) performs various process umplumbing
+// stuff and also holds strong references of lots of other objects
+// (e.g. URLRequestContextGetterEfl, RenderWidgetHelper,
+// ChildProcessLauncher). Not performing the proper destruction
+// of them might result in crashes or other undefined problems.
+//
+// Line below gives the message loop a extra run ('till it gets idle)
+// to perform such pending tasks.
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   loop->RunUntilIdle();
+#endif  // !defined(EWK_BRINGUP)
 
-  // browser_main_runner must be deleted first as it depends on content_main_runner
+  // browser_main_runner must be deleted first as it depends on
+  // content_main_runner
   delete browser_main_runner_;
   delete content_main_runner_;
 
@@ -123,20 +133,24 @@ EwkGlobalData* EwkGlobalData::GetInstance() {
   instance_->content_main_runner_->Initialize(params);
 
 #if defined(USE_OZONE)
-  ui::OzonePlatform::InitializeForUI();
+  ui::OzonePlatform::InitParams init_params;
+  init_params.single_process = true;
+  ui::OzonePlatform::InitializeForUI(init_params);
 #endif
 
   instance_->browser_main_runner_->Initialize(main_funtion_params);
 
   base::ThreadRestrictions::SetIOAllowed(true);
 
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) {
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kSingleProcess)) {
     content::UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(
         content::CreateInProcessUtilityThread);
     content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(
         content::CreateInProcessRendererThread);
-    GpuProcessHost::RegisterGpuMainThreadFactory(
-        reinterpret_cast<content::GpuMainThreadFactoryFunction>(content::CreateInProcessGpuThread));
+    content::RegisterGpuMainThreadFactory(
+        reinterpret_cast<content::GpuMainThreadFactoryFunction>(
+            content::CreateInProcessGpuThread));
   }
 
 #ifndef NDEBUG
@@ -154,15 +168,15 @@ EwkGlobalData* EwkGlobalData::GetInstance() {
   return instance_;
 }
 
-content::URLRequestContextGetterEfl* EwkGlobalData::GetSystemRequestContextGetter() {
+content::URLRequestContextGetterEfl*
+EwkGlobalData::GetSystemRequestContextGetter() {
   if (!system_request_context_.get()) {
     system_request_context_ = new content::URLRequestContextGetterEfl();
   }
   return system_request_context_.get();
 }
 
-void EwkGlobalData::Delete()
-{
+void EwkGlobalData::Delete() {
   delete instance_;
   instance_ = NULL;
 }
index 18e80b4afb0cbbb24f43f6485495814bf96256b8..75046ef9b009ce1c8b78c20563c136c2ff829645 100755 (executable)
@@ -26,7 +26,9 @@ else
   BUILD_MODE=Release
 fi
 
-CHROMIUM_EFL_LIBDIR=$(readlink -e $SCRIPTDIR/lib)
+# FIXME: CHROMIUM_EFL_LIBDIR should be fixed.
+# CHROMIUM_EFL_LIBDIR=$(readlink -e $SCRIPTDIR/lib)
+CHROMIUM_EFL_LIBDIR=$(readlink -e $SCRIPTDIR)
 CHROMIUM_EFL_DEPENDENCIES_LIBDIR=$(readlink -e $SCRIPTDIR/Dependencies/Root/$_LIBDIR)
 
 export LD_LIBRARY_PATH=$CHROMIUM_EFL_DEPENDENCIES_LIBDIR:$CHROMIUM_EFL_LIBDIR:${LD_LIBRARY_PATH}
index 3f84660d0ce7951a44cbde48b17dae0d60b439fc..079b9336cdaf64e522d3253daaeec9b396dd71b2 100644 (file)
@@ -4,10 +4,9 @@
 
 #include "message_pump_for_ui_efl.h"
 
-#define private public
 #include "base/run_loop.h"
-#undef private
 #include "base/command_line.h"
+#include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
 #include "cc/base/switches.h"
 #include "common/content_switches_efl.h"
@@ -20,16 +19,16 @@ static const int dummy_pipe_message_size = 1;
 }
 
 MessagePumpForUIEfl::MessagePumpForUIEfl()
-  : pipe_(ecore_pipe_add(&PipeCallback, this))
-  , schedule_delayed_work_timer_(NULL)
-  , run_loop_(NULL)
-  , keep_running_(true)
-  , work_scheduled_(false) {
-}
+    : pipe_(ecore_pipe_add(&PipeCallback, this)),
+      schedule_delayed_work_timer_(NULL),
+      run_loop_(NULL),
+      keep_running_(true),
+      work_scheduled_(false) {}
 
 MessagePumpForUIEfl::~MessagePumpForUIEfl() {
   base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
-  if (!cmdline->HasSwitch(switches::kLimitMemoryAllocationInScheduleDelayedWork)) {
+  if (!cmdline->HasSwitch(
+          switches::kLimitMemoryAllocationInScheduleDelayedWork)) {
     for (std::unordered_set<TimerPair*>::iterator it = pending_timers_.begin();
          it != pending_timers_.end(); ++it) {
       ecore_timer_del((*it)->second);
@@ -77,12 +76,14 @@ void MessagePumpForUIEfl::Quit() {
   ecore_pipe_del(pipe_);
   if (schedule_delayed_work_timer_)
     ecore_timer_del(schedule_delayed_work_timer_);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (run_loop_) {
     DCHECK(run_loop_->running());
     run_loop_->AfterRun();
     delete run_loop_;
     run_loop_ = NULL;
   }
+#endif
   pipe_ = NULL;
   schedule_delayed_work_timer_ = NULL;
   keep_running_ = false;
@@ -97,18 +98,21 @@ void MessagePumpForUIEfl::ScheduleWork() {
   }
 
   DCHECK(pipe_);
-  bool ok = ecore_pipe_write(pipe_, dummy_pipe_message, dummy_pipe_message_size);
+  bool ok =
+      ecore_pipe_write(pipe_, dummy_pipe_message, dummy_pipe_message_size);
   DCHECK(ok);
 }
 
-void MessagePumpForUIEfl::ScheduleDelayedWork(const base::TimeTicks& delayed_work_time) {
+void MessagePumpForUIEfl::ScheduleDelayedWork(
+    const base::TimeTicks& delayed_work_time) {
   base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
   base::TimeTicks now = base::TimeTicks::Now();
   double delay = 0;
   if (delayed_work_time > now)
     delay = base::TimeDelta(delayed_work_time - now).InSecondsF();
 
-  if (!cmdline->HasSwitch(switches::kLimitMemoryAllocationInScheduleDelayedWork)) {
+  if (!cmdline->HasSwitch(
+          switches::kLimitMemoryAllocationInScheduleDelayedWork)) {
     TimerPair* new_pair = new TimerPair();
     new_pair->first = this;
     new_pair->second = ecore_timer_add(delay, &TimerCallback, new_pair);
@@ -121,19 +125,21 @@ void MessagePumpForUIEfl::ScheduleDelayedWork(const base::TimeTicks& delayed_wor
   }
 }
 
-void MessagePumpForUIEfl::PipeCallback(void *data, void*, unsigned int) {
+void MessagePumpForUIEfl::PipeCallback(voiddata, void*, unsigned int) {
   static_cast<MessagePumpForUIEfl*>(data)->DoWork();
 }
 
 Eina_Bool MessagePumpForUIEfl::TimerCallback(void* data) {
   base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
-  if (!cmdline->HasSwitch(switches::kLimitMemoryAllocationInScheduleDelayedWork)) {
+  if (!cmdline->HasSwitch(
+          switches::kLimitMemoryAllocationInScheduleDelayedWork)) {
     TimerPair* current_timer_pair = static_cast<TimerPair*>(data);
     current_timer_pair->first->DoDelayedWork();
     current_timer_pair->first->pending_timers_.erase(current_timer_pair);
     delete current_timer_pair;
   } else {
-    MessagePumpForUIEfl* messagePumpForUIEfl = static_cast<MessagePumpForUIEfl*>(data);
+    MessagePumpForUIEfl* messagePumpForUIEfl =
+        static_cast<MessagePumpForUIEfl*>(data);
     messagePumpForUIEfl->DoDelayedWork();
     messagePumpForUIEfl->schedule_delayed_work_timer_ = NULL;
   }
@@ -149,11 +155,13 @@ void MessagePumpForUIEfl::DoWork() {
   }
 
   Delegate* delegate = base::MessageLoopForUI::current();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (!run_loop_) {
     run_loop_ = new RunLoop();
     bool result = run_loop_->BeforeRun();
     DCHECK(result);
   }
+#endif
 
   bool more_work_is_plausible = delegate->DoWork();
 
@@ -176,11 +184,12 @@ void MessagePumpForUIEfl::DoWork() {
 }
 
 void MessagePumpForUIEfl::DoDelayedWork() {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   base::TimeTicks next_delayed_work_time;
   base::MessageLoopForUI::current()->DoDelayedWork(&next_delayed_work_time);
 
   if (!next_delayed_work_time.is_null())
     ScheduleDelayedWork(next_delayed_work_time);
+#endif
 }
-
 }
index 7eef1a56173b3d71b0dd911cf92c3a422a54bc23..94d782568f48920301bebfe5abe8c3e3c92af37c 100644 (file)
@@ -13,8 +13,7 @@ namespace net {
 
 NetworkDelegateEfl::NetworkDelegateEfl(
     base::WeakPtr<CookieManager> cookie_manager)
-    : cookie_manager_(cookie_manager) {
-}
+    : cookie_manager_(cookie_manager) {}
 
 NetworkDelegate::AuthRequiredResponse NetworkDelegateEfl::OnAuthRequired(
     URLRequest* request,
@@ -39,9 +38,11 @@ bool NetworkDelegateEfl::OnCanSetCookie(const URLRequest& request,
   return cookie_manager_->OnCanSetCookie(request, cookie_line, options);
 }
 
-bool NetworkDelegateEfl::OnCanAccessFile(const URLRequest& request,
-                                         const base::FilePath& path) const {
+bool NetworkDelegateEfl::OnCanAccessFile(
+    const URLRequest& request,
+    const base::FilePath& original_path,
+    const base::FilePath& absolute_path) const {
   return true;
 }
 
-}; // namespace net
+};  // namespace net
index 2f37c93538dce3f05ba1101e77238fd185257986..82e43b23b326af2b2d64817d03790c9d41048677 100644 (file)
@@ -23,17 +23,18 @@ class NetworkDelegateEfl : public NetworkDelegateImpl {
       const AuthChallengeInfo& auth_info,
       const AuthCallback& callback,
       AuthCredentials* credentials) override;
-  virtual bool OnCanGetCookies(const URLRequest& request,
-                               const CookieList& cookie_list) override;
-  virtual bool OnCanSetCookie(const URLRequest& request,
-                              const std::string& cookie_line,
-                              CookieOptions* options) override;
-  virtual bool OnCanAccessFile(const URLRequest& request,
-                               const base::FilePath& path) const override;
+  bool OnCanGetCookies(const URLRequest& request,
+                       const CookieList& cookie_list) override;
+  bool OnCanSetCookie(const URLRequest& request,
+                      const std::string& cookie_line,
+                      CookieOptions* options) override;
+  bool OnCanAccessFile(const URLRequest& request,
+                       const base::FilePath& original_path,
+                       const base::FilePath& absolute_path) const override;
 
   base::WeakPtr<CookieManager> cookie_manager_;
 };
 
-} // namespace net
+}  // namespace net
 
-#endif // _NETWORK_DELEGATE_EFL_H_
+#endif  // _NETWORK_DELEGATE_EFL_H_
index f327fd1efe56da95073b68dc3d152554bac85751..60488de64bb31c44d7df0c2985450e994fcfd5c0 100644 (file)
@@ -8,11 +8,17 @@
 #include "content/public/browser/notification_types.h"
 #include "content/public/browser/navigation_details.h"
 
-_Ewk_Back_Forward_List::_Ewk_Back_Forward_List(content::NavigationController &controller)
+_Ewk_Back_Forward_List::_Ewk_Back_Forward_List(
+    content::NavigationController& controller)
     : navigation_controller_(controller) {
-  notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_CHANGED,
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: Removed in upversion.
+  notification_registrar_.Add(
+      this, content::NOTIFICATION_NAV_ENTRY_CHANGED,
       content::NotificationService::AllBrowserContextsAndSources());
-  notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+#endif
+  notification_registrar_.Add(
+      this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
       content::NotificationService::AllBrowserContextsAndSources());
 }
 
@@ -34,7 +40,8 @@ int _Ewk_Back_Forward_List::GetForwardListLength() const {
   return navigation_controller_.GetEntryCount() - current - 1;
 }
 
-back_forward_list::Item* _Ewk_Back_Forward_List::GetItemAtIndex(int index) const {
+back_forward_list::Item* _Ewk_Back_Forward_List::GetItemAtIndex(
+    int index) const {
   index += navigation_controller_.GetCurrentEntryIndex();
   int count = navigation_controller_.GetEntryCount();
   if (index < 0 || index >= count) {
@@ -43,8 +50,9 @@ back_forward_list::Item* _Ewk_Back_Forward_List::GetItemAtIndex(int index) const
   return FindOrCreateItem(index);
 }
 
-void _Ewk_Back_Forward_List::NewPageCommited(int prev_entry_index,
-                                      content::NavigationEntry* new_entry) {
+void _Ewk_Back_Forward_List::NewPageCommited(
+    int prev_entry_index,
+    content::NavigationEntry* new_entry) {
   int current = prev_entry_index + 1;
   if (current != navigation_controller_.GetCurrentEntryIndex()) {
     return;
@@ -62,7 +70,8 @@ void _Ewk_Back_Forward_List::NewPageCommited(int prev_entry_index,
   }
 
   InsertEntryToIndexes(current, new_entry);
-  cache_[new_entry] = scoped_refptr<_Ewk_Back_Forward_List_Item>(new _Ewk_Back_Forward_List_Item(new_entry));
+  cache_[new_entry] = scoped_refptr<_Ewk_Back_Forward_List_Item>(
+      new _Ewk_Back_Forward_List_Item(new_entry));
 }
 
 void _Ewk_Back_Forward_List::UpdateItemWithEntry(
@@ -80,28 +89,31 @@ void _Ewk_Back_Forward_List::ClearCache() {
   cache_.clear();
 }
 
-void _Ewk_Back_Forward_List::Observe(int type,
-                                     const content::NotificationSource &source,
-                                     const content::NotificationDetails &details) {
+void _Ewk_Back_Forward_List::Observe(
+    int type,
+    const content::NotificationSource& source,
+    const content::NotificationDetails& details) {
   switch (static_cast<content::NotificationType>(type)) {
     case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
       content::Details<content::LoadCommittedDetails> d = details;
       NewPageCommited(d->previous_entry_index, d->entry);
       break;
     }
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+    // FIXME: Removed in upversion.
     case content::NOTIFICATION_NAV_ENTRY_CHANGED: {
       content::Details<content::EntryChangedDetails> d = details;
       const content::NavigationEntry* entry = d->changed_entry;
       UpdateItemWithEntry(entry);
       break;
     }
-    default: {
-      return;
-    }
+#endif
+    default: { return; }
   }
 }
 
-_Ewk_Back_Forward_List_Item* _Ewk_Back_Forward_List::FindOrCreateItem(int index) const {
+_Ewk_Back_Forward_List_Item* _Ewk_Back_Forward_List::FindOrCreateItem(
+    int index) const {
   content::NavigationEntry* entry =
       navigation_controller_.GetEntryAtIndex(index);
 
@@ -126,7 +138,8 @@ _Ewk_Back_Forward_List_Item* _Ewk_Back_Forward_List::FindOrCreateItem(int index)
 }
 
 void _Ewk_Back_Forward_List::InsertEntryToIndexes(
-    unsigned index, content::NavigationEntry* entry) const {
+    unsigned index,
+    content::NavigationEntry* entry) const {
   if (index == indexes_.size()) {
     indexes_.push_back(entry);
     return;
index 713d4cd3d39b78df34d69a2efbea280be91ec1b9..445e21320e8907b14c22eb086adb820d43ba099a 100644 (file)
@@ -16,9 +16,9 @@
 
 #include <map>
 
-class _Ewk_Back_Forward_List_Item :
-    public back_forward_list::Item,
-    public base::RefCounted<_Ewk_Back_Forward_List_Item> {
+class _Ewk_Back_Forward_List_Item
+    public back_forward_list::Item,
+      public base::RefCounted<_Ewk_Back_Forward_List_Item> {
  public:
   _Ewk_Back_Forward_List_Item(content::NavigationEntry* entry) {
     Update(entry);
@@ -32,17 +32,11 @@ class _Ewk_Back_Forward_List_Item :
     }
   }
 
-  const GURL& GetURL() const override {
-    return url_;
-  }
+  const GURL& GetURL() const override { return url_; }
 
-  const GURL& GetOriginalURL() const override {
-    return original_url_;
-  }
+  const GURL& GetOriginalURL() const override { return original_url_; }
 
-  const std::string& GetTitle() const override {
-    return title_;
-  }
+  const std::string& GetTitle() const override { return title_; }
 
  private:
   GURL url_;
@@ -50,14 +44,14 @@ class _Ewk_Back_Forward_List_Item :
   std::string title_;
 };
 
-class _Ewk_Back_Forward_List :
-    public back_forward_list::List,
-    public content::NotificationObserver {
+class _Ewk_Back_Forward_List : public back_forward_list::List,
+                               public content::NotificationObserver {
  public:
   typedef std::map<const content::NavigationEntry*,
-      scoped_refptr<_Ewk_Back_Forward_List_Item> > CacheMap;
+                   scoped_refptr<_Ewk_Back_Forward_List_Item> >
+      CacheMap;
 
-  _Ewk_Back_Forward_List(content::NavigationController &controller);
+  _Ewk_Back_Forward_List(content::NavigationControllercontroller);
   ~_Ewk_Back_Forward_List() {}
 
   int GetCurrentIndex() const override;
@@ -71,8 +65,10 @@ class _Ewk_Back_Forward_List :
   void UpdateItemWithEntry(const content::NavigationEntry* entry);
   void ClearCache();
 
-  void Observe(int type, const content::NotificationSource &source,
-               const content::NotificationDetails &details) override;
+  // FIXME: EWK_BRINGUP: Check the need.
+  void Observe(int type,
+               const content::NotificationSource& source,
+               const content::NotificationDetails& details);
 
  private:
   _Ewk_Back_Forward_List_Item* FindOrCreateItem(int index) const;
@@ -80,10 +76,10 @@ class _Ewk_Back_Forward_List :
                             content::NavigationEntry* entry) const;
 
  private:
-  content::NavigationController &navigation_controller_;
+  content::NavigationControllernavigation_controller_;
   content::NotificationRegistrar notification_registrar_;
   mutable CacheMap cache_;
   mutable std::vector<content::NavigationEntry*> indexes_;
 };
 
-#endif // EWK_BACK_FORWARD_LIST_PRIVATE_H
+#endif  // EWK_BACK_FORWARD_LIST_PRIVATE_H
index 4b954efb71f4aa9646aff230a4b9e3a9293088e8..7c3e21b0becb8149c84124a94decf4c401262ee4 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "base/callback.h"
 #include "ewk_suspendable_object.h"
-#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
+#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h"
 #include "url/gurl.h"
 
 class _Ewk_Security_Origin;
index dbeae4b3602bc47765558ab97054ee45488ac1a1..f0de2dc5a0f382db120bd631fb3276d18bbe4413 100644 (file)
@@ -14,7 +14,6 @@ _Ewk_Hit_Test::_Ewk_Hit_Test(const Hit_Test_Params& params)
       linkTitle(params.linkTitle),
       linkLabel(params.linkLabel),
       imageURI(params.imageURI),
-      mediaURI(params.mediaURI),
       isEditable(params.isEditable),
       mode(static_cast<Ewk_Hit_Test_Mode>(params.mode)),
       nodeData(params.nodeData),
@@ -45,7 +44,11 @@ _Ewk_Hit_Test::Hit_Test_Node_Data::~Hit_Test_Node_Data() {
 //(warning) deep copy of skia buffer.
 _Ewk_Hit_Test::Hit_Test_Image_Buffer::Hit_Test_Image_Buffer(const Hit_Test_Params::Image_Data& data):
   fileNameExtension(data.fileNameExtension) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+// FIXME: [M63_3239]
+// error: ‘const class SkBitmap’ has no member named ‘deepCopyTo’
   data.imageBitmap.deepCopyTo(&(imageBitmap));
+#endif
 }
 
 
@@ -81,10 +84,6 @@ size_t _Ewk_Hit_Test::GetImageBufferLength() const {
   return imageData.imageBitmap.getSize();
 }
 
-const char* _Ewk_Hit_Test::GetMediaUri() const {
-  return mediaURI.c_str();
-}
-
 const char* _Ewk_Hit_Test::GetNodeTagName() const {
   return nodeData.tagName.c_str();
 }
index d246ab5e693607cd22a254ad1b0c9c70955d2c57..b1d34d974b2069e49dad285f7e43a2d2747b227e 100644 (file)
@@ -32,8 +32,6 @@ class _Ewk_Hit_Test {
   void*       GetImageBuffer() const;
   size_t      GetImageBufferLength() const;
 
-  const char* GetMediaUri() const;
-
   const char* GetNodeTagName() const;
   const char* GetNodeValue() const;
   Eina_Hash*  GetNodeAttributeHash() const;
@@ -44,7 +42,6 @@ class _Ewk_Hit_Test {
   const std::string linkTitle; // the title of link
   const std::string linkLabel; // the text of the link
   const std::string imageURI;
-  const std::string mediaURI;
   const bool isEditable;
   const Ewk_Hit_Test_Mode mode;
 
index 44ddf77cc05c5d69dda350cde9934a4480f21439..59a1ef88f477e05757a162dcae26ca8f87b63f53 100644 (file)
 using content::BrowserThread;
 using namespace blink::mojom;
 
-Ewk_Notification::Ewk_Notification(
-    const std::string& body,
-    const std::string& replaceID,
-    const std::string& title,
-    const SkBitmap& icon,
-    bool silent,
-    uint64_t notificationID,
-    const GURL& origin)
-    : body_(body)
-    , icon_(icon)
-    , replaceID_(replaceID)
-    , title_(title)
-    , silent_(silent)
-    , notificationID_(notificationID)
-    , origin_(new _Ewk_Security_Origin(origin)) {
-}
-
-Ewk_Notification::~Ewk_Notification() {
-}
+Ewk_Notification::Ewk_Notification(const std::string& body,
+                                   const std::string& replaceID,
+                                   const std::string& title,
+                                   const SkBitmap& icon,
+                                   bool silent,
+                                   uint64_t notificationID,
+                                   const GURL& origin)
+    : body_(body),
+      icon_(icon),
+      replaceID_(replaceID),
+      title_(title),
+      silent_(silent),
+      notificationID_(notificationID),
+      origin_(new _Ewk_Security_Origin(origin)) {}
+
+Ewk_Notification::~Ewk_Notification() {}
 
 const char* Ewk_Notification::GetBody() const {
   return body_.c_str();
@@ -56,10 +53,13 @@ Evas_Object* Ewk_Notification::GetIcon(Evas* evas) const {
   evas_object_image_colorspace_set(icon, EVAS_COLORSPACE_ARGB8888);
   evas_object_image_alpha_set(icon, EINA_TRUE);
   void* pixels = evas_object_image_data_get(icon, EINA_TRUE);
+
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   if (pixels) {
     icon_.copyPixelsTo(pixels, icon_.getSize());
     evas_object_image_data_set(icon, pixels);
   }
+#endif
 
   return icon;
 }
@@ -73,8 +73,12 @@ const _Ewk_Security_Origin* Ewk_Notification::GetSecurityOrigin() const {
 }
 
 bool Ewk_Notification::SaveAsPng(const char* path) const {
-  return SkImageEncoder::EncodeFile(path, icon_,
-      SkImageEncoder::kPNG_Type, 100); // use max quality
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  return SkImageEncoder::EncodeFile(path, icon_, SkImageEncoder::kPNG_Type,
+                                    100);  // use max quality
+#else
+  return false;
+#endif
 }
 
 Ewk_Notification_Permission_Request::Ewk_Notification_Permission_Request(
@@ -87,14 +91,14 @@ Ewk_Notification_Permission_Request::Ewk_Notification_Permission_Request(
       decided_(false),
       suspended_(false) {}
 
-Ewk_Notification_Permission_Request::~Ewk_Notification_Permission_Request() {
-}
+Ewk_Notification_Permission_Request::~Ewk_Notification_Permission_Request() {}
 
 Evas_Object* Ewk_Notification_Permission_Request::GetWebviewEvasObject() const {
   return webview_;
 }
 
-const _Ewk_Security_Origin* Ewk_Notification_Permission_Request::GetSecurityOrigin() const {
+const _Ewk_Security_Origin*
+Ewk_Notification_Permission_Request::GetSecurityOrigin() const {
   return origin_.get();
 }
 
@@ -133,5 +137,3 @@ bool Ewk_Notification_Permission_Request::Reply(bool allow) {
 
   return true;
 }
-
-
index c098d4fc0b308d25b1ab3094293a25bacf3ca0f5..e2f48081f9c78515120d8a0573ec35937be549e8 100644 (file)
@@ -12,7 +12,7 @@
 #include "base/macros.h"
 #include "private/ewk_security_origin_private.h"
 #include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
+#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h"
 
 class GURL;
 
index 69af44514813cd3bf2534408eb08f1da8825e20b..ec1ceda17064177212e41a133fe7307ac9fd2509 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef ewk_object_private_h
 #define ewk_object_private_h
 
-#include <wtf/RefCounted.h>
+#include <platform/wtf/RefCounted.h>
 
 class EwkObject : public RefCounted<EwkObject> {
 public:
index 0243c1348f83f8ea678667df98b9eb0824ad76ea..718cfc6819f3fedbed921dd4cd0fad3a636d4abd 100644 (file)
@@ -6,36 +6,36 @@
 
 #include <algorithm>
 
-#include "components/mime_util/mime_util.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_view_host.h"
 #include "eweb_view.h"
 #include "net/http/http_response_headers.h"
 #include "private/ewk_frame_private.h"
+#include "third_party/WebKit/common/mime_util/mime_util.h"
 
 using content::BrowserThread;
 using content::RenderFrameHost;
 using content::RenderViewHost;
 
 namespace {
-  void FreeStringShare(void *data) {
-    eina_stringshare_del(static_cast<char*>(data));
-  }
+void FreeStringShare(void* data) {
+  eina_stringshare_del(static_cast<char*>(data));
+}
 }
 
-_Ewk_Policy_Decision::_Ewk_Policy_Decision(const GURL &request_url,
+_Ewk_Policy_Decision::_Ewk_Policy_Decision(const GURLrequest_url,
                                            net::URLRequest* request,
                                            content::ResourceType resource_type,
                                            PolicyResponseDelegateEfl* delegate)
-  : web_view_(NULL)
-  , policy_response_delegate_(delegate)
-  , response_headers_(NULL)
-  , decision_type_(EWK_POLICY_DECISION_USE)
-  , navigation_type_(EWK_POLICY_NAVIGATION_TYPE_OTHER)
-  , is_decided_(false)
-  , is_suspended_(false)
-  , response_status_code_(0)
-  , type_(POLICY_RESPONSE) {
+    : web_view_(NULL),
+      policy_response_delegate_(delegate),
+      response_headers_(NULL),
+      decision_type_(EWK_POLICY_DECISION_USE),
+      navigation_type_(EWK_POLICY_NAVIGATION_TYPE_OTHER),
+      is_decided_(false),
+      is_suspended_(false),
+      response_status_code_(0),
+      type_(POLICY_RESPONSE) {
   DCHECK(delegate);
   DCHECK(request);
 
@@ -48,8 +48,8 @@ _Ewk_Policy_Decision::_Ewk_Policy_Decision(const GURL &request_url,
     request->GetMimeType(&response_mime_);
 
     if ((!content::IsResourceTypeFrame(resource_type) &&
-        !resource_type == content::RESOURCE_TYPE_FAVICON) ||
-        (!mime_util::IsSupportedMimeType(response_mime_))) {
+         !resource_type == content::RESOURCE_TYPE_FAVICON) ||
+        (!blink::IsSupportedMimeType(response_mime_))) {
       decision_type_ = EWK_POLICY_DECISION_DOWNLOAD;
     }
 
@@ -66,41 +66,44 @@ _Ewk_Policy_Decision::_Ewk_Policy_Decision(const GURL &request_url,
     std::string value;
     response_headers_ = eina_hash_string_small_new(FreeStringShare);
     while (response_headers->EnumerateHeaderLines(&iter, &name, &value))
-      eina_hash_add(response_headers_, name.c_str(), eina_stringshare_add(value.c_str()));
+      eina_hash_add(response_headers_, name.c_str(),
+                    eina_stringshare_add(value.c_str()));
   }
 }
 
-_Ewk_Policy_Decision::_Ewk_Policy_Decision(const NavigationPolicyParams &params, content::RenderViewHost* rvh)
-  : web_view_(NULL)
-  , navigation_policy_handler_(new NavigationPolicyHandlerEfl(rvh, params))
-  , frame_(new _Ewk_Frame(params))
-  , cookie_(params.cookie)
-  , http_method_(params.httpMethod)
-  , response_headers_(NULL)
-  , decision_type_(EWK_POLICY_DECISION_USE)
-  , navigation_type_(static_cast<Ewk_Policy_Navigation_Type>(params.type))
-  , is_decided_(false)
-  , is_suspended_(false)
-  , response_status_code_(0)
-  , type_(POLICY_NAVIGATION) {
+_Ewk_Policy_Decision::_Ewk_Policy_Decision(const NavigationPolicyParams& params,
+                                           content::RenderViewHost* rvh)
+    : web_view_(NULL),
+      navigation_policy_handler_(new NavigationPolicyHandlerEfl(rvh, params)),
+      frame_(new _Ewk_Frame(params)),
+      cookie_(params.cookie),
+      http_method_(params.httpMethod),
+      response_headers_(NULL),
+      decision_type_(EWK_POLICY_DECISION_USE),
+      navigation_type_(static_cast<Ewk_Policy_Navigation_Type>(params.type)),
+      is_decided_(false),
+      is_suspended_(false),
+      response_status_code_(0),
+      type_(POLICY_NAVIGATION) {
   ParseUrl(params.url);
-  if (!params.auth.isEmpty())
-    SetAuthorizationIfNecessary(params.auth.utf8());
+  if (!params.auth.IsEmpty())
+    SetAuthorizationIfNecessary(params.auth.Utf8());
   else if (params.url.has_password() && params.url.has_username())
     SetAuthorizationIfNecessary(params.url);
 }
 
-_Ewk_Policy_Decision::_Ewk_Policy_Decision(EWebView* view,
+_Ewk_Policy_Decision::_Ewk_Policy_Decision(
+    EWebView* view,
     content::WebContentsEflDelegate::NewWindowDecideCallback callback)
-  : web_view_(view)
-  , window_create_callback_(callback)
-  , response_headers_(NULL)
-  , decision_type_(EWK_POLICY_DECISION_USE)
-  , navigation_type_(EWK_POLICY_NAVIGATION_TYPE_OTHER)
-  , is_decided_(false)
-  , is_suspended_(false)
-  , response_status_code_(0)
-  , type_(POLICY_NEWWINDOW) {
+    : web_view_(view),
+      window_create_callback_(callback),
+      response_headers_(NULL),
+      decision_type_(EWK_POLICY_DECISION_USE),
+      navigation_type_(EWK_POLICY_NAVIGATION_TYPE_OTHER),
+      is_decided_(false),
+      is_suspended_(false),
+      response_status_code_(0),
+      type_(POLICY_NEWWINDOW) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   DCHECK(view);
 
@@ -124,7 +127,8 @@ void _Ewk_Policy_Decision::Use() {
       policy_response_delegate_->UseResponse();
       break;
     case POLICY_NAVIGATION:
-      navigation_policy_handler_->SetDecision(NavigationPolicyHandlerEfl::Unhandled);
+      navigation_policy_handler_->SetDecision(
+          NavigationPolicyHandlerEfl::Unhandled);
       break;
     case POLICY_NEWWINDOW:
       window_create_callback_.Run(true);
@@ -146,7 +150,8 @@ void _Ewk_Policy_Decision::Ignore() {
       policy_response_delegate_->IgnoreResponse();
       break;
     case _Ewk_Policy_Decision::POLICY_NAVIGATION:
-      navigation_policy_handler_->SetDecision(NavigationPolicyHandlerEfl::Handled);
+      navigation_policy_handler_->SetDecision(
+          NavigationPolicyHandlerEfl::Handled);
       break;
     case _Ewk_Policy_Decision::POLICY_NEWWINDOW:
       window_create_callback_.Run(false);
@@ -198,13 +203,18 @@ void _Ewk_Policy_Decision::InitializeOnUIThread() {
   DCHECK(policy_response_delegate_.get());
 
   if (policy_response_delegate_.get()) {
-    RenderFrameHost *host = RenderFrameHost::FromID(policy_response_delegate_->GetRenderProcessId(), policy_response_delegate_->GetRenderFrameId());
+    RenderFrameHost* host =
+        RenderFrameHost::FromID(policy_response_delegate_->GetRenderProcessId(),
+                                policy_response_delegate_->GetRenderFrameId());
 
-    // Download request has no render frame id, they're detached. We override it with main frame from render view id
+    // Download request has no render frame id, they're detached. We override it
+    // with main frame from render view id
     if (!host) {
-      RenderViewHost *viewhost = RenderViewHost::FromID(policy_response_delegate_->GetRenderProcessId(), policy_response_delegate_->GetRenderViewId());
+      RenderViewHost* viewhost = RenderViewHost::FromID(
+          policy_response_delegate_->GetRenderProcessId(),
+          policy_response_delegate_->GetRenderViewId());
 
-      //DCHECK(viewhost);
+      // DCHECK(viewhost);
       if (viewhost) {
         host = viewhost->GetMainFrame();
       }
@@ -213,7 +223,8 @@ void _Ewk_Policy_Decision::InitializeOnUIThread() {
     if (host) {
       /*
        * In some situations there is no renderer associated to the response
-       * Such case can be observed while running TC utc_blink_ewk_geolocation_permission_request_suspend_func
+       * Such case can be observed while running TC
+       * utc_blink_ewk_geolocation_permission_request_suspend_func
        */
       frame_.reset(new _Ewk_Frame(host));
     }
@@ -233,14 +244,16 @@ void _Ewk_Policy_Decision::ParseUrl(const GURL& url) {
   host_ = url.host();
 }
 
-void _Ewk_Policy_Decision::SetAuthorizationIfNecessary(const GURL& request_url) {
+void _Ewk_Policy_Decision::SetAuthorizationIfNecessary(
+    const GURL& request_url) {
   // There is no need to check if username or password is empty.
   // It was checked befor in constructor
   auth_password_ = request_url.password();
   auth_user_ = request_url.username();
 }
 
-void _Ewk_Policy_Decision::SetAuthorizationIfNecessary(const std::string request) {
+void _Ewk_Policy_Decision::SetAuthorizationIfNecessary(
+    const std::string request) {
   std::string type = request.substr(0, request.find_first_of(' '));
   std::transform(type.begin(), type.end(), type.begin(), ::toupper);
 
@@ -253,8 +266,10 @@ void _Ewk_Policy_Decision::SetAuthorizationIfNecessary(const std::string request
   std::size_t space = request.find(' ');
   std::size_t colon = request.find(':');
 
-  DCHECK(space != std::string::npos && colon != std::string::npos && colon != request.length());
-  if (space == std::string::npos || colon == std::string::npos || colon == request.length())
+  DCHECK(space != std::string::npos && colon != std::string::npos &&
+         colon != request.length());
+  if (space == std::string::npos || colon == std::string::npos ||
+      colon == request.length())
     return;
 
   auth_user_ = request.substr(space + 1, request.length() - colon - 1);
index e128cd9861ac3821d6e3a7a932d5458025cc3037..c61a4451627b96a9d542e952a52378a7147d15e8 100644 (file)
@@ -16,7 +16,8 @@
 #include "content/public/browser/web_contents_efl_delegate.h"
 #include "content/public/common/resource_type.h"
 #include "public/ewk_policy_decision.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
+// FIXME: removed on m63
+//#include "third_party/blink/public/web/WebViewModeEnums.h"
 
 // Basic type of authorization - 'type username:password'
 #define BASIC_AUTHORIZATION "BASIC"
index a505d0b32a28a7257ce2b7e309fed734240abc0e..05fd228165f4b8e27221cb0f9a0fe9ca27e9776b 100644 (file)
@@ -9,12 +9,15 @@
 
 void Ewk_Settings::setSpdyEnabled(bool flag)
 {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   net::HttpStreamFactory::set_spdy_enabled(flag);
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void Ewk_Settings::setCurrentLegacyFontSizeMode(Ewk_Legacy_Font_Size_Mode mode) {
   m_currentLegacyFontSizeMode = mode;
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   m_preferences.current_legacy_font_size_mode = static_cast<content::LegacyFontSizeMode>(mode);
 #endif
 }
index bafe5fae2a555b4c2c34e4930312bf4ed3ae26e3..907a332da64521f37083dfea9cf1346c1f657bbe 100644 (file)
@@ -44,12 +44,6 @@ const char* ewk_hit_test_image_uri_get(Ewk_Hit_Test* hitTest)
   return hitTest->GetImageUri();
 }
 
-const char* ewk_hit_test_media_uri_get(Ewk_Hit_Test* hitTest)
-{
-  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
-  return hitTest->GetMediaUri();
-}
-
 const char* ewk_hit_test_tag_name_get(Ewk_Hit_Test* hitTest)
 {
   EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
index b833c43dae402fd9cb7e01183d052d95892e2de3..93702e032dfb1ee74076f47d54708280d565c542 100644 (file)
@@ -10,7 +10,7 @@
 Ewk_Object* ewk_object_ref(Ewk_Object* object)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(object, 0);
-    object->ref();
+    object->AddRef();
 
     return object;
 }
@@ -19,5 +19,5 @@ void ewk_object_unref(Ewk_Object* object)
 {
     EINA_SAFETY_ON_NULL_RETURN(object);
 
-    object->deref();
+    object->Release();
 }
index b5f046277bed745411f1cce874846d40f216f881..278ba578c8d6618b584432182c78da04fbaed51a 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <Evas.h>
 
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 #include "webkit/common/webpreferences.h"
 #else
 #include "content/public/common/web_preferences.h"
@@ -47,7 +47,8 @@
 #include "private/ewk_back_forward_list_private.h"
 #include "private/ewk_history_private.h"
 #include "private/ewk_view_private.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
+// FIXME: removed on m63
+//#include "third_party/blink/public/web/WebViewModeEnums.h"
 #include "ui/events/gesture_detection/gesture_configuration.h"
 #include "url/gurl.h"
 #include "usermedia_permission_popup.h"
index 9212918198e9b7f1fe54bd91865c90f1df64ec81..1b5cbcfd30d70d9aaa7817a2782dde48132e10f2 100644 (file)
@@ -14,6 +14,7 @@
 #include "common/content_switches_efl.h"
 #include "common/render_messages_ewk.h"
 #include "content/common/paths_efl.h"
+#include "content/public/common/url_loader_throttle.h"
 #include "content/public/renderer/render_thread.h"
 #include "content/public/renderer/render_view.h"
 #include "content/renderer/render_view_impl.h"
 #include "renderer/render_view_observer_efl.h"
 #include "components/visitedlink/renderer/visitedlink_slave.h"
 #include "content/public/renderer/content_renderer_client.h"
-#include "third_party/WebKit/public/platform/URLConversion.h"
-#include "third_party/WebKit/public/platform/WebURLError.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "third_party/WebKit/public/platform/WebViewportStyle.h"
-#include "third_party/WebKit/public/web/WebDataSource.h"
-#include "third_party/WebKit/public/web/WebDocument.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebSettings.h"
-#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/blink/public/platform/URLConversion.h"
+#include "third_party/blink/public/platform/WebURLError.h"
+#include "third_party/blink/public/platform/WebURLRequest.h"
+#include "third_party/blink/public/platform/WebViewportStyle.h"
+#include "third_party/blink/public/web/WebDocument.h"
+#include "third_party/blink/public/web/WebDocumentLoader.h"
+#include "third_party/blink/public/web/WebFrame.h"
+#include "third_party/blink/public/web/WebLocalFrame.h"
+#include "third_party/blink/public/web/WebSettings.h"
+#include "third_party/blink/public/web/WebView.h"
+#include "third_party/blink/public/web/WebLocalFrame.h"
 #include "url/gurl.h"
 
 #if defined(OS_TIZEN)
@@ -90,11 +93,11 @@ ContentRendererClientEfl::ContentRendererClientEfl()
 ContentRendererClientEfl::~ContentRendererClientEfl() {
 }
 
-void ContentRendererClientEfl::RenderThreadStarted()
-{
+void ContentRendererClientEfl::RenderThreadStarted() {
   content::RenderThread* thread = content::RenderThread::Get();
 
-  const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+  const base::CommandLine& command_line =
+      *base::CommandLine::ForCurrentProcess();
   if (command_line.HasSwitch(switches::kInjectedBundlePath)) {
     wrt_widget_.reset(new WrtWidget);
     thread->AddObserver(wrt_widget_->GetObserver());
@@ -119,7 +122,10 @@ void ContentRendererClientEfl::RenderThreadStarted()
   thread->AddObserver(render_thread_observer_.get());
 
   visited_link_slave_.reset(new visitedlink::VisitedLinkSlave());
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   thread->AddObserver(visited_link_slave_.get());
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void ContentRendererClientEfl::RenderFrameCreated(content::RenderFrame* render_frame) {
@@ -143,28 +149,27 @@ void ContentRendererClientEfl::RenderViewCreated(content::RenderView* render_vie
   new RenderViewObserverEfl(render_view, this);
   new editing::EditorClientAgent(render_view);
 
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   render_view->SetWrtUrlParser(wrt_url_parser_.get());
 #endif
 }
 
 bool ContentRendererClientEfl::OverrideCreatePlugin(
     content::RenderFrame* render_frame,
-    blink::WebLocalFrame* frame,
     const blink::WebPluginParams& params,
     blink::WebPlugin** plugin) {
   PluginPlaceholderEfl* placeholder =
-      PluginPlaceholderEfl::CreateMissingPlugin(render_frame, frame, params);
+      PluginPlaceholderEfl::CreateMissingPlugin(render_frame, params);
   if (!placeholder)
     return false;
   *plugin = placeholder->plugin();
   return true;
 }
 
-bool ContentRendererClientEfl::WillSendRequest(blink::WebFrame* frame,
+bool ContentRendererClientEfl::WillSendRequest(blink::WebLocalFrame* frame,
                                                ui::PageTransition transition_type,
-                                               const GURL& url,
-                                               const GURL& first_party_for_cookies,
+                                               const blink::WebURL& url,
+                                               std::vector<std::unique_ptr<content::URLLoaderThrottle>>* throttles,
                                                GURL* new_url) {
   if (wrt_widget_) {
     wrt_widget_->ParseUrl(url, *new_url);
@@ -178,13 +183,12 @@ bool ContentRendererClientEfl::WillSendRequest(blink::WebFrame* frame,
 void ContentRendererClientEfl::DidCreateScriptContext(
     blink::WebFrame* frame,
     v8::Handle<v8::Context> context,
-    int extension_group,
     int world_id) {
   const content::RenderView* render_view = content::RenderView::FromWebView(
-      frame->view());
+      frame->View());
   if (wrt_widget_)
     wrt_widget_->StartSession(context, render_view->GetRoutingID(),
-        frame->document().baseURL().string().utf8());
+        frame->ToWebLocalFrame()->GetDocument().BaseURL().GetString().Utf8());
 }
 
 void ContentRendererClientEfl::WillReleaseScriptContext(
@@ -197,35 +201,35 @@ void ContentRendererClientEfl::WillReleaseScriptContext(
 
 bool ContentRendererClientEfl::HandleNavigation(content::RenderFrame* render_frame,
                                                 content::DocumentState* document_state,
-                                                int opener_id,
+                                                bool render_view_was_created_by_renderer,
                                                 blink::WebFrame* frame,
                                                 const blink::WebURLRequest& request,
                                                 blink::WebNavigationType type,
                                                 blink::WebNavigationPolicy default_policy,
                                                 bool is_redirect) {
    const content::RenderView* render_view =
-       content::RenderView::FromWebView(frame->view());
+       content::RenderView::FromWebView(frame->View());
    bool result = false;
    GURL referrer_url(blink::WebStringToGURL(
-       request.httpHeaderField(blink::WebString::fromUTF8("Referer"))));
+       request.HttpHeaderField(blink::WebString::FromUTF8("Referer"))));
    blink::WebReferrerPolicy referrer_policy =
-       request.isNull() ? frame->document().referrerPolicy() : request.referrerPolicy();
+       request.IsNull() ? frame->ToWebLocalFrame()->GetDocument().GetReferrerPolicy() : request.GetReferrerPolicy();
    int render_view_id = render_view->GetRoutingID();
 
    NavigationPolicyParams params;
    params.render_view_id = render_view_id;
-   params.url = request.url();
-   params.httpMethod = request.httpMethod().utf8();
+   params.url = request.Url();
+   params.httpMethod = request.HttpMethod().Utf8();
    params.referrer = content::Referrer(referrer_url, referrer_policy);
-   params.auth = request.httpHeaderField(blink::WebString::fromUTF8("Authorization"));
+   params.auth = request.HttpHeaderField(blink::WebString::FromUTF8("Authorization"));
    params.policy = default_policy;
-   params.is_main_frame = (frame->view()->mainFrame() == frame);
+   params.is_main_frame = (frame->View()->MainFrame() == frame);
    params.type = type;
    params.is_redirect = is_redirect;
-   params.cookie = request.httpHeaderField(blink::WebString::fromUTF8("Cookie")).utf8();
+   params.cookie = request.HttpHeaderField(blink::WebString::FromUTF8("Cookie")).Utf8();
 
-   blink::WebDataSource* ds = frame->provisionalDataSource();
-   params.should_replace_current_entry = (ds ? ds->replacesCurrentHistoryItem() : false);
+   blink::WebDocumentLoader* docLoader = frame->ToWebLocalFrame()->GetProvisionalDocumentLoader();
+   params.should_replace_current_entry = (docLoader ? docLoader->ReplacesCurrentHistoryItem() : false);
 
    // Sync message, renderer is blocked here.
    content::RenderThread::Get()->Send(new EwkHostMsg_DecideNavigationPolicy(
@@ -257,7 +261,7 @@ void ContentRendererClientEfl::GetNavigationErrorStrings(
         "WebKit",
         "IDS_WEBVIEW_BODY_THE_SERVER_AT_PS_CANT_BE_FOUND_BECAUSE_THE_DNS_LOOK_UP_FAILED_MSG"));
     errorMessage = base::StringPrintf(
-        errorMessage.c_str(), error.unreachableURL.string().utf8().c_str());
+        errorMessage.c_str(), error.unreachable_url.GetString().Ascii());
 
     *error_html =
       "<html>"
@@ -266,7 +270,7 @@ void ContentRendererClientEfl::GetNavigationErrorStrings(
           "initial-scale=1.0, user-scalable=no'>"
           "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"
           "<title>";
-    *error_html += error.unreachableURL.string().utf8();
+    *error_html += error.unreachable_url.GetString().Utf8();
     *error_html +=
           "</title>"
           "<style type=text/css>"
@@ -304,12 +308,12 @@ void ContentRendererClientEfl::GetNavigationErrorStrings(
   }
 }
 
-blink::WebSpeechSynthesizer* ContentRendererClientEfl::OverrideSpeechSynthesizer(
+std::unique_ptr<blink::WebSpeechSynthesizer> ContentRendererClientEfl::OverrideSpeechSynthesizer(
       blink::WebSpeechSynthesizerClient* client) {
 #if defined(OS_TIZEN)
-  return new content::TtsDispatcherEfl(client);
+  return base::MakeUnique<TtsDispatcher>(new content::TtsDispatcherEfl(client));
 #else
-  return NULL;
+  return nullptr;
 #endif
 }
 
@@ -317,15 +321,15 @@ void ContentRendererClientEfl::ApplyCustomMobileSettings(blink::WebView* webview
   // blink::WebViewImpl prevents auto zoom after tap if maximum legible scale is
   // too small. Blink by default sets it to 1 and needs to be enlarged to make
   // auto zoom work.
-  webview->setMaximumLegibleScale(maximum_legible_scale);
+  webview->SetMaximumLegibleScale(maximum_legible_scale);
 
   base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
   if (cmdline->HasSwitch(switches::kEwkEnableMobileFeaturesForDesktop)) {
-    blink::WebSettings* settings = webview->settings();
-    settings->setViewportStyle(blink::WebViewportStyle::Mobile);
-    settings->setViewportMetaEnabled(true);
-    settings->setAutoZoomFocusedNodeToLegibleScale(true);
-    webview->setDefaultPageScaleLimits(minimum_page_scale_for_mobile,
+    blink::WebSettings* settings = webview->GetSettings();
+    settings->SetViewportStyle(blink::WebViewportStyle::kMobile);
+    settings->SetViewportMetaEnabled(true);
+    settings->SetAutoZoomFocusedNodeToLegibleScale(true);
+    webview->SetDefaultPageScaleLimits(minimum_page_scale_for_mobile,
                                        maximum_page_scale_for_mobile);
   }
 }
index 0d32268ea2819a225e2c4ff08b3b7f0454f8b5e1..9f6d70f42dd35861fb679a10a3f4b828ba10c175 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef CONTENT_RENDERER_CLIENT_EFL_H
 #define CONTENT_RENDERER_CLIENT_EFL_H
 
+#include "content/public/common/url_loader_throttle.h"
 #include "content/public/renderer/content_renderer_client.h"
 #include "content/public/renderer/render_frame_observer.h"
 #include "renderer/content_renderer_client_efl.h"
@@ -44,7 +45,6 @@ class ContentRendererClientEfl : public content::ContentRendererClient
 
   bool OverrideCreatePlugin(
       content::RenderFrame* render_frame,
-      blink::WebLocalFrame* frame,
       const blink::WebPluginParams& params,
       blink::WebPlugin** plugin) override;
 
@@ -60,23 +60,22 @@ class ContentRendererClientEfl : public content::ContentRendererClient
 
   bool HandleNavigation(content::RenderFrame* render_frame,
                         content::DocumentState* document_state,
-                        int opener_id,
+                        bool render_view_was_created_by_renderer,
                         blink::WebFrame* frame,
                         const blink::WebURLRequest& request,
                         blink::WebNavigationType type,
                         blink::WebNavigationPolicy default_policy,
                         bool is_redirect) override;
 
-  bool WillSendRequest(blink::WebFrame* frame,
+  bool WillSendRequest(blink::WebLocalFrame* frame,
                        ui::PageTransition transition_type,
-                       const GURL& url,
-                       const GURL& first_party_for_cookies,
+                       const blink::WebURL& url,
+                       std::vector<std::unique_ptr<content::URLLoaderThrottle>>* throttles,
                        GURL* new_url) override;
 
   void DidCreateScriptContext(
       blink::WebFrame* frame,
       v8::Handle<v8::Context> context,
-      int extension_group,
       int world_id);
 
   void WillReleaseScriptContext(
@@ -96,7 +95,7 @@ class ContentRendererClientEfl : public content::ContentRendererClient
 
   bool IsLinkVisited(unsigned long long link_hash) override;
 
-  blink::WebSpeechSynthesizer* OverrideSpeechSynthesizer(
+  std::unique_ptr<blink::WebSpeechSynthesizer> OverrideSpeechSynthesizer(
       blink::WebSpeechSynthesizerClient* client) override;
 
  private:
index a5d1729e3185a351747014e30a4d66d7ba3d1048..f40f0a0a7954d377cf20093710e734d8bf469586 100644 (file)
@@ -6,13 +6,13 @@
 
 #include "content/public/renderer/render_view.h"
 #include "common/editing_messages.h"
-#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/blink/public/web/WebView.h"
 
 namespace editing {
 
 EditorClientAgent::EditorClientAgent(content::RenderView* render_view)
     : content::RenderViewObserver(render_view) {
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   render_view->GetWebView()->setEditorClient(this);
 #endif
 }
index 5820b91c04b20275a008674ae3c345d5ed9a0c2d..8752fe81b2af0769228433f3bfd7593a3a0668a2 100644 (file)
@@ -8,13 +8,13 @@
 #include <string>
 
 #include "content/public/renderer/render_view_observer.h"
-#if !defined(EWK_BRINGUP)
-#include "third_party/WebKit/public/web/WebEditorClient.h"
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+#include "third_party/blink/public/web/WebEditorClient.h"
 #endif
 
 namespace editing {
 
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 class EditorClientAgent : public content::RenderViewObserver,
                           public blink::WebEditorClient {
 #else
index f12b21c3c6302374db2800e0f6124785c64ef53e..bfaafaa29c28f7ad3fe924a48af057af97344617 100644 (file)
@@ -7,17 +7,16 @@
 #include <libintl.h>
 
 #include "gin/handle.h"
-#include "third_party/WebKit/public/web/WebKit.h"
+#include "third_party/blink/public/web/WebKit.h"
 
 gin::WrapperInfo PluginPlaceholderEfl::kWrapperInfo = {gin::kEmbedderNativeGin};
 
 PluginPlaceholderEfl::PluginPlaceholderEfl(
     content::RenderFrame* render_frame,
-    blink::WebLocalFrame* frame,
     const blink::WebPluginParams& params,
     const std::string& html_data)
     : plugins::LoadablePluginPlaceholder(
-          render_frame, frame, params, html_data) {
+          render_frame, params, html_data) {
 }
 
 PluginPlaceholderEfl::~PluginPlaceholderEfl() {
@@ -26,19 +25,18 @@ PluginPlaceholderEfl::~PluginPlaceholderEfl() {
 // static
 PluginPlaceholderEfl* PluginPlaceholderEfl::CreateMissingPlugin(
     content::RenderFrame* render_frame,
-    blink::WebLocalFrame* frame,
     const blink::WebPluginParams& params) {
 
   // |missing_plugin| will destroy itself when its WebViewPlugin is going away.
   PluginPlaceholderEfl* missing_plugin = new PluginPlaceholderEfl(
-      render_frame, frame, params, dgettext("WebKit", "IDS_WEBVIEW_BODY_PLUG_IN_MISSING"));
+      render_frame, params, dgettext("WebKit", "IDS_WEBVIEW_BODY_PLUG_IN_MISSING"));
   missing_plugin->AllowLoading();
   return missing_plugin;
 }
 
-void PluginPlaceholderEfl::OnLoadedRectUpdate(
-    const gfx::Rect& unobscured_rect,
-    content::RenderFrame::PeripheralContentStatus status) {
+void PluginPlaceholderEfl::OnBlockedContent(
+    content::RenderFrame::PeripheralContentStatus status,
+    bool is_same_origin) {
   NOTIMPLEMENTED();
 }
 
index 2d253dd90b730fb781ef4f107a5c76f00924e78b..80a8cfc74a83ff688372dfbe2f45f4d3bfcb82df 100644 (file)
@@ -15,16 +15,13 @@ class PluginPlaceholderEfl : public plugins::LoadablePluginPlaceholder,
   // Creates a new WebViewPlugin with a MissingPlugin as a delegate.
   static PluginPlaceholderEfl* CreateMissingPlugin(
       content::RenderFrame* render_frame,
-      blink::WebLocalFrame* frame,
       const blink::WebPluginParams& params);
-
-  void OnLoadedRectUpdate(
-      const gfx::Rect& unobscured_rect,
-      content::RenderFrame::PeripheralContentStatus status) override;
+  void OnBlockedContent(
+      content::RenderFrame::PeripheralContentStatus status,
+      bool is_same_origin) override;
 
  private:
   PluginPlaceholderEfl(content::RenderFrame* render_frame,
-                       blink::WebLocalFrame* frame,
                        const blink::WebPluginParams& params,
                        const std::string& html_data);
   ~PluginPlaceholderEfl() override;
index 4e1ba2bc19f63b434f646118916aa1db187106cb..5cc296b4a4e831969210fed51e41e5d40c777022 100644 (file)
@@ -15,9 +15,9 @@
 #include "skia/ext/platform_canvas.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "third_party/skia/include/core/SkRect.h"
-#include "third_party/WebKit/public/web/WebPrintParams.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/blink/public/web/WebPrintParams.h"
+#include "third_party/blink/public/web/WebFrame.h"
+#include "third_party/blink/public/web/WebView.h"
 
 namespace skia {
   typedef SkCanvas VectorCanvas;
@@ -40,6 +40,7 @@ int ConvertUnit(int value, int old_unit, int new_unit) {
 void ComputeWebKitPrintParamsInDesiredDpi(const PrintParams& print_params,
     blink::WebPrintParams* webkit_print_params) {
   int dpi = static_cast<int>(print_params.dpi);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   webkit_print_params->printerDPI = dpi;
   webkit_print_params->printScalingOption = print_params.print_scaling_option;
 
@@ -69,6 +70,7 @@ void ComputeWebKitPrintParamsInDesiredDpi(const PrintParams& print_params,
   webkit_print_params->paperSize.height =
       ConvertUnit(print_params.page_size.height(), dpi,
                   print_params.desired_dpi);
+#endif
 }
 
 } //namespace
@@ -85,7 +87,9 @@ PrintWebViewHelperEfl::~PrintWebViewHelperEfl() {
 void PrintWebViewHelperEfl::PrintToPdf(int width, int height) {
   InitPrintSettings(width, height, true);
   DCHECK(view_->GetWebView());
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   RenderPagesForPrint(view_->GetWebView()->mainFrame());
+#endif
 }
 
 void PrintWebViewHelperEfl::InitPrintSettings(int width, int height, bool fit_to_paper_size) {
@@ -98,10 +102,10 @@ void PrintWebViewHelperEfl::InitPrintSettings(int width, int height, bool fit_to
   settings.pages.clear();
 
   settings.params.print_scaling_option =
-      blink::WebPrintScalingOptionSourceSize;
+      blink::kWebPrintScalingOptionSourceSize;
   if (fit_to_paper_size) {
     settings.params.print_scaling_option =
-        blink::WebPrintScalingOptionFitToPrintableArea;
+        blink::kWebPrintScalingOptionFitToPrintableArea;
   }
 
   print_pages_params_.reset(new PrintPagesParams(settings));
@@ -113,16 +117,19 @@ bool PrintWebViewHelperEfl::RenderPagesForPrint(blink::WebFrame* frame) {
   const PrintParams& print_params = params.params;
   blink::WebPrintParams webkit_print_params;
   ComputeWebKitPrintParamsInDesiredDpi(print_params, &webkit_print_params);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   int page_count = frame->printBegin(webkit_print_params);
   gfx::Size print_canvas_size(webkit_print_params.printContentArea.width,
       webkit_print_params.printContentArea.height);
   bool result = PrintPagesToPdf(frame, page_count, print_canvas_size);
   frame->printEnd();
   return result;
+#endif
 }
 
 bool PrintWebViewHelperEfl::PrintPagesToPdf(blink::WebFrame* frame,
     int page_count, const gfx::Size& canvas_size) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   printing::PdfMetafileSkia metafile(printing::PDF_SKIA_DOCUMENT_TYPE);
   if (!metafile.Init())
     return false;
@@ -183,6 +190,7 @@ bool PrintWebViewHelperEfl::PrintPagesToPdf(blink::WebFrame* frame,
   } // shared memory handle scope
 
   return view_->Send(new EwkHostMsg_DidPrintPagesToPdf(view_->GetRoutingID(), printed_page_params));
+#endif
 }
 
 bool PrintWebViewHelperEfl::PrintPageInternal(
@@ -193,6 +201,8 @@ bool PrintWebViewHelperEfl::PrintPageInternal(
   PrintParams result;
   double scale_factor = 1.0f;
   gfx::Rect canvas_area(canvas_size);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: cannot convert ‘cc::PaintCanvas*’ to ‘skia::VectorCanvas* {aka SkCanvas*}’ in initialization
   skia::VectorCanvas* canvas = metafile->GetVectorCanvasForNewPage(
       params.params.page_size, canvas_area, scale_factor);
   if (!canvas)
@@ -207,4 +217,5 @@ bool PrintWebViewHelperEfl::PrintPageInternal(
     return false;
   }
   return true;
+#endif
 }
index b052f6ccc61617ccb339d59b7c8690906137cfef..71def5664ac338f5df906d51c01369952f8bff38 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "base/files/file_path.h"
 #include "common/print_pages_params.h"
-#include "third_party/WebKit/public/platform/WebCanvas.h"
+#include "third_party/blink/public/platform/WebCanvas.h"
 
 namespace content {
 class RenderView;
index ab64ef2011936ee5fb7cad06cd454f9f8e5f6433..09047d9b74536766abb54727d9821bbc4f22a60f 100644 (file)
 #include "content/renderer/external_popup_menu.h"
 #include "common/render_messages_ewk.h"
 #include "renderer/content_renderer_client_efl.h"
-#include "third_party/WebKit/public/platform/URLConversion.h"
-#include "third_party/WebKit/public/platform/WebURLError.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "third_party/WebKit/public/web/WebDocument.h"
-#include "third_party/WebKit/public/web/WebElement.h"
-#include "third_party/WebKit/public/web/WebElementCollection.h"
-#include "third_party/WebKit/public/web/WebFormElement.h"
-#include "third_party/WebKit/public/web/WebLocalFrame.h"
-#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/blink/public/platform/URLConversion.h"
+#include "third_party/blink/public/platform/WebURLError.h"
+#include "third_party/blink/public/platform/WebURLRequest.h"
+#include "third_party/blink/public/web/WebDocument.h"
+#include "third_party/blink/public/web/WebElement.h"
+#include "third_party/blink/public/web/WebElementCollection.h"
+#include "third_party/blink/public/web/WebFormElement.h"
+#include "third_party/blink/public/web/WebLocalFrame.h"
+#include "third_party/blink/public/web/WebView.h"
 
 #include "base/logging.h"
 
@@ -45,18 +45,18 @@ namespace content {
 namespace {
 
 WebElement GetFocusedElement(WebLocalFrame* frame) {
-  WebDocument doc = frame->document();
-  if (!doc.isNull())
-    return doc.focusedElement();
+  WebDocument doc = frame->GetDocument();
+  if (!doc.IsNull())
+    return doc.FocusedElement();
 
   return WebElement();
 }
 
 bool hasHTMLTagNameSelect(const WebElement& element) {
-  if (element.isNull())
+  if (element.IsNull())
     return false;
 
-  if (element.hasHTMLTagName("select"))
+  if (element.HasHTMLTagName("select"))
     return true;
 
   return false;
@@ -107,17 +107,17 @@ void RenderFrameObserverEfl::OnSelectPopupMenuItems(
 void RenderFrameObserverEfl::OnLoadNotFoundErrorPage(std::string errorUrl) {
   blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
   blink::WebURLError error;
-  error.unreachableURL = GURL(errorUrl);
-  blink::WebURLRequest failed_request(error.unreachableURL);
+  error.unreachable_url = GURL(errorUrl);
+  blink::WebURLRequest failed_request(error.unreachable_url);
   bool replace = true;
 
   std::string error_html;
   GetContentClientExport()->renderer()->GetNavigationErrorStrings(
       render_frame(), failed_request, error, &error_html, NULL);
 
-  frame->loadHTMLString(error_html,
+  frame->LoadHTMLString(error_html,
                        GURL(kUnreachableWebDataURL),
-                       error.unreachableURL,
+                       error.unreachable_url,
                        replace);
 }
 
@@ -131,25 +131,25 @@ void RenderFrameObserverEfl::OnMoveToNextOrPreviousSelectElement(bool direction)
 
 void RenderFrameObserverEfl::OnRequestSelectCollectionInformation() {
   WebElement focused_element = GetFocusedElement(render_frame()->GetWebFrame());
-  if (focused_element.isNull())
+  if (focused_element.IsNull())
     return;
 
   content::RenderView* render_view_ = render_frame()->GetRenderView();
-  WebFrame* focused_frame = render_view_->GetWebView()->focusedFrame();
+  WebLocalFrame* focused_frame = render_view_->GetWebView()->FocusedFrame();
   if (!focused_frame)
     return;
 
-  WebDocument document = focused_frame->document();
-  if (document.isNull())
+  WebDocument document = focused_frame->GetDocument();
+  if (document.IsNull())
       return;
 
-  WebElementCollection select_elements = document.getElementsByHTMLTagName("select");
+  WebElementCollection select_elements = document.GetElementsByHTMLTagName("select");
   int count = 0;
   int index = 0;
-  for (WebElement e = select_elements.firstItem();
-      !e.isNull(); e = select_elements.nextItem()) {
+  for (WebElement e = select_elements.FirstItem();
+      !e.IsNull(); e = select_elements.NextItem()) {
     // take only visible elements into account
-    if (e.hasNonEmptyLayoutSize()) {
+    if (e.HasNonEmptyLayoutSize()) {
       if (e == focused_element)
         index = count;
       ++count;
@@ -171,8 +171,8 @@ void RenderFrameObserverEfl::DidChangeScrollOffset() {
 
   blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
 
-  blink::WebSize contentsSize = frame->contentsSize();
-  blink::WebRect visibleContentRect = frame->visibleContentRect();
+  blink::WebSize contentsSize = frame->ContentsSize();
+  blink::WebRect visibleContentRect = frame->VisibleContentRect();
   blink::WebSize maximumScrollOffset(
       contentsSize.width - visibleContentRect.width,
       contentsSize.height - visibleContentRect.height);
@@ -184,27 +184,27 @@ void RenderFrameObserverEfl::DidChangeScrollOffset() {
                                                  maximumScrollOffset.height));
   }
 
-  if (last_scroll_offset_ != frame->scrollOffset()) {
-    last_scroll_offset_ = frame->scrollOffset();
+  if (last_scroll_offset_ != frame->GetScrollOffset()) {
+    last_scroll_offset_ = frame->GetScrollOffset();
     Send(new EwkHostMsg_DidChangeScrollOffset(render_frame()->GetRoutingID(),
-                                              frame->scrollOffset().width,
-                                              frame->scrollOffset().height));
+                                              frame->GetScrollOffset().width,
+                                              frame->GetScrollOffset().height));
   }
 }
 
 void RenderFrameObserverEfl::WillSubmitForm(
     const blink::WebFormElement& form) {
-  GURL url(blink::WebStringToGURL(form.action()));
+  GURL url(blink::WebStringToGURL(form.Action()));
   Send(new EwkHostMsg_FormSubmit(render_frame()->GetRoutingID(), url));
 }
 
 void RenderFrameObserverEfl::DidCreateScriptContext(
-    v8::Local<v8::Context> context, int extension_group, int world_id) {
+    v8::Local<v8::Context> context, int world_id) {
   ContentRendererClientEfl* client = static_cast<ContentRendererClientEfl*>(
       GetContentClientExport()->renderer());
 
   client->DidCreateScriptContext(
-      render_frame()->GetWebFrame(), context, extension_group, world_id);
+      render_frame()->GetWebFrame(), context, world_id);
 }
 
 void RenderFrameObserverEfl::WillReleaseScriptContext(
index 40ad6805bd5276cedfc14c2004f841458715fbed..bf45713ba6e5fb4dc0885069b61fa0c386e61307 100644 (file)
@@ -8,7 +8,7 @@
 #include <vector>
 
 #include "content/public/renderer/render_frame_observer.h"
-#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/blink/public/platform/WebSize.h"
 
 namespace blink {
 class WebElement;
@@ -33,7 +33,6 @@ class RenderFrameObserverEfl : public RenderFrameObserver {
   void WillSubmitForm(const blink::WebFormElement& form) override;
 
   void DidCreateScriptContext(v8::Local<v8::Context> context,
-                              int extension_group,
                               int world_id) override;
   void WillReleaseScriptContext(v8::Handle<v8::Context> context,
                                 int world_id) override;
index 7caecf63a779413c53fa2befd27c59461bad1a9d..33f47d32cebfdfef88fb6415220a8e1784aa9962 100644 (file)
@@ -9,12 +9,12 @@
 #include "common/content_switches_efl.h"
 #include "common/render_messages_ewk.h"
 #include "content/public/renderer/render_thread.h"
-#include "third_party/WebKit/public/web/WebCache.h"
+#include "third_party/blink/public/platform/WebCache.h"
 #include "third_party/sqlite/sqlite3.h"
 #include "v8/include/v8.h"
 #include "renderer/content_renderer_client_efl.h"
 
-#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
+#include "third_party/blink/public/platform/WebRuntimeFeatures.h"
 // XXX:  config.h needs to be included before internal blink headers.
 // XXX2: It'd be great if we did not include internal blibk headers.
 #include "third_party/WebKit/Source/platform/fonts/FontCache.h"
@@ -27,8 +27,11 @@ RenderThreadObserverEfl::RenderThreadObserverEfl(
     ContentRendererClientEfl* content_client)
     : content_client_(content_client) {
   const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: ‘EnableCSSViewModeMediaFeature’ is not a member of ‘blink::WebRuntimeFeatures’
   if (command_line.HasSwitch(switches::kEnableViewMode))
-    WebRuntimeFeatures::enableCSSViewModeMediaFeature(true);
+    WebRuntimeFeatures::EnableCSSViewModeMediaFeature(true);
+#endif
 }
 
 bool RenderThreadObserverEfl::OnControlMessageReceived(const IPC::Message& message)
@@ -44,13 +47,16 @@ bool RenderThreadObserverEfl::OnControlMessageReceived(const IPC::Message& messa
 
 void RenderThreadObserverEfl::OnClearCache()
 {
-  WebCache::clear();
+  WebCache::Clear();
 }
 
 void RenderThreadObserverEfl::OnSetCache(const CacheParamsEfl& params)
 {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: ‘setCapacities’ is not a member of ‘blink::WebCache’
   WebCache::setCapacities(static_cast<size_t>(params.cache_min_dead_capacity),
     static_cast<size_t>(params.cache_max_dead_capacity),
     static_cast<size_t>(params.cache_total_capacity));
+#endif
 }
 
index 469d238c92d0dc3dc8a279c1f43176ddccc55085..c6a7cf52102b63e3456e632cc695f028bf71f0e4 100644 (file)
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "common/hit_test_params.h"
+#include "common/render_messages_ewk.h"
 #include "content/public/renderer/content_renderer_client.h"
 #include "content/public/renderer/render_view.h"
-#include "common/render_messages_ewk.h"
-#include "common/hit_test_params.h"
-#include "third_party/WebKit/public/platform/WebCString.h"
-#include "third_party/WebKit/public/platform/WebData.h"
-#include "third_party/WebKit/public/platform/WebPoint.h"
-#include "third_party/WebKit/public/platform/WebSize.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/WebKit/public/platform/WebURLError.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "third_party/WebKit/public/web/WebDocument.h"
-#include "third_party/WebKit/public/web/WebDataSource.h"
-#include "third_party/WebKit/public/web/WebFormElement.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
-#include "third_party/WebKit/public/web/WebFrameWidget.h"
-#include "third_party/WebKit/public/web/WebHitTestResult.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
-#include "third_party/WebKit/public/web/WebLocalFrame.h"
-#include "third_party/WebKit/public/web/WebView.h"
-#include "third_party/WebKit/public/web/WebSettings.h"
+//#include "third_party/blink/public/platform/WebCString.h"
+#include "third_party/blink/public/platform/WebData.h"
+#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/platform/WebPoint.h"
+#include "third_party/blink/public/platform/WebSize.h"
+#include "third_party/blink/public/platform/WebString.h"
+#include "third_party/blink/public/platform/WebURLError.h"
+#include "third_party/blink/public/platform/WebURLRequest.h"
+//#include "third_party/blink/public/web/WebDataSource.h"
+#include "third_party/blink/public/web/WebDocument.h"
+#include "third_party/blink/public/web/WebFormElement.h"
+#include "third_party/blink/public/web/WebFrame.h"
+#include "third_party/blink/public/web/WebFrameContentDumper.h"
+#include "third_party/blink/public/web/WebFrameWidget.h"
+#include "third_party/blink/public/web/WebHitTestResult.h"
+#include "third_party/blink/public/web/WebLocalFrame.h"
+#include "third_party/blink/public/web/WebSettings.h"
+#include "third_party/blink/public/web/WebView.h"
+#include "public/web/WebFrameContentDumper.h"
 
 // XXX: config.h needs to be included before internal blink headers.
 //      It'd be great if we did not include not internal blibk headers.
 #include "third_party/WebKit/Source/platform/fonts/FontCache.h"
 
-using blink::WebDataSource;
+using blink::WebDocumentLoader;
 using blink::WebURLRequest;
 
 namespace {
@@ -47,11 +48,11 @@ namespace {
 typedef blink::WebContentSecurityPolicyType SecurityPolicyType;
 
 static_assert(
-    static_cast<int>(SecurityPolicyType::WebContentSecurityPolicyTypeReport) ==
+    static_cast<int>(SecurityPolicyType::kWebContentSecurityPolicyTypeReport) ==
         static_cast<int>(EWK_REPORT_ONLY),
     "mismatching enums : EWK_REPORT_ONLY");
 static_assert(
-    static_cast<int>(SecurityPolicyType::WebContentSecurityPolicyTypeEnforce) ==
+    static_cast<int>(SecurityPolicyType::kWebContentSecurityPolicyTypeEnforce) ==
         static_cast<int>(EWK_ENFORCE_POLICY),
     "mismatching enums : EWK_ENFORCE_POLICY");
 
@@ -90,39 +91,38 @@ bool GetGRBAValuesFromString(const std::string& input, int* r, int* g, int* b, i
 void PopulateEwkHitTestData(const blink::WebHitTestResult& web_hit_test, Hit_Test_Params* params)
 {
   DCHECK(params);
-  params->imageURI = web_hit_test.absoluteImageURL().string().utf8();
-  params->linkURI = web_hit_test.absoluteLinkURL().string().utf8();
-  params->mediaURI = web_hit_test.absoluteMediaURL().string().utf8();
-  params->linkLabel = web_hit_test.textContent().utf8();
-  params->linkTitle = web_hit_test.titleDisplayString().utf8();
-  params->isEditable = web_hit_test.isContentEditable();
+  params->imageURI = web_hit_test.AbsoluteImageURL().GetString().Utf8();
+  params->linkURI = web_hit_test.AbsoluteLinkURL().GetString().Utf8();
+  params->linkLabel = web_hit_test.textContent().Utf8();
+  params->linkTitle = web_hit_test.titleDisplayString().Utf8();
+  params->isEditable = web_hit_test.IsContentEditable();
 
   int context = EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT;
-  if (!web_hit_test.absoluteLinkURL().isEmpty())
+  if (!web_hit_test.AbsoluteLinkURL().IsEmpty())
     context |= EWK_HIT_TEST_RESULT_CONTEXT_LINK;
-  if (!web_hit_test.absoluteImageURL().isEmpty())
+  if (!web_hit_test.AbsoluteImageURL().IsEmpty())
     context |= EWK_HIT_TEST_RESULT_CONTEXT_IMAGE;
-  if (!web_hit_test.absoluteMediaURL().isEmpty())
-    context |= EWK_HIT_TEST_RESULT_CONTEXT_MEDIA;;
+  if (!web_hit_test.absoluteMediaURL().IsEmpty())
+    context |= EWK_HIT_TEST_RESULT_CONTEXT_MEDIA;
   if (web_hit_test.isSelected())
     context |= EWK_HIT_TEST_RESULT_CONTEXT_SELECTION;
-  if (web_hit_test.isContentEditable())
+  if (web_hit_test.IsContentEditable())
     context |= EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE;
-  if (web_hit_test.node().isTextNode())
+  if (web_hit_test.GetNode().IsTextNode())
     context |= EWK_HIT_TEST_RESULT_CONTEXT_TEXT;
 
   params->context = static_cast<Ewk_Hit_Test_Result_Context>(context);
 
   if (params->mode & EWK_HIT_TEST_MODE_NODE_DATA) {
-    params->nodeData.nodeValue = web_hit_test.node().nodeValue().utf8();
+    params->nodeData.nodeValue = web_hit_test.GetNode().NodeValue().Utf8();
   }
 
   if ((params->mode & EWK_HIT_TEST_MODE_IMAGE_DATA) &&
       (params->context & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE)) {
-    blink::WebElement hit_element = web_hit_test.node().toConst<blink::WebElement>();
+    blink::WebElement hit_element = web_hit_test.GetNode().ToConst<blink::WebElement>();
 
-    params->imageData.imageBitmap = hit_element.imageContents().getSkBitmap();
-    params->imageData.fileNameExtension = hit_element.imageFilenameExtension().utf8();
+    params->imageData.imageBitmap = hit_element.ImageContents().GetSkBitmap();
+    params->imageData.fileNameExtension = hit_element.imageFilenameExtension().Utf8();
   }
 }
 
@@ -131,13 +131,13 @@ void PopulateNodeAttributesMapFromHitTest(const blink::WebHitTestResult& web_hit
 {
   DCHECK(params);
 
-  if (!web_hit_test.node().isElementNode())
+  if (!web_hit_test.GetNode().IsElementNode())
     return;
 
-  blink::WebElement hit_element = web_hit_test.node().toConst<blink::WebElement>();
-  for (unsigned int i = 0; i < hit_element.attributeCount(); i++) {
+  blink::WebElement hit_element = web_hit_test.GetNode().ToConst<blink::WebElement>();
+  for (unsigned int i = 0; i < hit_element.AttributeCount(); i++) {
     params->nodeData.attributes.insert(std::pair<std::string, std::string>(
-        hit_element.attributeLocalName(i).utf8(), hit_element.attributeValue(i).utf8()));
+        hit_element.AttributeLocalName(i).Utf8(), hit_element.AttributeValue(i).Utf8()));
   }
 }
 
@@ -189,27 +189,13 @@ void RenderViewObserverEfl::OnDestruct() {
   delete this;
 }
 
-void RenderViewObserverEfl::DidCreateDocumentElement(blink::WebLocalFrame* frame)
-{
-  std::string policy;
-  Ewk_CSP_Header_Type type = EWK_DEFAULT_POLICY;
-  Send(new EwkHostMsg_GetContentSecurityPolicy(render_view()->GetRoutingID(), &policy, &type));
-
-  // Since, Webkit supports some more types and we cast ewk type to Webkit type.
-  // We allow only ewk types.
-  if (type == EWK_REPORT_ONLY || type == EWK_ENFORCE_POLICY) {
-    frame->document().setContentSecurityPolicyUsingHeader(
-        blink::WebString::fromUTF8(policy), ToSecurityPolicyType(type));
-  }
-}
-
 void RenderViewObserverEfl::OnSetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type)
 {
   blink::WebView* view = render_view()->GetWebView();
   DCHECK(view);
-  blink::WebDocument document = view->mainFrame()->document();
+  blink::WebDocument document = view->FocusedFrame()->GetDocument();
 
-  document.setContentSecurityPolicyUsingHeader(blink::WebString::fromUTF8(policy),
+  document.setContentSecurityPolicyUsingHeader(blink::WebString::FromUTF8(policy),
       ToSecurityPolicyType(header_type));
 }
 
@@ -219,22 +205,22 @@ void RenderViewObserverEfl::OnScale(double scale_factor, int x, int y)
   if (!view)
     return;
 
-  view->setPageScaleFactor(scale_factor);
+  view->SetPageScaleFactor(scale_factor);
 }
 
 void RenderViewObserverEfl::OnSetScroll(int x, int y)
 {
-  blink::WebFrame* frame = render_view()->GetWebView()->mainFrame();
+  blink::WebLocalFrame* frame = render_view()->GetWebView()->FocusedFrame();
   if (!frame)
     return;
-  frame->setScrollOffset(blink::WebSize(x, y));
+  frame->SetScrollOffset(blink::WebSize(x, y));
 }
 
 void RenderViewObserverEfl::OnUseSettingsFont()
 {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   blink::FontCache::fontCache()->invalidate();
 
-#if !defined(EWK_BRINGUP)
   blink::WebView* view = render_view()->GetWebView();
   if (view)
     view->sendResizeEventAndForceLayout();
@@ -244,9 +230,9 @@ void RenderViewObserverEfl::OnUseSettingsFont()
 void RenderViewObserverEfl::OnPlainTextGet(int plain_text_get_callback_id)
 {
   // WebFrameContentDumper should only be used for testing purposes. See http://crbug.com/585164.
-  blink::WebString content = blink::WebFrameContentDumper::dumpWebViewAsText(
+  blink::WebString content = blink::WebFrameContentDumper::DumpWebViewAsText(
       render_view()->GetWebView(), INT_MAX);
-  Send(new EwkHostMsg_PlainTextGetContents(render_view()->GetRoutingID(), content.utf8(), plain_text_get_callback_id));
+  Send(new EwkHostMsg_PlainTextGetContents(render_view()->GetRoutingID(), content.Utf8(), plain_text_get_callback_id));
 }
 
 void RenderViewObserverEfl::OnGetSelectionStyle()
@@ -255,27 +241,30 @@ void RenderViewObserverEfl::OnGetSelectionStyle()
   if (!view)
     return;
 
-  blink::WebFrame* frame = view->focusedFrame();
+  blink::WebLocalFrame* frame = view->FocusedFrame();
   if (!frame)
     return;
 
   SelectionStylePrams params;
-  params.underline_state = frame->commandState(blink::WebString::fromUTF8("underline"));
-  params.italic_state = frame->commandState(blink::WebString::fromUTF8("italic"));
-  params.bold_state = frame->commandState(blink::WebString::fromUTF8("bold"));
-  blink::WebString bg_color = frame->commandValue(blink::WebString::fromUTF8("BackColor"));
-  GetGRBAValuesFromString(std::string(bg_color.utf8()), &params.bg_color.r, &params.bg_color.g, &params.bg_color.b, &params.bg_color.a);
-  blink::WebString color = frame->commandValue(blink::WebString::fromUTF8("ForeColor"));
-  GetGRBAValuesFromString(std::string(color.utf8()), &params.color.r, &params.color.g, &params.color.b, &params.color.a);
-  blink::WebString  font_size = frame->commandValue(blink::WebString::fromUTF8("FontSize"));
-  params.font_size = font_size.utf8();
-  params.order_list_state = frame->commandState(blink::WebString::fromUTF8("InsertOrderedList"));
-  params.un_order_list_state = frame->commandState(blink::WebString::fromUTF8("InsertUnorderedList"));
-  params.text_align_center_state = frame->commandState(blink::WebString::fromUTF8("JustifyCenter"));
-  params.text_align_left_state = frame->commandState(blink::WebString::fromUTF8("JustifyLeft"));
-  params.text_align_right_state = frame->commandState(blink::WebString::fromUTF8("JustifyRight"));
-  params.text_align_full_state = frame->commandState(blink::WebString::fromUTF8("JustifyFull"));
+  params.underline_state = frame->commandState(blink::WebString::FromUTF8("underline"));
+  params.italic_state = frame->commandState(blink::WebString::FromUTF8("italic"));
+  params.bold_state = frame->commandState(blink::WebString::FromUTF8("bold"));
+  blink::WebString bg_color = frame->commandValue(blink::WebString::FromUTF8("BackColor"));
+  GetGRBAValuesFromString(std::string(bg_color.Utf8()), &params.bg_color.r, &params.bg_color.g, &params.bg_color.b, &params.bg_color.a);
+  blink::WebString color = frame->commandValue(blink::WebString::FromUTF8("ForeColor"));
+  GetGRBAValuesFromString(std::string(color.Utf8()), &params.color.r, &params.color.g, &params.color.b, &params.color.a);
+  blink::WebString font_size = frame->commandValue(blink::WebString::FromUTF8("FontSize"));
+  params.font_size = font_size.Utf8();
+  params.order_list_state = frame->commandState(blink::WebString::FromUTF8("InsertOrderedList"));
+  params.un_order_list_state = frame->commandState(blink::WebString::FromUTF8("InsertUnorderedList"));
+  params.text_align_center_state = frame->commandState(blink::WebString::FromUTF8("JustifyCenter"));
+  params.text_align_left_state = frame->commandState(blink::WebString::FromUTF8("JustifyLeft"));
+  params.text_align_right_state = frame->commandState(blink::WebString::FromUTF8("JustifyRight"));
+  params.text_align_full_state = frame->commandState(blink::WebString::FromUTF8("JustifyFull"));
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   params.has_composition = frame->hasMarkedText();
+#endif  // !defined(EWK_BRINGUP)
   Send(new EwkViewMsg_SelectionTextStyleState(render_view()->GetRoutingID(), params));
 }
 
@@ -305,10 +294,10 @@ bool RenderViewObserverEfl::DoHitTest(int view_x, int view_y, Ewk_Hit_Test_Mode
     return false;
 
   const blink::WebHitTestResult web_hit_test_result =
-      render_view()->GetWebView()->hitTestResultAt(
+      render_view()->GetWebView()->HitTestResultAt(
           blink::WebPoint(view_x, view_y));
 
-  if (web_hit_test_result.node().isNull())
+  if (web_hit_test_result.GetNode().IsNull())
     return false;
 
   params->mode = mode;
@@ -335,7 +324,7 @@ void RenderViewObserverEfl::OnGetMHTMLData(int callback_id)
     return;
 
   std::string content_string;
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
 #pragma message "[M49] WebPageSerializer has been removed from blink. Check for alternative."
   blink::WebCString content =  blink::WebPageSerializer::serializeToMHTML(view);
   if (!content.isEmpty())
@@ -351,7 +340,7 @@ void RenderViewObserverEfl::DidChangePageScaleFactor()
   if (!view)
     return;
 
-  Send(new EwkHostMsg_DidChangePageScaleFactor(render_view()->GetRoutingID(), view->pageScaleFactor()));
+  Send(new EwkHostMsg_DidChangePageScaleFactor(render_view()->GetRoutingID(), view->PageScaleFactor()));
 }
 
 void RenderViewObserverEfl::DidUpdateLayout()
@@ -368,15 +357,15 @@ void RenderViewObserverEfl::DidUpdateLayout()
 void RenderViewObserverEfl::CheckContentsSize()
 {
   blink::WebView* view = render_view()->GetWebView();
-  if (!view || !view->mainFrame())
+  if (!view || !view->MainFrame())
     return;
 
-  gfx::Size contents_size = view->mainFrame()->contentsSize();
+  gfx::Size contents_size = view->MainFrame()->ToWebLocalFrame()->ContentsSize();
 
   // Fall back to contentsPreferredMinimumSize if the mainFrame is reporting a
   // 0x0 size (this happens during initial load).
   if (contents_size.IsEmpty()) {
-    contents_size = render_view()->GetWebView()->contentsPreferredMinimumSize();
+    contents_size = render_view()->GetWebView()->ContentsPreferredMinimumSize();
   }
 
   if (contents_size == last_sent_contents_size_)
@@ -398,19 +387,19 @@ void RenderViewObserverEfl::OnSetDrawsTransparentBackground(bool draws_transpare
   blink::WebColor backgroundColor = draws_transparent_background ?
       static_cast<blink::WebColor>(0x00000000) : static_cast<blink::WebColor>(0xFFFFFFFF);
 
-  widget->setBaseBackgroundColor(backgroundColor);
+  widget->SetBaseBackgroundColor(backgroundColor);
 }
 
 void RenderViewObserverEfl::OnWebAppIconUrlGet(int callback_id)
 {
-  blink::WebFrame *frame = render_view()->GetWebView()->mainFrame();
+  blink::WebFrame *frame = render_view()->GetWebView()->MainFrame();
   if (!frame) {
     return;
   }
 
-  blink::WebDocument document = frame->document();
-  blink::WebElement head = document.head();
-  if (head.isNull()) {
+  blink::WebDocument document = frame->ToWebLocalFrame()->GetDocument();
+  blink::WebElement head = document.Head();
+  if (head.IsNull()) {
     return;
   }
 
@@ -419,55 +408,55 @@ void RenderViewObserverEfl::OnWebAppIconUrlGet(int callback_id)
   // We're looking for Apple style rel ("apple-touch-*")
   // and Google style rel ("icon"), but we prefer the Apple one
   // when both appear, as WebKit-efl was looking only for Apple style rels.
-  for (blink::WebNode node = head.firstChild(); !node.isNull();
-       node = node.nextSibling()) {
-    if (!node.isElementNode()) {
+  for (blink::WebNode node = head.FirstChild(); !node.IsNull();
+       node = node.NextSibling()) {
+    if (!node.IsElementNode()) {
       continue;
     }
-    blink::WebElement elem = node.to<blink::WebElement>();
-    if (!elem.hasHTMLTagName("link")) {
+    blink::WebElement elem = node.To<blink::WebElement>();
+    if (!elem.HasHTMLTagName("link")) {
       continue;
     }
-    std::string rel = elem.getAttribute("rel").utf8();
+    std::string rel = elem.GetAttribute("rel").Utf8();
     if (base::LowerCaseEqualsASCII(rel, "apple-touch-icon") ||              // Apple's way
         base::LowerCaseEqualsASCII(rel, "apple-touch-icon-precomposed")) {
-      appleIconUrl = document.completeURL(elem.getAttribute("href")).string().utf8();
+      appleIconUrl = document.CompleteURL(elem.GetAttribute("href")).GetString().Utf8();
       break;
     } else if (base::LowerCaseEqualsASCII(rel, "icon")) {                   // Google's way
-      iconUrl = document.completeURL(elem.getAttribute("href")).string().utf8();
+      iconUrl = document.CompleteURL(elem.GetAttribute("href")).GetString().Utf8();
     }
   }
   Send(new EwkHostMsg_WebAppIconUrlGet(render_view()->GetRoutingID(), appleIconUrl.empty() ? iconUrl : appleIconUrl, callback_id));
 }
 
 void RenderViewObserverEfl::OnWebAppIconUrlsGet(int callback_id) {
-  blink::WebFrame *frame = render_view()->GetWebView()->mainFrame();
+  blink::WebFrame *frame = render_view()->GetWebView()->MainFrame();
   if (!frame) {
     return;
   }
 
-  blink::WebDocument document = frame->document();
-  blink::WebElement head = document.head();
-  if (head.isNull()) {
+  blink::WebDocument document = frame->ToWebLocalFrame()->GetDocument();
+  blink::WebElement head = document.Head();
+  if (head.IsNull()) {
     return;
   }
 
   std::map<std::string, std::string> iconUrls;
-  for (blink::WebNode node = head.firstChild(); !node.isNull();
-       node = node.nextSibling()) {
-    if (!node.isElementNode()) {
+  for (blink::WebNode node = head.FirstChild(); !node.IsNull();
+       node = node.NextSibling()) {
+    if (!node.IsElementNode()) {
       continue;
     }
-    blink::WebElement elem = node.to<blink::WebElement>();
-    if (!elem.hasHTMLTagName("link")) {
+    blink::WebElement elem = node.To<blink::WebElement>();
+    if (!elem.HasHTMLTagName("link")) {
       continue;
     }
-    std::string rel = elem.getAttribute("rel").utf8();
+    std::string rel = elem.GetAttribute("rel").Utf8();
     if (base::LowerCaseEqualsASCII(rel, "apple-touch-icon") ||              // Apple's way
         base::LowerCaseEqualsASCII(rel, "apple-touch-icon-precomposed") ||  // same here
         base::LowerCaseEqualsASCII(rel, "icon")) {                          // Google's way
-      std::string iconSize = elem.getAttribute("sizes").utf8();
-      std::string iconUrl = document.completeURL(elem.getAttribute("href")).string().utf8();
+      std::string iconSize = elem.GetAttribute("sizes").Utf8();
+      std::string iconUrl = document.CompleteURL(elem.GetAttribute("href")).GetString().Utf8();
 
       iconUrls[iconSize] = iconUrl;
     }
@@ -476,29 +465,29 @@ void RenderViewObserverEfl::OnWebAppIconUrlsGet(int callback_id) {
 }
 
 void RenderViewObserverEfl::OnWebAppCapableGet(int callback_id) {
-  blink::WebFrame *frame = render_view()->GetWebView()->mainFrame();
+  blink::WebFrame *frame = render_view()->GetWebView()->MainFrame();
   if (!frame)
     return;
 
-  blink::WebDocument document = frame->document();
-  blink::WebElement head = document.head();
-  if (head.isNull())
+  blink::WebDocument document = frame->ToWebLocalFrame()->GetDocument();
+  blink::WebElement head = document.Head();
+  if (head.IsNull())
     return;
 
   bool capable = false;
-  for (blink::WebNode node = head.firstChild(); !node.isNull();
-       node = node.nextSibling()) {
-    if (!node.isElementNode())
+  for (blink::WebNode node = head.FirstChild(); !node.IsNull();
+       node = node.NextSibling()) {
+    if (!node.IsElementNode())
       continue;
 
-    blink::WebElement elem = node.to<blink::WebElement>();
-    if (!elem.hasHTMLTagName("meta"))
+    blink::WebElement elem = node.To<blink::WebElement>();
+    if (!elem.HasHTMLTagName("meta"))
       continue;
 
-    std::string name = elem.getAttribute("name").utf8();
+    std::string name = elem.GetAttribute("name").Utf8();
     if (base::LowerCaseEqualsASCII(name, "apple-mobile-web-app-capable") ||   // Apple's way
         base::LowerCaseEqualsASCII(name, "mobile-web-app-capable")) {         // Google's way
-      std::string content = elem.getAttribute("content").utf8();
+      std::string content = elem.GetAttribute("content").Utf8();
       if (base::LowerCaseEqualsASCII(content, "yes")) {
         capable = true;
       }
@@ -510,18 +499,22 @@ void RenderViewObserverEfl::OnWebAppCapableGet(int callback_id) {
 
 void RenderViewObserverEfl::DidHandleGestureEvent(const blink::WebGestureEvent& event)
 {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   if (event.type == blink::WebInputEvent::GestureTap)
     HandleTap(event);
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderViewObserverEfl::OnSetBrowserFont()
 {
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   blink::WebView* view = render_view()->GetWebView();
   if (view) {
     view->setBrowserFont();
   }
-#endif
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderViewObserverEfl::OnSuspendScheduledTasks()
@@ -539,19 +532,21 @@ void RenderViewObserverEfl::OnResumeScheduledTasks()
 }
 
 void RenderViewObserverEfl::OnSetViewMode(blink::WebViewMode view_mode) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
   blink::WebView* view = render_view()->GetWebView();
   if (view)
     view->setViewMode(view_mode);
+#endif
 }
 
 void RenderViewObserverEfl::OnUpdateWebKitPreferencesEfl(const WebPreferencesEfl& web_preferences_efl)
 {
   blink::WebView* view = render_view()->GetWebView();
-  if (view && view->settings()) {
-    blink::WebSettings* settings = view->settings();
-    settings->setShrinksViewportContentToFit(web_preferences_efl.shrinks_viewport_content_to_fit);
+  if (view && view->GetSettings()) {
+    blink::WebSettings* settings = view->GetSettings();
+    settings->SetShrinksViewportContentToFit(web_preferences_efl.shrinks_viewport_content_to_fit);
     // Allows resetting the scale factor when "auto fitting" gets disabled.
-    settings->setLoadWithOverviewMode(web_preferences_efl.shrinks_viewport_content_to_fit);
+    settings->SetLoadWithOverviewMode(web_preferences_efl.shrinks_viewport_content_to_fit);
     // and more if they exist in web_preferences_efl.
   }
 
@@ -562,6 +557,8 @@ void RenderViewObserverEfl::OnUpdateWebKitPreferencesEfl(const WebPreferencesEfl
 
 void RenderViewObserverEfl::HandleTap(const blink::WebGestureEvent& event)
 {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   // In order to closely match our touch adjustment logic, we
   // perform a hit test "for tap" using the same "padding" as the
   // original tap event. That way, touch adjustment picks up a link
@@ -575,6 +572,7 @@ void RenderViewObserverEfl::HandleTap(const blink::WebGestureEvent& event)
   bool hit_content_editable = web_hit_test_result.isContentEditable();
   Send(new EwkHostMsg_HandleTapGestureWithContext(render_view()->GetRoutingID(),
       hit_link, hit_content_editable));
+#endif  // !defined(EWK_BRINGUP)
 }
 
 void RenderViewObserverEfl::OnSetTextZoomFactor(float zoom_factor) {
@@ -583,6 +581,6 @@ void RenderViewObserverEfl::OnSetTextZoomFactor(float zoom_factor) {
     return;
 
   // Hide selection and autofill popups.
-  view->hidePopups();
-  view->setTextZoomFactor(zoom_factor);
+  view->HidePopups();
+  view->SetTextZoomFactor(zoom_factor);
 }
index 7784a51f4731a8ad9a48341b5a9e0d6274e5aab0..d7d9ebd107a66a8ea08fffb7e0616a41fd96a8a8 100644 (file)
@@ -17,8 +17,8 @@
 #include "private/ewk_hit_test_private.h"
 #include "public/ewk_hit_test.h"
 #include "public/ewk_view.h"
-#include "third_party/WebKit/public/platform/WebSize.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
+#include "third_party/blink/public/platform/WebSize.h"
+#include "third_party/blink/public/web/WebViewModeEnums.h"
 
 namespace base {
 class FilePath;
@@ -49,7 +49,6 @@ class RenderViewObserverEfl: public content::RenderViewObserver {
 
   bool OnMessageReceived(const IPC::Message& message) override;
   void OnDestruct() override;
-  virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) override;
   virtual void DidChangePageScaleFactor() override;
 
   //Changes in PageScaleFactorLimits are applied when layoutUpdated is called
index 393a6370f09747ffd5ff44b1ecddc5be04398b9d..fc378c3f9d5a080dd4cedcfe442f0e58dfd5f9fd 100644 (file)
@@ -6,74 +6,43 @@
 
 #include <algorithm>
 #include <string>
+#include <vector>
 
 namespace {
 
-  // The below Encodings have been taken from
-  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp
-  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp
-  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp
-  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
-  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp
-  //
-  // The TextEncodingNameMap(present in /chromium/src/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp)
-  // is contructed by combining the Encodings and aliases present in the above files.
-  //
-  // The character encoding list used by chrome browser is also used as reference. It is located in :
-  // chromium/src/chrome/browser/character_encoding.cc
+// The below Encodings have been taken from
+// chromium/src/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp
+// chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp
+// chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp
+// chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
+// chromium/src/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp
+//
+// The TextEncodingNameMap(present in
+// /chromium/src/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp)
+// is contructed by combining the Encodings and aliases present in the above
+// files.
+//
+// The character encoding list used by chrome browser is also used as reference.
+// It is located in :
+// chromium/src/chrome/browser/character_encoding.cc
 
 const std::vector<std::string> TextEncodingNameMap = {
-"windows-1252",
-"ISO-8859-1",
-"US-ASCII",
-"UTF-8",
-"UTF-16LE",
-"UTF-16BE",
-"x-user-defined",
-"ISO-8859-8-I",
-"GBK",
-"GB_2312-80",
-"EUC-KR",
-"Windows-1254",
-"Windows-874",
-"Big5",
-"macintosh",
-"EUC-JP",
-"Big5-HKSCS",
-"Shift_JIS",
-"EUC-JP",
-"ISO-2022-JP",
-"windows-874",
-"windows-949",
-"ISO-8859-15",
-"ISO-8859-2",
-"windows-1250",
-"windows-1251",
-"windows-1258",
-"KOI8-R",
-"ISO-8859-7",
-"windows-1253",
-"windows-1256",
-"windows-1257",
-"ISO-8859-8",
-"windows-1254",
-"windows-1255",
-"ISO-8859-6",
-"ISO-8859-1",
-"ISO-8859-3",
-"ISO-8859-4",
-"ISO-8859-10",
-"ISO-8859-13",
-"ISO-8859-14",
-"ISO-8859-5",
-"ISO-8859-9",
-"cp864",
-"x-mac-cyrillic"
-};
+    "windows-1252", "ISO-8859-1",    "US-ASCII",       "UTF-8",
+    "UTF-16LE",     "UTF-16BE",      "x-user-defined", "ISO-8859-8-I",
+    "GBK",          "GB_2312-80",    "EUC-KR",         "Windows-1254",
+    "Windows-874",  "Big5",          "macintosh",      "EUC-JP",
+    "Big5-HKSCS",   "Shift_JIS",     "EUC-JP",         "ISO-2022-JP",
+    "windows-874",  "windows-949",   "ISO-8859-15",    "ISO-8859-2",
+    "windows-1250", "windows-1251",  "windows-1258",   "KOI8-R",
+    "ISO-8859-7",   "windows-1253",  "windows-1256",   "windows-1257",
+    "ISO-8859-8",   "windows-1254",  "windows-1255",   "ISO-8859-6",
+    "ISO-8859-1",   "ISO-8859-3",    "ISO-8859-4",     "ISO-8859-10",
+    "ISO-8859-13",  "ISO-8859-14",   "ISO-8859-5",     "ISO-8859-9",
+    "cp864",        "x-mac-cyrillic"};
 
-} //namespace
+}  // namespace
 
-//static
+// static
 TextEncodingMapEfl* TextEncodingMapEfl::GetInstance() {
   return base::Singleton<TextEncodingMapEfl>::get();
 }
index 4b4dae1b64402e1077e1288b47ccaa689057d19d..dba6d14be70dd7a8bcb9a4c90629073770971aa2 100644 (file)
@@ -6,15 +6,16 @@
 #include "url_request_context_getter_efl.h"
 
 #include "base/command_line.h"
+#include "base/task_scheduler/post_task.h"
 #include "base/files/file_util.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
-#include "base/threading/worker_pool.h"
 #include "base/threading/sequenced_worker_pool.h"
+#include "chrome/common/chrome_switches.h"
 #include "content/public/browser/cookie_store_factory.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/url_constants.h"
-#include "components/network_session_configurator/switches.h"
+#include "http_user_agent_settings_efl.h"
 #include "net/base/cache_type.h"
 #include "net/cert/cert_verifier.h"
 #include "net/cert/ct_policy_enforcer.h"
@@ -35,7 +36,7 @@
 #include "net/url_request/url_request_intercepting_job_factory.h"
 #include "net/url_request/url_request_job_factory_impl.h"
 #include "network_delegate_efl.h"
-#include "http_user_agent_settings_efl.h"
+#include "components/network_session_configurator/common/network_switches.h"
 
 using net::SQLitePersistentCookieStore;
 
@@ -45,10 +46,8 @@ namespace {
 
 void InstallProtocolHandlers(net::URLRequestJobFactoryImpl* job_factory,
                              ProtocolHandlerMap* protocol_handlers) {
-  for (ProtocolHandlerMap::iterator it =
-           protocol_handlers->begin();
-       it != protocol_handlers->end();
-       ++it) {
+  for (ProtocolHandlerMap::iterator it = protocol_handlers->begin();
+       it != protocol_handlers->end(); ++it) {
     bool set_protocol = job_factory->SetProtocolHandler(
         it->first, base::WrapUnique(it->second.release()));
     DCHECK(set_protocol);
@@ -81,18 +80,18 @@ URLRequestContextGetterEfl::URLRequestContextGetterEfl(
   if (protocol_handlers)
     std::swap(protocol_handlers_, *protocol_handlers);
 
-  proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService(
-      io_task_runner, file_task_runner);
+  proxy_config_service_ =
+      net::ProxyService::CreateSystemProxyConfigService(io_task_runner);
 }
 
-URLRequestContextGetterEfl::~URLRequestContextGetterEfl() {
-}
+URLRequestContextGetterEfl::~URLRequestContextGetterEfl() {}
 
 net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
 
   if (!url_request_context_) {
-    const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+    const base::CommandLine& command_line =
+        *base::CommandLine::ForCurrentProcess();
 
     url_request_context_.reset(new net::URLRequestContext());
     if (net_log_) {
@@ -100,17 +99,15 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
     }
 
     if (!network_delegate_.get())
-      network_delegate_.reset(new net::NetworkDelegateEfl(
-          base::WeakPtr<CookieManager>()));
+      network_delegate_.reset(
+          new net::NetworkDelegateEfl(base::WeakPtr<CookieManager>()));
 
     url_request_context_->set_network_delegate(network_delegate_.get());
     storage_.reset(
         new net::URLRequestContextStorage(url_request_context_.get()));
-    storage_->set_cookie_store(
-        CreateCookieStore(CookieStoreConfig()));
-    storage_->set_channel_id_service(base::WrapUnique(new net::ChannelIDService(
-        new net::DefaultChannelIDStore(NULL),
-        base::WorkerPool::GetTaskRunner(true))));
+    storage_->set_cookie_store(CreateCookieStore(CookieStoreConfig()));
+    storage_->set_channel_id_service(base::WrapUnique(
+        new net::ChannelIDService(new net::DefaultChannelIDStore(NULL))));
     storage_->set_http_user_agent_settings(
         base::WrapUnique(new HttpUserAgentSettingsEfl()));
 
@@ -129,8 +126,7 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
     // TODO(jam): use v8 if possible, look at chrome code.
     storage_->set_proxy_service(
         net::ProxyService::CreateUsingSystemProxyResolver(
-            std::move(proxy_config_service_), 0,
-            url_request_context_->net_log()));
+            std::move(proxy_config_service_), url_request_context_->net_log()));
 
     storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
     storage_->set_http_auth_handler_factory(
@@ -142,54 +138,52 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
     net::HttpCache::DefaultBackend* main_backend = NULL;
     if (base_path_.empty()) {
       main_backend = new net::HttpCache::DefaultBackend(
-          net::MEMORY_CACHE,
-          net::CACHE_BACKEND_DEFAULT,
-          base::FilePath(),
-          0,
-          BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
+          net::MEMORY_CACHE, net::CACHE_BACKEND_DEFAULT, base::FilePath(), 0);
     } else {
       base::FilePath cache_path = base_path_.Append(FILE_PATH_LITERAL("Cache"));
 
       main_backend = new net::HttpCache::DefaultBackend(
-          net::DISK_CACHE,
-          net::CACHE_BACKEND_DEFAULT,
-          cache_path,
-          0,
-          BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
+          net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, cache_path, 0);
     }
-    net::HttpNetworkSession::Params network_session_params;
-    network_session_params.cert_verifier =
+
+    net::HttpNetworkSession::Context network_session_context;
+    network_session_context.cert_verifier =
         url_request_context_->cert_verifier();
-    network_session_params.transport_security_state =
+    network_session_context.transport_security_state =
         url_request_context_->transport_security_state();
-    network_session_params.cert_transparency_verifier =
+    network_session_context.cert_transparency_verifier =
         url_request_context_->cert_transparency_verifier();
-    network_session_params.ct_policy_enforcer =
+    network_session_context.ct_policy_enforcer =
         url_request_context_->ct_policy_enforcer();
-    network_session_params.channel_id_service =
+    network_session_context.channel_id_service =
         url_request_context_->channel_id_service();
-    network_session_params.proxy_service =
-        url_request_context_->proxy_service();
-    network_session_params.ssl_config_service =
+    network_session_context.ssl_config_service =
         url_request_context_->ssl_config_service();
-    network_session_params.http_auth_handler_factory =
+    network_session_context.http_auth_handler_factory =
         url_request_context_->http_auth_handler_factory();
-    network_session_params.http_server_properties =
+    network_session_context.net_log = url_request_context_->net_log();
+    network_session_context.host_resolver =
+        url_request_context_->host_resolver();
+    network_session_context.proxy_service =
+        url_request_context_->proxy_service();
+    network_session_context.http_server_properties =
         url_request_context_->http_server_properties();
-    network_session_params.net_log =
-        url_request_context_->net_log();
+
+    net::HttpNetworkSession::Params network_session_params;
     network_session_params.ignore_certificate_errors =
         ignore_certificate_errors_;
     if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) {
       int value;
-      base::StringToInt(command_line.GetSwitchValueASCII(
-          switches::kTestingFixedHttpPort), &value);
+      base::StringToInt(
+          command_line.GetSwitchValueASCII(switches::kTestingFixedHttpPort),
+          &value);
       network_session_params.testing_fixed_http_port = value;
     }
     if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) {
       int value;
-      base::StringToInt(command_line.GetSwitchValueASCII(
-          switches::kTestingFixedHttpsPort), &value);
+      base::StringToInt(
+          command_line.GetSwitchValueASCII(switches::kTestingFixedHttpsPort),
+          &value);
       network_session_params.testing_fixed_https_port = value;
     }
     if (command_line.HasSwitch(switches::kHostResolverRules)) {
@@ -202,11 +196,9 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
 
     // Give |storage_| ownership at the end in case it's |mapped_host_resolver|.
     storage_->set_host_resolver(std::move(host_resolver));
-    network_session_params.host_resolver =
-        url_request_context_->host_resolver();
 
-    http_network_session_.reset(
-        new net::HttpNetworkSession(network_session_params));
+    http_network_session_.reset(new net::HttpNetworkSession(
+        network_session_params, network_session_context));
 
     net::HttpCache* main_cache = new net::HttpCache(
         http_network_session_.get(), base::WrapUnique(main_backend), true);
@@ -224,9 +216,10 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
     set_protocol = job_factory->SetProtocolHandler(
         url::kFileScheme,
         base::WrapUnique(new net::FileProtocolHandler(
-          BrowserThread::GetBlockingPool()->
-            GetTaskRunnerWithShutdownBehavior(
-              base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
+            base::CreateTaskRunnerWithTraits(
+                {base::MayBlock(), base::TaskPriority::BACKGROUND,
+                 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})
+                .get())));
     DCHECK(set_protocol);
 
     // Set up interceptors in the reverse order.
@@ -234,12 +227,11 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
         std::move(job_factory);
     for (URLRequestInterceptorScopedVector::reverse_iterator i =
              request_interceptors_.rbegin();
-         i != request_interceptors_.rend();
-         ++i) {
+         i != request_interceptors_.rend(); ++i) {
       top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
-          std::move(top_job_factory), base::WrapUnique(*i)));
+          std::move(top_job_factory), std::move(*i)));
     }
-    request_interceptors_.weak_clear();
+    request_interceptors_.clear();
 
     storage_->set_job_factory(base::WrapUnique(top_job_factory.release()));
   }
@@ -248,8 +240,8 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() {
 }
 
 scoped_refptr<base::SingleThreadTaskRunner>
-    URLRequestContextGetterEfl::GetNetworkTaskRunner() const {
-  return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
+URLRequestContextGetterEfl::GetNetworkTaskRunner() const {
+  return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
 }
 
 net::HostResolver* URLRequestContextGetterEfl::host_resolver() {
@@ -260,17 +252,16 @@ void URLRequestContextGetterEfl::SetCookieStoragePath(
     const base::FilePath& path,
     bool persist_session_cookies,
     Ewk_Cookie_Persistent_Storage file_storage) {
-  if (url_request_context_->cookie_store() &&
-      (cookie_store_path_ == path)) {
+  if (url_request_context_->cookie_store() && (cookie_store_path_ == path)) {
     // The path has not changed so don't do anything.
     return;
   }
 
   if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
     BrowserThread::PostTask(
-      BrowserThread::IO, FROM_HERE,
-      base::Bind(&URLRequestContextGetterEfl::SetCookieStoragePath,
-                 this, path, persist_session_cookies, file_storage));
+        BrowserThread::IO, FROM_HERE,
+        base::Bind(&URLRequestContextGetterEfl::SetCookieStoragePath, this,
+                   path, persist_session_cookies, file_storage));
     return;
   }
 
@@ -284,24 +275,20 @@ void URLRequestContextGetterEfl::SetCookieStoragePath(
 
 void URLRequestContextGetterEfl::CreateSQLitePersistentCookieStore(
     const base::FilePath& path,
-    bool persist_session_cookies)
-{
+    bool persist_session_cookies) {
   using content::CookieStoreConfig;
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-  scoped_refptr<SQLitePersistentCookieStore> persistent_store;
+  scoped_refptr<net::SQLitePersistentCookieStore> persistent_store;
 
   if (path.empty())
     return;
   base::ThreadRestrictions::ScopedAllowIO allow_io;
-  if (base::DirectoryExists(path) ||
-      base::CreateDirectory(path)) {
+  if (base::DirectoryExists(path) || base::CreateDirectory(path)) {
     const base::FilePath& cookie_path = path.AppendASCII("Cookies");
-    persistent_store =
-      new SQLitePersistentCookieStore(
-          cookie_path,
-          BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
-          BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
-          persist_session_cookies, NULL);
+    persistent_store = new net::SQLitePersistentCookieStore(
+        cookie_path, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+        BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
+        persist_session_cookies, NULL);
   } else {
     NOTREACHED() << "The cookie storage directory could not be created";
     return;
@@ -318,32 +305,32 @@ void URLRequestContextGetterEfl::CreateSQLitePersistentCookieStore(
 
   std::vector<std::string> schemes;
   for (int i = 0; i < net::CookieMonster::kDefaultCookieableSchemesCount; ++i)
-    schemes.push_back(std::string(net::CookieMonster::kDefaultCookieableSchemes[i]));
+    schemes.push_back(
+        std::string(net::CookieMonster::kDefaultCookieableSchemes[i]));
   schemes.push_back(url::kFileScheme);
   cookie_monster->SetCookieableSchemes(schemes);
 
   cookie_store_path_ = path;
 }
 
-void URLRequestContextGetterEfl::CreatePersistentCookieStore(const base::FilePath& path,
-    bool persist_session_cookies)
-{
+void URLRequestContextGetterEfl::CreatePersistentCookieStore(
+    const base::FilePath& path,
+    bool persist_session_cookies) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
   cookie_store_path_ = path;
 
   CookieStoreConfig config(
       cookie_store_path_.Append(FILE_PATH_LITERAL("Cookies")),
-      CookieStoreConfig::RESTORED_SESSION_COOKIES,
-      NULL,
-      NULL);
-  cookie_store_= CreateCookieStore(config);
-  net::CookieMonster* cookie_monster = static_cast<net::CookieMonster*>(
-      cookie_store_.get());
+      CookieStoreConfig::RESTORED_SESSION_COOKIES, NULL);
+  cookie_store_ = CreateCookieStore(config);
+  net::CookieMonster* cookie_monster =
+      static_cast<net::CookieMonster*>(cookie_store_.get());
   cookie_monster->SetPersistSessionCookies(persist_session_cookies);
 
   std::vector<std::string> schemes;
   for (int i = 0; i < net::CookieMonster::kDefaultCookieableSchemesCount; ++i)
-    schemes.push_back(std::string(net::CookieMonster::kDefaultCookieableSchemes[i]));
+    schemes.push_back(
+        std::string(net::CookieMonster::kDefaultCookieableSchemes[i]));
   schemes.push_back(url::kFileScheme);
   cookie_monster->SetCookieableSchemes(schemes);
 
@@ -351,4 +338,4 @@ void URLRequestContextGetterEfl::CreatePersistentCookieStore(const base::FilePat
   url_request_context_->set_cookie_store(cookie_store_.get());
 }
 
-}; // namespace content
+};  // namespace content
index 51fb20147ffb53570896c967d97618500efe7f84..8cd23b5916b64171f2e38305bd582c767cd480fa 100644 (file)
@@ -29,8 +29,8 @@ class URLRequestContextGetterEfl : public net::URLRequestContextGetter {
   URLRequestContextGetterEfl(std::unique_ptr<net::NetworkDelegate> network_delegate = std::unique_ptr<net::NetworkDelegate>(),
       bool ignore_certificate_errors = false,
       const base::FilePath& base_path = base::FilePath(),
-      const scoped_refptr<base::SingleThreadTaskRunner> &io_task_runner = BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
-      const scoped_refptr<base::SingleThreadTaskRunner> &file_task_runner = BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+      const scoped_refptr<base::SingleThreadTaskRunner> &io_task_runner = BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+      const scoped_refptr<base::SingleThreadTaskRunner> &file_task_runner = BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
       ProtocolHandlerMap* protocol_handlers = NULL,
       URLRequestInterceptorScopedVector request_interceptors = URLRequestInterceptorScopedVector(),
       net::NetLog* net_log = NULL);
index 9f84ea95c385c8ce3bb276c08ca508fdf017ea3a..10ca6417445e9b092c7038d1020043c7c43e68f6 100644 (file)
@@ -10,6 +10,7 @@
 #include "browser/javascript_dialog_manager_efl.h"
 #include "browser/policy_response_delegate_efl.h"
 #include "common/render_messages_ewk.h"
+#include "components/favicon_base/favicon_types.h"
 #include "components/password_manager/core/common/password_manager_pref_names.h"
 #include "components/prefs/pref_service.h"
 #include "content/browser/renderer_host/render_widget_host_view_efl.h"
@@ -34,7 +35,7 @@
 #include "private/ewk_policy_decision_private.h"
 #include "private/ewk_user_media_private.h"
 #include "private/webview_delegate_ewk.h"
-#include "public/web/WebInputEvent.h"
+#include "public/platform/web_input_event.h"
 #include "url/gurl.h"
 
 #if defined(OS_TIZEN)
@@ -60,18 +61,20 @@ using namespace ui;
 
 namespace content {
 
-void WritePdfDataToFile(printing::PdfMetafileSkia* metafile, const base::FilePath& filename) {
+void WritePdfDataToFile(printing::PdfMetafileSkia* metafile,
+                        const base::FilePath& filename) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
   DCHECK(metafile);
-  base::File file(filename, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
+  base::File file(filename,
+                  base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
   metafile->SaveTo(&file);
   file.Close();
   delete metafile;
 }
 
 #if defined(OS_TIZEN) && defined(TIZEN_MULTIMEDIA_SUPPORT)
-static const content::MediaStreamDevice*
-  GetRequestedVideoDevice(const std::string& device_id) {
+static const content::MediaStreamDevice* GetRequestedVideoDevice(
+    const std::string& device_id) {
   const content::MediaStreamDevices& video_devices =
       MediaCaptureDevices::GetInstance()->GetVideoCaptureDevices();
   if (video_devices.empty())
@@ -83,23 +86,22 @@ static const content::MediaStreamDevice*
 #endif
 
 WebContentsDelegateEfl::WebContentsDelegateEfl(EWebView* view)
-    : WebContentsObserver(&view->web_contents())
-    , web_view_(view)
-    , is_fullscreen_(false)
-    , web_contents_(view->web_contents())
-    , document_created_(false)
-    , dialog_manager_(NULL)
-    , weak_ptr_factory_(this) {
+    : WebContentsObserver(&view->web_contents()),
+      web_view_(view),
+      is_fullscreen_(false),
+      web_contents_(view->web_contents()),
+      document_created_(false),
+      dialog_manager_(NULL),
+      weak_ptr_factory_(this) {
 #if defined(TIZEN_AUTOFILL_SUPPORT)
   AutofillClientEfl::CreateForWebContents(&web_contents_);
   AutofillClientEfl* autofill_manager =
       AutofillClientEfl::FromWebContents(&web_contents_);
   autofill_manager->SetEWebView(view);
-  PasswordManagerClientEfl::CreateForWebContentsWithAutofillClient(&web_contents_,
-      autofill_manager);
-  ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(&web_contents_,
-      autofill_manager,
-      EWebView::GetPlatformLocale(),
+  PasswordManagerClientEfl::CreateForWebContentsWithAutofillClient(
+      &web_contents_, autofill_manager);
+  ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(
+      &web_contents_, autofill_manager, EWebView::GetPlatformLocale(),
       AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER);
 #endif
 }
@@ -112,31 +114,31 @@ WebContentsDelegateEfl::~WebContentsDelegateEfl() {
 }
 
 WebContents* WebContentsDelegateEfl::OpenURLFromTab(
-  WebContents* source,
-  const content::OpenURLParams& params) {
-
+    WebContents* source,
+    const content::OpenURLParams& params) {
   const GURL& url = params.url;
   WindowOpenDisposition disposition = params.disposition;
 
-  if (!source || (disposition != CURRENT_TAB &&
-                  disposition != NEW_FOREGROUND_TAB &&
-                  disposition != NEW_BACKGROUND_TAB &&
-                  disposition != OFF_THE_RECORD)) {
+  if (!source || (disposition != WindowOpenDisposition::CURRENT_TAB &&
+                  disposition != WindowOpenDisposition::NEW_FOREGROUND_TAB &&
+                  disposition != WindowOpenDisposition::NEW_BACKGROUND_TAB &&
+                  disposition != WindowOpenDisposition::OFF_THE_RECORD)) {
     NOTIMPLEMENTED();
     return NULL;
   }
 
-  if (disposition == NEW_FOREGROUND_TAB ||
-      disposition == NEW_BACKGROUND_TAB ||
-      disposition == OFF_THE_RECORD) {
+  if (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB ||
+      disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB ||
+      disposition == WindowOpenDisposition::OFF_THE_RECORD) {
     Evas_Object* new_object = NULL;
-    web_view_->SmartCallback<EWebViewCallbacks::CreateNewWindow>().call(&new_object);
+    web_view_->SmartCallback<EWebViewCallbacks::CreateNewWindow>().call(
+        &new_object);
 
     if (!new_object)
       return NULL;
 
-    EWebView* wv = WebViewDelegateEwk::GetInstance().
-      GetWebViewFromEvasObject(new_object);
+    EWebView* wv =
+        WebViewDelegateEwk::GetInstance().GetWebViewFromEvasObject(new_object);
     DCHECK(wv);
     wv->SetURL(url);
     return NULL;
@@ -149,7 +151,8 @@ WebContents* WebContentsDelegateEfl::OpenURLFromTab(
 }
 
 void WebContentsDelegateEfl::NavigationStateChanged(
-    WebContents* source, InvalidateTypes changed_flags) {
+    WebContents* source,
+    InvalidateTypes changed_flags) {
   if (changed_flags & content::INVALIDATE_TYPE_URL) {
     const char* url = source->GetVisibleURL().spec().c_str();
     web_view_->SmartCallback<EWebViewCallbacks::URLChanged>().call(url);
@@ -165,21 +168,25 @@ void WebContentsDelegateEfl::LoadingStateChanged(WebContents* source,
     web_view_->SmartCallback<EWebViewCallbacks::LoadProgressFinished>().call();
 }
 
-void WebContentsDelegateEfl::LoadProgressChanged(WebContents* source, double progress) {
+void WebContentsDelegateEfl::LoadProgressChanged(WebContents* source,
+                                                 double progress) {
   web_view_->SetProgressValue(progress);
   web_view_->SmartCallback<EWebViewCallbacks::LoadProgress>().call(&progress);
 }
 
 bool WebContentsDelegateEfl::ShouldCreateWebContents(
-    WebContents* web_contents,
-    int route_id,
-    int main_frame_route_id,
-    int main_frame_widget_route_id,
-    WindowContainerType window_container_type,
+    content::WebContents* web_contents,
+    content::RenderFrameHost* opener,
+    content::SiteInstance* source_site_instance,
+    int32_t route_id,
+    int32_t main_frame_route_id,
+    int32_t main_frame_widget_route_id,
+    content::mojom::WindowContainerType window_container_type,
+    const GURL& opener_url,
     const std::string& frame_name,
     const GURL& target_url,
     const std::string& partition_id,
-    SessionStorageNamespace* session_storage_namespace) {
+    content::SessionStorageNamespace* session_storage_namespace) {
   // We implement the asynchronous version of the function, this
   // one should never be invoked.
   NOTREACHED();
@@ -190,49 +197,55 @@ void WebContentsDelegateEfl::CloseContents(WebContents* source) {
   web_view_->SmartCallback<EWebViewCallbacks::WindowClosed>().call();
 }
 
-void WebContentsDelegateEfl::EnterFullscreenModeForTab(content::WebContents* web_contents,
-                                                       const GURL& origin) {
-   is_fullscreen_ = true;
-   web_view_->SmartCallback<EWebViewCallbacks::EnterFullscreen>().call();
+void WebContentsDelegateEfl::EnterFullscreenModeForTab(
+    content::WebContents* web_contents,
+    const GURL& origin) {
+  is_fullscreen_ = true;
+  web_view_->SmartCallback<EWebViewCallbacks::EnterFullscreen>().call();
 }
 
-void WebContentsDelegateEfl::ExitFullscreenModeForTab(content::WebContents* web_contents) {
-   is_fullscreen_ = false;
-   web_view_->SmartCallback<EWebViewCallbacks::ExitFullscreen>().call();
+void WebContentsDelegateEfl::ExitFullscreenModeForTab(
+    content::WebContents* web_contents) {
+  is_fullscreen_ = false;
+  web_view_->SmartCallback<EWebViewCallbacks::ExitFullscreen>().call();
 }
 
 bool WebContentsDelegateEfl::IsFullscreenForTabOrPending(
-      const WebContents* web_contents) const {
+    const WebContents* web_contents) const {
   return is_fullscreen_;
 }
 
-void WebContentsDelegateEfl::RegisterProtocolHandler(WebContents* web_contents,
-        const std::string& protocol, const GURL& url, bool user_gesture) {
-  Ewk_Custom_Handlers_Data protocol_data(protocol.c_str(),
-          url.host().c_str(), url.spec().c_str());
-  web_view_->SmartCallback<EWebViewCallbacks::RegisterProtocolHandler>().call(&protocol_data);
+void WebContentsDelegateEfl::RegisterProtocolHandler(
+    WebContents* web_contents,
+    const std::string& protocol,
+    const GURL& url,
+    bool user_gesture) {
+  Ewk_Custom_Handlers_Data protocol_data(protocol.c_str(), url.host().c_str(),
+                                         url.spec().c_str());
+  web_view_->SmartCallback<EWebViewCallbacks::RegisterProtocolHandler>().call(
+      &protocol_data);
 }
 
-void WebContentsDelegateEfl::UnregisterProtocolHandler(WebContents* web_contents,
-                                                       const std::string& protocol,
-                                                       const GURL& url,
-                                                       bool user_gesture) {
-  Ewk_Custom_Handlers_Data protocol_data(protocol.c_str(),
-          url.host().c_str(), url.spec().c_str());
-  web_view_->SmartCallback<EWebViewCallbacks::UnregisterProtocolHandler>()
-      .call(&protocol_data);
+void WebContentsDelegateEfl::UnregisterProtocolHandler(
+    WebContents* web_contents,
+    const std::string& protocol,
+    const GURL& url,
+    bool user_gesture) {
+  Ewk_Custom_Handlers_Data protocol_data(protocol.c_str(), url.host().c_str(),
+                                         url.spec().c_str());
+  web_view_->SmartCallback<EWebViewCallbacks::UnregisterProtocolHandler>().call(
+      &protocol_data);
 }
 
 #if defined(TIZEN_MULTIMEDIA_SUPPORT)
 void WebContentsDelegateEfl::RequestMediaAccessAllow(
     const MediaStreamRequest& request,
     const MediaResponseCallback& callback) {
-
   MediaStreamDevices devices;
 
   if (request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) {
-    devices.push_back(MediaStreamDevice(request.audio_type,
-        "default", "Default"));
+    devices.push_back(
+        MediaStreamDevice(request.audio_type, "default", "Default"));
   }
 
   if (request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE) {
@@ -241,17 +254,17 @@ void WebContentsDelegateEfl::RequestMediaAccessAllow(
         GetRequestedVideoDevice(request.requested_video_device_id);
     if (video_device) {
       devices.push_back(*video_device);
-    }
-    else {
+    } else {
       callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED,
-          std::unique_ptr<MediaStreamUI>());
+                   std::unique_ptr<MediaStreamUI>());
     }
 #else
-    devices.push_back(MediaStreamDevice(request.video_type, "/dev/video0", "1"));
+    devices.push_back(
+        MediaStreamDevice(request.video_type, "/dev/video0", "1"));
 #endif
   }
 
-  callback.Run(devices, MEDIA_DEVICE_OK,std::unique_ptr<MediaStreamUI>());
+  callback.Run(devices, MEDIA_DEVICE_OK, std::unique_ptr<MediaStreamUI>());
 }
 
 void WebContentsDelegateEfl::RequestMediaAccessDeny(
@@ -259,7 +272,7 @@ void WebContentsDelegateEfl::RequestMediaAccessDeny(
     const MediaResponseCallback& callback) {
   LOG(ERROR) << __FUNCTION__ << " Decline request with empty list";
   callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED,
-      std::unique_ptr<MediaStreamUI>());
+               std::unique_ptr<MediaStreamUI>());
 }
 
 bool WebContentsDelegateEfl::CheckMediaAccessPermission(
@@ -270,17 +283,17 @@ bool WebContentsDelegateEfl::CheckMediaAccessPermission(
 }
 
 void WebContentsDelegateEfl::RequestMediaAccessPermission(
-        WebContents* web_contents,
-        const MediaStreamRequest& request,
-        const MediaResponseCallback& callback) {
+    WebContents* web_contents,
+    const MediaStreamRequest& request,
+    const MediaResponseCallback& callback) {
   std::unique_ptr<_Ewk_User_Media_Permission_Request> media_permission_request(
       new _Ewk_User_Media_Permission_Request(this, request, callback));
 
   Eina_Bool callback_result = EINA_FALSE;
   if (!web_view_->InvokeViewUserMediaPermissionCallback(
-        media_permission_request.get(), &callback_result)) {
-      web_view_->SmartCallback<EWebViewCallbacks::UserMediaPermission>()
-        .call(media_permission_request.get());
+          media_permission_request.get(), &callback_result)) {
+    web_view_->SmartCallback<EWebViewCallbacks::UserMediaPermission>().call(
+        media_permission_request.get());
   }
 
   // if policy is suspended, the API takes over the policy object lifetime
@@ -289,7 +302,7 @@ void WebContentsDelegateEfl::RequestMediaAccessPermission(
     ignore_result(media_permission_request.release());
   else if (!media_permission_request->IsDecided()) {
     callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED,
-        std::unique_ptr<MediaStreamUI>());
+                 std::unique_ptr<MediaStreamUI>());
   }
 }
 #endif
@@ -300,22 +313,24 @@ void WebContentsDelegateEfl::OnAuthRequired(net::URLRequest* request,
   web_view_->InvokeAuthCallback(login_delegate, request->url(), realm);
 }
 
-void WebContentsDelegateEfl::DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
-                                                             const GURL& validated_url,
-                                                             bool is_error_page,
-                                                             bool is_iframe_srcdoc) {
+void WebContentsDelegateEfl::DidStartProvisionalLoadForFrame(
+    RenderFrameHost* render_frame_host,
+    const GURL& validated_url,
+    bool is_error_page,
+    bool is_iframe_srcdoc) {
   web_view_->SmartCallback<EWebViewCallbacks::ProvisionalLoadStarted>().call();
 }
 
-void WebContentsDelegateEfl::DidCommitProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
-                                                              const GURL& url,
-                                                              ui::PageTransition transition_type) {
+void WebContentsDelegateEfl::DidCommitProvisionalLoadForFrame(
+    RenderFrameHost* render_frame_host,
+    const GURL& url,
+    ui::PageTransition transition_type) {
   web_view_->SmartCallback<EWebViewCallbacks::LoadCommitted>().call();
 }
 
-
-void WebContentsDelegateEfl::DidNavigateMainFrame(const LoadCommittedDetails& details,
-                                                  const FrameNavigateParams& params) {
+void WebContentsDelegateEfl::DidNavigateMainFrame(
+    const LoadCommittedDetails& details,
+    const FrameNavigateParams& params) {
   // The condition checks whether the main frame navigated to a different page,
   // not scrolled to a fragment inside the current page.
   if (details.is_navigation_to_different_page())
@@ -326,9 +341,13 @@ void WebContentsDelegateEfl::DocumentOnLoadCompletedInMainFrame() {
   web_view_->SmartCallback<EWebViewCallbacks::LoadFinished>().call();
 }
 
-void WebContentsDelegateEfl::DidNavigateAnyFrame(RenderFrameHost* render_frame_host, const LoadCommittedDetails& details, const FrameNavigateParams& params) {
+void WebContentsDelegateEfl::DidNavigateAnyFrame(
+    RenderFrameHost* render_frame_host,
+    const LoadCommittedDetails& details,
+    const FrameNavigateParams& params) {
   web_view_->SmartCallback<EWebViewCallbacks::ProvisionalLoadRedirect>().call();
-  static_cast<BrowserContextEfl*>(web_contents_.GetBrowserContext())->AddVisitedURLs(params.redirects);
+  static_cast<BrowserContextEfl*>(web_contents_.GetBrowserContext())
+      ->AddVisitedURLs(params.redirects);
 }
 
 void WebContentsDelegateEfl::DidFinishLoad(RenderFrameHost* render_frame_host,
@@ -336,26 +355,25 @@ void WebContentsDelegateEfl::DidFinishLoad(RenderFrameHost* render_frame_host,
   if (render_frame_host->GetParent())
     return;
 
-  NavigationEntry *entry = web_contents().GetController().GetVisibleEntry();
+  NavigationEntryentry = web_contents().GetController().GetVisibleEntry();
   if (!entry)
     return;
 
-  FaviconStatus &favicon = entry->GetFavicon();
+  FaviconStatusfavicon = entry->GetFavicon();
 
   if (favicon.valid) {
     // check/update the url and favicon url in favicon database
-    FaviconDatabase::Instance()->SetFaviconURLForPageURL(favicon.url, validated_url);
+    FaviconDatabase::Instance()->SetFaviconURLForPageURL(favicon.url,
+                                                         validated_url);
 
     // download favicon if there is no such in database
     if (!FaviconDatabase::Instance()->ExistsForFaviconURL(favicon.url)) {
       LOG(ERROR) << "[DidFinishLoad] :: no favicon in database for URL: "
                  << favicon.url.spec();
-      favicon_downloader_.reset(
-        new FaviconDownloader(&web_contents_,
-                              favicon.url,
-                              base::Bind(
-                                &WebContentsDelegateEfl::DidDownloadFavicon,
-                                weak_ptr_factory_.GetWeakPtr())));
+      favicon_downloader_.reset(new FaviconDownloader(
+          &web_contents_, favicon.url,
+          base::Bind(&WebContentsDelegateEfl::DidDownloadFavicon,
+                     weak_ptr_factory_.GetWeakPtr())));
       favicon_downloader_->Start();
     } else {
       web_view_->SmartCallback<EWebViewCallbacks::IconReceived>().call();
@@ -365,13 +383,14 @@ void WebContentsDelegateEfl::DidFinishLoad(RenderFrameHost* render_frame_host,
   web_contents_.Focus();
 }
 
-
-void WebContentsDelegateEfl::DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates) {
+void WebContentsDelegateEfl::DidUpdateFaviconURL(
+    const std::vector<FaviconURL>& candidates) {
   // select and set proper favicon
   for (unsigned int i = 0; i < candidates.size(); ++i) {
     FaviconURL favicon = candidates[i];
-    if (favicon.icon_type == FaviconURL::FAVICON && !favicon.icon_url.is_empty()) {
-      NavigationEntry *entry = web_contents_.GetController().GetVisibleEntry();
+    if (favicon.icon_type == FaviconURL::IconType::kFavicon &&
+        !favicon.icon_url.is_empty()) {
+      NavigationEntry* entry = web_contents_.GetController().GetVisibleEntry();
       if (!entry)
         return;
       entry->GetFavicon().url = favicon.icon_url;
@@ -382,7 +401,9 @@ void WebContentsDelegateEfl::DidUpdateFaviconURL(const std::vector<FaviconURL>&
   return;
 }
 
-void WebContentsDelegateEfl::DidDownloadFavicon(bool success, const GURL& icon_url, const SkBitmap& bitmap) {
+void WebContentsDelegateEfl::DidDownloadFavicon(bool success,
+                                                const GURL& icon_url,
+                                                const SkBitmap& bitmap) {
   favicon_downloader_.reset();
   if (success) {
     FaviconDatabase::Instance()->SetBitmapForFaviconURL(bitmap, icon_url);
@@ -391,25 +412,27 @@ void WebContentsDelegateEfl::DidDownloadFavicon(bool success, const GURL& icon_u
   }
 }
 
-void WebContentsDelegateEfl::RequestCertificateConfirm(WebContents* /*web_contents*/,
-                                                      int cert_error,
-                                                      const net::SSLInfo& ssl_info,
-                                                      const GURL& url,
-                                                      ResourceType /*resource_type*/,
-                                                      bool /*overridable*/,
-                                                      bool /*strict_enforcement*/,
-                                                      const base::Callback<void(bool)>& callback,
-                                                      CertificateRequestResultType* result) {
+void WebContentsDelegateEfl::RequestCertificateConfirm(
+    WebContents* /*web_contents*/,
+    int cert_error,
+    const net::SSLInfo& ssl_info,
+    const GURL& url,
+    ResourceType /*resource_type*/,
+    bool /*overridable*/,
+    bool /*strict_enforcement*/,
+    base::Callback<void(CertificateRequestResultType)>& callback) {
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: EWK_BRINGUP definition should be removed.
   DCHECK(result);
   std::string pem_certificate;
-  if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->os_cert_handle(), &pem_certificate)) {
+  if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->os_cert_handle(),
+                                           &pem_certificate)) {
     *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
     return;
   }
-  certificate_policy_decision_.reset(new _Ewk_Certificate_Policy_Decision(url,
-                                                                        pem_certificate,
-                                                                        cert_error,
-                                                                        callback));
+  certificate_policy_decision_.reset(new _Ewk_Certificate_Policy_Decision(
+      url, pem_certificate, cert_error, callback));
+#endif  // !defined(EWK_BRINGUP)
   web_view_->SmartCallback<EWebViewCallbacks::RequestCertificateConfirm>().call(
       certificate_policy_decision_.get());
 
@@ -422,13 +445,16 @@ void WebContentsDelegateEfl::RequestCertificateConfirm(WebContents* /*web_conten
   }
 }
 
-void WebContentsDelegateEfl::SetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type) {
+void WebContentsDelegateEfl::SetContentSecurityPolicy(
+    const std::string& policy,
+    Ewk_CSP_Header_Type header_type) {
   if (document_created_) {
     RenderViewHost* rvh = web_contents_.GetRenderViewHost();
     rvh->Send(new EwkViewMsg_SetCSP(rvh->GetRoutingID(), policy, header_type));
   } else {
     DCHECK(!pending_content_security_policy_.get());
-    pending_content_security_policy_.reset(new ContentSecurityPolicy(policy, header_type));
+    pending_content_security_policy_.reset(
+        new ContentSecurityPolicy(policy, header_type));
   }
 }
 
@@ -439,19 +465,21 @@ void WebContentsDelegateEfl::FindReply(WebContents* web_contents,
                                        int active_match_ordinal,
                                        bool final_update) {
   if (final_update && request_id == web_view_->current_find_request_id()) {
-    unsigned int uint_number_of_matches = static_cast<unsigned int>(number_of_matches);
-    web_view_->SmartCallback<EWebViewCallbacks::TextFound>().call(&uint_number_of_matches);
+    unsigned int uint_number_of_matches =
+        static_cast<unsigned int>(number_of_matches);
+    web_view_->SmartCallback<EWebViewCallbacks::TextFound>().call(
+        &uint_number_of_matches);
   }
 }
 
 JavaScriptDialogManager* WebContentsDelegateEfl::GetJavaScriptDialogManager(
-      WebContents* source) {
+    WebContents* source) {
   if (!dialog_manager_)
     dialog_manager_ = new JavaScriptDialogManagerEfl();
   return dialog_manager_;
 }
 
-void WebContentsDelegateEfl::OnUpdateSettings(const Ewk_Settings *settings) {
+void WebContentsDelegateEfl::OnUpdateSettings(const Ewk_Settingssettings) {
 #if defined(TIZEN_AUTOFILL_SUPPORT)
   PasswordManagerClientEfl* client =
       PasswordManagerClientEfl::FromWebContents(&web_contents_);
@@ -466,115 +494,145 @@ void WebContentsDelegateEfl::OnUpdateSettings(const Ewk_Settings *settings) {
 bool WebContentsDelegateEfl::OnMessageReceived(const IPC::Message& message) {
   bool handled = true;
   IPC_BEGIN_MESSAGE_MAP(WebContentsDelegateEfl, message)
-    IPC_MESSAGE_HANDLER_DELAY_REPLY(EwkHostMsg_GetContentSecurityPolicy, OnGetContentSecurityPolicy)
-    IPC_MESSAGE_HANDLER(EwkHostMsg_DidPrintPagesToPdf, OnPrintedMetafileReceived)
-    IPC_MESSAGE_HANDLER(EwkHostMsg_WrtMessage, OnWrtPluginMessage)
-    IPC_MESSAGE_HANDLER_DELAY_REPLY(EwkHostMsg_WrtSyncMessage, OnWrtPluginSyncMessage)
-    IPC_MESSAGE_UNHANDLED(handled = false)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: WebContentsObserver is IPC:: listener only cannot send
+  IPC_MESSAGE_HANDLER_DELAY_REPLY(EwkHostMsg_GetContentSecurityPolicy,
+                                  OnGetContentSecurityPolicy)
+#endif
+  IPC_MESSAGE_HANDLER(EwkHostMsg_DidPrintPagesToPdf, OnPrintedMetafileReceived)
+  IPC_MESSAGE_HANDLER(EwkHostMsg_WrtMessage, OnWrtPluginMessage)
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: WebContentsObserver is IPC:: listener only cannot send
+  IPC_MESSAGE_HANDLER_DELAY_REPLY(EwkHostMsg_WrtSyncMessage,
+                                  OnWrtPluginSyncMessage)
+#endif
+  IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
 
   return handled;
 }
 
 void WebContentsDelegateEfl::DidFailProvisionalLoad(
-    RenderFrameHost* render_frame_host, const GURL& validated_url,
-    int error_code, const base::string16& error_description,
-    bool was_ignored_by_handler) {
-  DidFailLoad(render_frame_host, validated_url, error_code,
-              error_description, was_ignored_by_handler);
-}
-
-void WebContentsDelegateEfl::DidFailLoad(RenderFrameHost* render_frame_host,
-    const GURL& validated_url, int error_code,
-    const base::string16& error_description, bool was_ignored_by_handler) {
+    RenderFrameHost* render_frame_host,
+    const GURL& validated_url,
+    int error_code,
+    const base::string16& error_description,
+    bool /*was_ignored_by_handler*/) {
+  DidFailLoad(render_frame_host, validated_url, error_code, error_description);
+}
+
+void WebContentsDelegateEfl::DidFailLoad(
+    RenderFrameHost* render_frame_host,
+    const GURL& validated_url,
+    int error_code,
+    const base::string16& error_description) {
   bool is_main_frame = !render_frame_host->GetParent();
   std::string description = base::UTF16ToUTF8(error_description);
-  web_view_->InvokeLoadError(validated_url, error_code, description, is_main_frame);
+  web_view_->InvokeLoadError(validated_url, error_code, description,
+                             is_main_frame);
 }
 
-void WebContentsDelegateEfl::OnWrtPluginMessage(const Ewk_Wrt_Message_Data& data) {
+void WebContentsDelegateEfl::OnWrtPluginMessage(
+    const Ewk_Wrt_Message_Data& data) {
   std::unique_ptr<Ewk_Wrt_Message_Data> p(new Ewk_Wrt_Message_Data);
   p->type = data.type;
   p->value = data.value;
   p->id = data.id;
   p->reference_id = data.reference_id;
 
-  web_view_->SmartCallback<EWebViewCallbacks::WrtPluginsMessage>().call(p.get());
+  web_view_->SmartCallback<EWebViewCallbacks::WrtPluginsMessage>().call(
+      p.get());
 }
 
-void WebContentsDelegateEfl::OnWrtPluginSyncMessage(const Ewk_Wrt_Message_Data& data,
-                                                    IPC::Message* reply) {
+void WebContentsDelegateEfl::OnWrtPluginSyncMessage(
+    const Ewk_Wrt_Message_Data& data,
+    IPC::Message* reply) {
   Ewk_Wrt_Message_Data tmp = data;
   web_view_->SmartCallback<EWebViewCallbacks::WrtPluginsMessage>().call(&tmp);
   EwkHostMsg_WrtSyncMessage::WriteReplyParams(reply, tmp.value);
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // WebContentsObserver is IPC:: listener only cannot send
   Send(reply);
+#endif
 }
 
 void WebContentsDelegateEfl::DidFirstVisuallyNonEmptyPaint() {
-  web_view_->SmartCallback<EWebViewCallbacks::LoadNonEmptyLayoutFinished>().call();
+  web_view_->SmartCallback<EWebViewCallbacks::LoadNonEmptyLayoutFinished>()
+      .call();
   web_view_->SmartCallback<EWebViewCallbacks::FrameRendered>().call(0);
 }
 
-void WebContentsDelegateEfl::OnGetContentSecurityPolicy(IPC::Message* reply_msg) {
+void WebContentsDelegateEfl::OnGetContentSecurityPolicy(
+    IPC::Message* reply_msg) {
   document_created_ = true;
   if (!pending_content_security_policy_.get()) {
-    EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(reply_msg, std::string(), EWK_DEFAULT_POLICY);
+    EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(
+        reply_msg, std::string(), EWK_DEFAULT_POLICY);
   } else {
-    EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(reply_msg,
-        pending_content_security_policy_->policy, pending_content_security_policy_->header_type);
+    EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(
+        reply_msg, pending_content_security_policy_->policy,
+        pending_content_security_policy_->header_type);
     pending_content_security_policy_.reset();
   }
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // WebContentsObserver is IPC:: listener only cannot send
   Send(reply_msg);
+#endif
 }
 
-void WebContentsDelegateEfl::OnPrintedMetafileReceived(const DidPrintPagesParams& params) {
+void WebContentsDelegateEfl::OnPrintedMetafileReceived(
+    const DidPrintPagesParams& params) {
   base::SharedMemory shared_buf(params.metafile_data_handle, true);
   if (!shared_buf.Map(params.data_size)) {
-     NOTREACHED() << "couldn't map";
-     return;
+    NOTREACHED() << "couldn't map";
+    return;
   }
 
-  std::unique_ptr<printing::PdfMetafileSkia> metafile
-    (new printing::PdfMetafileSkia(printing::PDF_SKIA_DOCUMENT_TYPE));
+  std::unique_ptr<printing::PdfMetafileSkia> metafile(
+      new printing::PdfMetafileSkia(printing::SkiaDocumentType::PDF));
   if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) {
     NOTREACHED() << "Invalid metafile header";
     return;
   }
-  BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
-        base::Bind(&WritePdfDataToFile, metafile.release(), params.filename));
+  BrowserThread::PostTask(
+      BrowserThread::FILE, FROM_HERE,
+      base::Bind(&WritePdfDataToFile, metafile.release(), params.filename));
 }
 
-void WebContentsDelegateEfl::NavigationEntryCommitted(const LoadCommittedDetails& load_details) {
+void WebContentsDelegateEfl::NavigationEntryCommitted(
+    const LoadCommittedDetails& load_details) {
   web_view_->InvokeBackForwardListChangedCallback();
 }
 
-void WebContentsDelegateEfl::RenderViewCreated(RenderViewHost* render_view_host) {
+void WebContentsDelegateEfl::RenderViewCreated(
+    RenderViewHost* render_view_host) {
   web_view_->RenderViewCreated(render_view_host);
 }
 
 void WebContentsDelegateEfl::RenderProcessGone(base::TerminationStatus status) {
   // See RenderWidgetHostViewEfl::RenderProcessGone.
-  if (status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION
-      || status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED
-      || status == base::TERMINATION_STATUS_PROCESS_CRASHED) {
+  if (status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION ||
+      status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ||
+      status == base::TERMINATION_STATUS_PROCESS_CRASHED) {
     web_view_->HandleRendererProcessCrash();
   }
 }
 
-bool WebContentsDelegateEfl::AddMessageToConsole(WebContents* source,
-                                              int32_t level,
-                                              const string16& message,
-                                              int32_t line_no,
-                                              const string16& source_id) {
-  std::unique_ptr<_Ewk_Console_Message> console_message(new _Ewk_Console_Message(level,
-                                                                          UTF16ToUTF8(message).c_str(),
-                                                                          line_no,
-                                                                          UTF16ToUTF8(source_id).c_str()));
-  web_view_->SmartCallback<EWebViewCallbacks::ConsoleMessage>().call(console_message.get());
+bool WebContentsDelegateEfl::DidAddMessageToConsole(WebContents* source,
+                                                    int32_t level,
+                                                    const string16& message,
+                                                    int32_t line_no,
+                                                    const string16& source_id) {
+  std::unique_ptr<_Ewk_Console_Message> console_message(
+      new _Ewk_Console_Message(level, base::UTF16ToUTF8(message).c_str(), line_no,
+                               base::UTF16ToUTF8(source_id).c_str()));
+  web_view_->SmartCallback<EWebViewCallbacks::ConsoleMessage>().call(
+      console_message.get());
   return true;
 }
 
-void WebContentsDelegateEfl::RunFileChooser(RenderFrameHost* render_frame_host, const FileChooserParams& params) {
+void WebContentsDelegateEfl::RunFileChooser(RenderFrameHost* render_frame_host,
+                                            const FileChooserParams& params) {
   web_view_->ShowFileChooser(render_frame_host, params);
 }
 
@@ -583,7 +641,8 @@ content::ColorChooser* WebContentsDelegateEfl::OpenColorChooser(
     SkColor color,
     const std::vector<ColorSuggestion>& suggestions) {
   ColorChooserEfl* color_chooser_efl = new ColorChooserEfl(*web_contents);
-  web_view_->RequestColorPicker(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color), SkColorGetA(color));
+  web_view_->RequestColorPicker(SkColorGetR(color), SkColorGetG(color),
+                                SkColorGetB(color), SkColorGetA(color));
 
   return color_chooser_efl;
 }
@@ -601,14 +660,15 @@ void WebContentsDelegateEfl::OpenDateTimeDialog(
 bool WebContentsDelegateEfl::PreHandleGestureEvent(
     WebContents* source,
     const blink::WebGestureEvent& event) {
-  switch (event.type) {
-    case blink::WebInputEvent::GestureDoubleTap:
+  blink::WebInputEvent::Type event_type = event.GetType();
+  switch (event_type) {
+    case blink::WebInputEvent::kGestureDoubleTap:
       if (is_fullscreen_)
         return true;
       break;
-    case blink::WebInputEvent::GesturePinchBegin:
-    case blink::WebInputEvent::GesturePinchUpdate:
-    case blink::WebInputEvent::GesturePinchEnd:
+    case blink::WebInputEvent::kGesturePinchBegin:
+    case blink::WebInputEvent::kGesturePinchUpdate:
+    case blink::WebInputEvent::kGesturePinchEnd:
       if (!IsPinchToZoomEnabled() ||
           IsFullscreenForTabOrPending(&web_contents()))
         return true;
@@ -625,4 +685,4 @@ void WebContentsDelegateEfl::TitleWasSet(NavigationEntry* entry,
     web_view_->GetBackForwardList()->UpdateItemWithEntry(entry);
 }
 
-} //namespace content
+}  // namespace content
index 59815d897c2638906067509b7ac171056d5f1e02..6da6fb8f1bcfebaccaff33fa848be65ed3069f6a 100644 (file)
@@ -29,41 +29,40 @@ class JavaScriptDialogManagerEfl;
 namespace content {
 struct DateTimeSuggestion;
 
-class WebContentsDelegateEfl
-    : public WebContentsDelegate,
-      public WebContentsObserver {
+class WebContentsDelegateEfl : public WebContentsDelegate,
+                               public WebContentsObserver {
  public:
   WebContentsDelegateEfl(EWebView*);
   ~WebContentsDelegateEfl();
 
-  virtual WebContents* OpenURLFromTab(WebContents* source,
+  // Overridden from content::WebContentsDelegate:
+  content::WebContents* OpenURLFromTab(
+      content::WebContents* source,
       const content::OpenURLParams& params) override;
-  virtual void NavigationStateChanged(WebContents* source,
-                                      InvalidateTypes changed_flags) override;
-
-  virtual void LoadProgressChanged(WebContents* source, double progress) override;
-  virtual void LoadingStateChanged(WebContents* source,
-                                   bool to_different_document) override;
-
-  virtual bool ShouldCreateWebContents(
-      WebContents*,
-      int route_id,
-      int main_frame_route_id,
-      int main_frame_widget_route_id,
-      WindowContainerType,
+  void NavigationStateChanged(content::WebContents* source,
+                              content::InvalidateTypes changed_flags) override;
+  void LoadingStateChanged(content::WebContents* source,
+                           bool to_different_document) override;
+  bool ShouldCreateWebContents(
+      content::WebContents* web_contents,
+      content::RenderFrameHost* opener,
+      content::SiteInstance* source_site_instance,
+      int32_t route_id,
+      int32_t main_frame_route_id,
+      int32_t main_frame_widget_route_id,
+      content::mojom::WindowContainerType window_container_type,
+      const GURL& opener_url,
       const std::string& frame_name,
       const GURL& target_url,
       const std::string& partition_id,
-      SessionStorageNamespace* session_storage_namespace) override;
-
-  virtual void CloseContents(WebContents* source) override;
-
+      content::SessionStorageNamespace* session_storage_namespace) override;
+  void CloseContents(content::WebContents* source) override;
   void EnterFullscreenModeForTab(content::WebContents* web_contents,
                                  const GURL& origin) override;
   void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
+  bool IsFullscreenForTabOrPending(
+      const content::WebContents* web_contents) const override;
 
-  virtual bool IsFullscreenForTabOrPending(
-      const WebContents* web_contents) const override;
 #if defined(TIZEN_MULTIMEDIA_SUPPORT)
   virtual bool CheckMediaAccessPermission(WebContents* web_contents,
                                           const GURL& security_origin,
@@ -75,87 +74,64 @@ class WebContentsDelegateEfl
       const MediaResponseCallback& callback) override;
 
   void RequestMediaAccessAllow(const MediaStreamRequest& request,
-    const MediaResponseCallback& callback);
+                               const MediaResponseCallback& callback);
 
   void RequestMediaAccessDeny(const MediaStreamRequest& request,
-    const MediaResponseCallback& callback);
+                              const MediaResponseCallback& callback);
 #endif
-  void RegisterProtocolHandler(WebContents* web_contents,
+  void RegisterProtocolHandler(content::WebContents* web_contents,
                                const std::string& protocol,
                                const GURL& url,
                                bool user_gesture) override;
-
-  void UnregisterProtocolHandler(WebContents* web_contents,
+  void UnregisterProtocolHandler(content::WebContents* web_contents,
                                  const std::string& protocol,
                                  const GURL& url,
                                  bool user_gesture) override;
-
-  void FindReply(WebContents* web_contents,
+  void FindReply(content::WebContents* web_contents,
                  int request_id,
                  int number_of_matches,
                  const gfx::Rect& selection_rect,
                  int active_match_ordinal,
                  bool final_update) override;
 
-  void RequestCertificateConfirm(WebContents* web_contents, int cert_error,
-      const net::SSLInfo& ssl_info, const GURL& url, ResourceType resource_type,
+  void RequestCertificateConfirm(
+      WebContents* web_contents,
+      int cert_error,
+      const net::SSLInfo& ssl_info,
+      const GURL& url,
+      ResourceType resource_type,
       bool overridable,
       bool strict_enforcement,
-      const base::Callback<void(bool)>& callback,
-      CertificateRequestResultType* result);
-
-  EWebView* web_view() const { return web_view_; }
-  WebContents& web_contents() const { return web_contents_; }
-
-  virtual void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
-                                               const GURL& validated_url,
-                                               bool is_error_page,
-                                               bool is_iframe_srcdoc) override;
+      base::Callback<void(CertificateRequestResultType)>& callback);
 
-  virtual void DidCommitProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
-                                                const GURL& url,
-                                                ui::PageTransition transition_type) override;
+  JavaScriptDialogManager* GetJavaScriptDialogManager(
+      WebContents* source) override;
 
-  virtual void DidNavigateMainFrame(const LoadCommittedDetails& details,
-                                    const FrameNavigateParams& params) override;
-  virtual void DocumentOnLoadCompletedInMainFrame() override;
-
-  virtual void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
-                                   const LoadCommittedDetails& details,
-                                   const FrameNavigateParams& params) override;
-
-  void OnAuthRequired(net::URLRequest* request,
-                      const std::string& realm,
-                      LoginDelegateEfl* login_delegate);
-
-  virtual void DidFinishLoad(RenderFrameHost* render_frame_host,
-                             const GURL& validated_url) override;
-
-  virtual void DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates) override;
-  virtual void DidDownloadFavicon(bool success, const GURL& icon_url, const SkBitmap& bitmap);
-
-  void OnUpdateSettings(const Ewk_Settings *settings);
-  void SetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type);
-
-  JavaScriptDialogManager* GetJavaScriptDialogManager(WebContents* source) override;
+  void OnUpdateSettings(const Ewk_Settings* settings);
+  void SetContentSecurityPolicy(const std::string& policy,
+                                Ewk_CSP_Header_Type header_type);
 
   void DidFirstVisuallyNonEmptyPaint() override;
 
   bool OnMessageReceived(const IPC::Message& message) override;
   void OnPrintedMetafileReceived(const DidPrintPagesParams& params);
-  void NavigationEntryCommitted(const LoadCommittedDetails& load_details) override;
+  void NavigationEntryCommitted(
+      const LoadCommittedDetails& load_details) override;
   void RenderViewCreated(RenderViewHost* render_view_host) override;
   void RenderProcessGone(base::TerminationStatus status) override;
-  bool AddMessageToConsole(WebContents* source,
-                           int32_t level,
-                           const base::string16& message,
-                           int32_t line_no,
-                           const base::string16& source_id) override;
+  bool DidAddMessageToConsole(WebContents* source,
+                              int32_t level,
+                              const base::string16& message,
+                              int32_t line_no,
+                              const base::string16& source_id) override;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       const FileChooserParams& params) override;
-  ColorChooser* OpenColorChooser(WebContents* web_contents, SkColor color,
+  ColorChooser* OpenColorChooser(
+      WebContents* web_contents,
+      SkColor color,
       const std::vector<ColorSuggestion>& suggestions) override;
-  void OpenDateTimeDialog(ui::TextInputType dialog_type,
+  void OpenDateTimeDialog(
+      ui::TextInputType dialog_type,
       double dialog_value,
       double min,
       double max,
@@ -164,24 +140,55 @@ class WebContentsDelegateEfl
   bool PreHandleGestureEvent(WebContents* source,
                              const blink::WebGestureEvent& event) override;
 
-  void TitleWasSet(content::NavigationEntry* entry,
-                   bool explicit_set) override;
-
-
   // WebContentsObserver---------------------------------------------------
-
-  void DidFailProvisionalLoad(
-      RenderFrameHost* render_frame_host,
-      const GURL& validated_url,
-      int error_code,
-      const base::string16& error_description,
-      bool was_ignored_by_handler) override;
-
   void DidFailLoad(RenderFrameHost* render_frame_host,
                    const GURL& validated_url,
                    int error_code,
-                   const base::string16& error_description,
-                   bool was_ignored_by_handler) override;
+                   const base::string16& error_description) override;
+
+  // EWK_BRINGUP: These APIs are removed in upstream.
+  void TitleWasSet(content::NavigationEntry* entry, bool explicit_set);
+
+  void LoadProgressChanged(WebContents* source, double progress);
+  void DidFinishLoad(RenderFrameHost* render_frame_host,
+                     const GURL& validated_url);
+
+  void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
+                                               const GURL& validated_url,
+                                               bool is_error_page,
+                                               bool is_iframe_srcdoc);
+
+  void DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates);
+
+  void DidCommitProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
+                                        const GURL& url,
+                                        ui::PageTransition transition_type);
+
+  void DidNavigateMainFrame(const LoadCommittedDetails& details,
+                            const FrameNavigateParams& params);
+  void DocumentOnLoadCompletedInMainFrame();
+
+  void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
+                           const LoadCommittedDetails& details,
+                           const FrameNavigateParams& params);
+
+  void DidFailProvisionalLoad(RenderFrameHost* render_frame_host,
+                              const GURL& validated_url,
+                              int error_code,
+                              const base::string16& error_description,
+                              bool was_ignored_by_handler);
+  // EWK_BRINGUP end.
+
+  void OnAuthRequired(net::URLRequest* request,
+                      const std::string& realm,
+                      LoginDelegateEfl* login_delegate);
+
+  void DidDownloadFavicon(bool success,
+                          const GURL& icon_url,
+                          const SkBitmap& bitmap);
+
+  EWebView* web_view() const { return web_view_; }
+  WebContents& web_contents() const { return web_contents_; }
 
  private:
   void OnGetContentSecurityPolicy(IPC::Message* reply_msg);
@@ -195,9 +202,7 @@ class WebContentsDelegateEfl
 
   struct ContentSecurityPolicy {
     ContentSecurityPolicy(const std::string& p, Ewk_CSP_Header_Type type)
-        : policy(p),
-          header_type(type) {
-    }
+        : policy(p), header_type(type) {}
     std::string policy;
     Ewk_CSP_Header_Type header_type;
   };
@@ -207,11 +212,11 @@ class WebContentsDelegateEfl
   JavaScriptDialogManagerEfl* dialog_manager_;
   std::unique_ptr<FaviconDownloader> favicon_downloader_;
   base::WeakPtrFactory<WebContentsDelegateEfl> weak_ptr_factory_;
-  std::unique_ptr<_Ewk_Certificate_Policy_Decision> certificate_policy_decision_;
+  std::unique_ptr<_Ewk_Certificate_Policy_Decision>
+      certificate_policy_decision_;
 
   DISALLOW_COPY_AND_ASSIGN(WebContentsDelegateEfl);
 };
-
 }
 
 #endif
index 80ca2cad46bf503763031de509440718e58701ab..18dba6f9aa0aa2846b44cd8b28dfea0a0eef0e3b 100644 (file)
@@ -97,8 +97,9 @@ net::URLRequestJob* WrtFileProtocolHandler::MaybeCreateJob(
   const bool is_file = net::FileURLToFilePath(request->url(), &file_path);
 
   // Check file access permissions.
+  // FIXME: The third parameter of net::URLRequestErrorJob sould be absolute_path.
   if (!network_delegate ||
-      !network_delegate->CanAccessFile(*request, file_path)) {
+      !network_delegate->CanAccessFile(*request, file_path, file_path)) {
     return new net::URLRequestErrorJob(request, network_delegate, net::ERR_ACCESS_DENIED);
   }
 
@@ -126,10 +127,3 @@ bool WrtFileProtocolHandler::IsSafeRedirectTarget(const GURL& location) const {
   return false;
 }
 }  // namespace
-
-net::URLRequestJobFactory::ProtocolHandler*
-GetWrtFileProtocolHandler() {
-  return
-      new WrtFileProtocolHandler(BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
-          base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
-}
index a94a45c8868580482b624670563ff88f3d296c6f..fb971feb11b392722f65a0f843d0978f334a2189 100644 (file)
@@ -7,6 +7,4 @@
 
 #include "net/url_request/url_request_job_factory.h"
 
-net::URLRequestJobFactory::ProtocolHandler* GetWrtFileProtocolHandler();
-
 #endif  // WRT_FILE_PROTOCOL_HANDLER
index 553e8b08560bd4fd3242751d05587df7335c08f0..67edee3259333676c3fafb564b1627a52168280f 100644 (file)
@@ -66,9 +66,12 @@ bool WrtWidgetHostMessageFilter::OnMessageReceived(const IPC::Message& message)
 WrtWidgetHost* WrtWidgetHost::Get() {
   // TODO(z.kostrzewa) LazyInstance is thread-safe but creating
   // WrtWidgetHost is not - make it thread-safe.
+#if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
+  // FIXME: ‘New’ is not a member of ‘base::internal::ErrorMustSelectLazyOrDestructorAtExitForLazyInstance<std::unique_ptr<WrtWidgetHost> >’
   if (!g_wrt_widget_host.Get().get())
     g_wrt_widget_host.Get().reset(new WrtWidgetHost);
   return g_wrt_widget_host.Get().get();
+#endif
 }
 
 WrtWidgetHost::WrtWidgetHost()
index fcdd83d2c59caee8eaf01ecce2efcfa34c919bf4..7349697ed8c93ca5d3e5196a35a3da8a1ec621da 100644 (file)
@@ -1034,7 +1034,7 @@ void __customize_context_menu_cb(void* data, Evas_Object *obj, void *event_info)
 
 static void get_app_cache_usage_cb(int64_t usage, void* user_data)
 {
-  static int count_usage_callback = 0;
+  static unsigned int count_usage_callback = 0;
   Ewk_Security_Origin* origin = (Ewk_Security_Origin*)user_data;
   printf("AppCache usage for %s is %ld\n", ewk_security_origin_host_get(origin), (long int)usage);
   ewk_context_application_cache_delete(ewk_context_default_get(), origin);
@@ -1075,7 +1075,7 @@ static void get_origins_for_webDB_cb(Eina_List* origins, void* user_data)
   Eina_List* list_iterator = NULL;
   void* data = NULL;
   web_database_origins = origins;
-  static int flag = 0;
+  static unsigned int flag = 0;
   EINA_LIST_FOREACH(origins, list_iterator, data) {
     Ewk_Security_Origin* origin = (Ewk_Security_Origin*)(data);
     printf("Web Database origin : %s\n", ewk_security_origin_host_get(origin));
index 32423c221171bc48c2d39f474b6ee5980d6bef7f..e2844a9d436f747549886bd33eab8696722e1842 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include <app.h>
+#include <appfw/app.h>
 #include <dlog.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
index b8131009a484763c4a291c031288191d600ea721..ff13d93b5aa4fc310e6244ab127df6f566655fe4 100644 (file)
@@ -275,7 +275,6 @@ Evas_Object* Browser::CreateControlButtons(Evas_Object* parent) {
 
 void Browser::OnToolboxWindowDelRequest(void* data, Evas_Object*, void*) {
   Browser* thiz = static_cast<Browser*>(data);
-  WindowMap::iterator it = thiz->window_map_.begin();
   while (!thiz->window_map_.empty())
     thiz->window_map_.begin()->second.window->Close();
   thiz->toolbox_window_ = NULL;
index 0b16a04b0cf1a546a189faac1c6bb51637d73f2b..7b9c9737460a13211cdc8fbd7edd74755c692159 100644 (file)
@@ -9,7 +9,7 @@
 #include <unistd.h>
 #include <vector>
 #if defined(OS_TIZEN)
-#include <app.h>
+#include <appfw/app.h>
 #endif // OS_TIZEN
 
 #include "browser.h"
index f55c467dd06f7829316ea0df1e2ae652a50b30e9..973ac5060acb462f6044131ee3dd28368a07b65d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "base/logging.h"
 #include "build/build_config.h"
+#include "third_party/skia/include/core/SkRegion.h"
 
 #if defined(OS_ANDROID)
 #include "base/android/scoped_java_ref.h"