From d354aae3aa09bbbb4edefeb5e8834b636d29ae79 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Thu, 9 Apr 2015 16:12:25 +0900 Subject: [PATCH] [Bringup refactor] Allow refactor branch build against M42 Patch does the following: - Fixes include paths for gfx geometry headers. - API adaptations on the following methods: * Shell::GetJavaScriptDialogManager * Shell::CreateNewWindow new signature * ContentAutofillDriverFactory::FromWebContents * PasswordFormManager::OnGetPasswordStoreResults new signature - Disables dragging triggers. - Disables form navigation triggers --- .../content/browser/web_contents/web_contents_impl_efl.cc | 4 +++- .../content/browser/web_contents/web_drag_dest_efl.h | 2 +- .../content/browser/web_contents/web_drag_source_efl.h | 4 ++-- tizen_src/chromium_impl/content/shell/browser/shell_efl.cc | 3 +-- .../shell/browser/shell_web_contents_view_delegate_efl.cc | 5 ++++- .../media/base/efl/demuxer_stream_player_params_efl.h | 2 +- .../media/base/efl/media_player_bridge_gstreamer.cc | 2 +- .../media/base/tizen/media_player_bridge_capi.cc | 2 +- tizen_src/chromium_impl/ui/gl/efl_pixmap.h | 3 +-- tizen_src/ewk/efl_integration/autofill_popup_view_efl.h | 11 +++++------ .../browser/autofill/autofill_manager_delegate_efl.cc | 9 ++++----- .../browser/autofill/autofill_manager_delegate_efl.h | 3 ++- .../browser/notification/notification_controller_efl.h | 2 +- .../password_manager/content_password_manager_driver.cc | 3 ++- .../browser/password_manager/password_form_manager.cc | 2 +- .../browser/password_manager/password_form_manager.h | 4 ++-- tizen_src/ewk/efl_integration/common/hit_test_params.h | 2 +- tizen_src/ewk/efl_integration/content_browser_client_efl.h | 1 + tizen_src/ewk/efl_integration/context_menu_controller_efl.cc | 4 ++++ .../private/ewk_context_form_autofill_profile_private.cc | 4 ++-- .../efl_integration/renderer/content_renderer_client_efl.cc | 2 ++ .../ewk/efl_integration/renderer/render_frame_observer_efl.cc | 2 ++ tizen_src/ewk/efl_integration/selection_handle_efl.h | 4 ++-- 23 files changed, 46 insertions(+), 34 deletions(-) diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc index 455a7c8..dbae614 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc @@ -158,9 +158,11 @@ void WebContentsImplEfl::CreateNewWindow( return; // End of EFL port specific code. + content::WebContents* thiz = this; if (delegate_ && - !delegate_->ShouldCreateWebContents(this, + !delegate_->ShouldCreateWebContents(thiz, route_id, + main_frame_route_id, params.window_container_type, params.frame_name, params.target_url, diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h index b85e565..29652d5 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h @@ -11,7 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "content/public/common/drop_data.h" #include "third_party/WebKit/public/web/WebDragOperation.h" -#include "ui/gfx/point.h" +#include "ui/gfx/geometry/point.h" namespace content { diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h index e1bd9e2..cd225d9 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h @@ -12,8 +12,8 @@ #include "base/strings/string16.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/public/web/WebDragOperation.h" -#include "ui/gfx/point.h" -#include "ui/gfx/vector2d.h" +#include "ui/gfx/geometry/point.h" +#include "ui/gfx/geometry/vector2d.h" #include "url/gurl.h" namespace content { diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc index 05387d8..dfe7049 100644 --- a/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc +++ b/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc @@ -131,7 +131,6 @@ class Shell::Impl { Shell::CreateNewWindow(shell->web_contents()->GetBrowserContext(), GURL("https://www.google.com"), NULL, - MSG_ROUTING_NONE, gfx::Size(kDefaultTestWindowWidthDip, kDefaultTestWindowHeightDip)); } @@ -231,7 +230,7 @@ bool Shell::PlatformHandleContextMenu( return false; } -JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { +JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(WebContents* source) { if (!dialog_manager_) { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); if (command_line.HasSwitch(switches::kDumpRenderTree)) { diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc index 8944525..a10571c 100644 --- a/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc +++ b/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc @@ -32,14 +32,15 @@ void OpenInNewWindow(void* data, Evas_Object*, void*) { Shell::CreateNewWindow(browser_context, params->link_url, NULL, - MSG_ROUTING_NONE, gfx::Size()); } void StartDragging(void* data, Evas_Object*, void*) { WebContents* wc = static_cast(data); RenderViewHost* rvh = wc->GetRenderViewHost(); +#if !defined(EWK_BRINGUP) rvh->StartDragging(); +#endif } void Cut(void* data, Evas_Object*, void*) { @@ -122,10 +123,12 @@ void ShellWebContentsViewDelegate::ShowContextMenu( elm_menu_item_separator_add(menu, NULL); } +#if !defined(EWK_BRINGUP) if (params.is_draggable) { 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", diff --git a/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h b/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h index a9936fa..282e0b3 100644 --- a/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h +++ b/tizen_src/chromium_impl/media/base/efl/demuxer_stream_player_params_efl.h @@ -12,7 +12,7 @@ #include "media/base/demuxer_stream.h" #include "media/base/media_export.h" #include "media/base/video_decoder_config.h" -#include "ui/gfx/size.h" +#include "ui/gfx/geometry/size.h" namespace media { diff --git a/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc b/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc index a0f2b00..092154e 100644 --- a/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc +++ b/tizen_src/chromium_impl/media/base/efl/media_player_bridge_gstreamer.cc @@ -12,7 +12,7 @@ #include "base/basictypes.h" #include "base/message_loop/message_loop_proxy.h" #include "media/base/efl/media_player_manager_efl.h" -#include "ui/gfx/size.h" +#include "ui/gfx/geometry/size.h" #if defined(OS_TIZEN_MOBILE) && (defined(TIZEN_V_2_3) || defined(TIZEN_V_2_4)) #include diff --git a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc index 5d6826b..516d7d3 100644 --- a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc +++ b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc @@ -13,7 +13,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/common/content_switches.h" #include "media/base/tizen/media_player_manager_tizen.h" -#include "ui/gfx/size.h" +#include "ui/gfx/geometry/size.h" #if defined(OS_TIZEN_MOBILE) #include diff --git a/tizen_src/chromium_impl/ui/gl/efl_pixmap.h b/tizen_src/chromium_impl/ui/gl/efl_pixmap.h index 95f3077..9cb0192 100644 --- a/tizen_src/chromium_impl/ui/gl/efl_pixmap.h +++ b/tizen_src/chromium_impl/ui/gl/efl_pixmap.h @@ -11,10 +11,9 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "cc/base/ref_counted_managed.h" -#include "ui/gfx/size.h" +#include "ui/gfx/geometry/size.h" #include "ui/gl/gl_bindings.h" - namespace gfx { class NativeBuffer; diff --git a/tizen_src/ewk/efl_integration/autofill_popup_view_efl.h b/tizen_src/ewk/efl_integration/autofill_popup_view_efl.h index 033b07b..83f434b 100644 --- a/tizen_src/ewk/efl_integration/autofill_popup_view_efl.h +++ b/tizen_src/ewk/efl_integration/autofill_popup_view_efl.h @@ -8,15 +8,14 @@ #ifdef TIZEN_AUTOFILL_SUPPORT #include -#include -#include +#include #include +#include #include -#include -#include "ui/gfx/screen.h" -#include "components/autofill/core/browser/autofill_popup_delegate.h" +#include + #include "browser/password_manager/password_form_manager.h" -#include "ui/gfx/image/image_skia.h" +#include "components/autofill/core/browser/autofill_popup_delegate.h" #include "ui/gfx/geometry/point.h" using namespace password_manager; diff --git a/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.cc b/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.cc index b76702f..9e86f69 100644 --- a/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.cc @@ -6,13 +6,13 @@ #include "browser/autofill/autofill_manager_delegate_efl.h" +#include "base/logging.h" +#include "base/prefs/pref_service.h" +#include "base/strings/utf_string_conversions.h" #include "browser/autofill/personal_data_manager_factory.h" #include "browser/webdata/web_data_service_factory.h" #include "browser/password_manager/password_manager_client_efl.h" #include "browser/password_manager/password_generation_manager.h" -#include "base/logging.h" -#include "base/prefs/pref_service.h" -#include "base/strings/utf_string_conversions.h" #include "components/autofill/content/common/autofill_messages.h" #include "components/autofill/core/common/autofill_pref_names.h" #include "components/autofill/core/browser/autofill_client.h" @@ -21,7 +21,6 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/browser_thread.h" #include "ui/gfx/geometry/rect.h" -#include #include "tizen_webview/public/tw_web_context.h" DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::AutofillManagerDelegateEfl); @@ -81,7 +80,7 @@ void AutofillManagerDelegateEfl::ShowAutofillSettings() { NOTIMPLEMENTED(); } -void AutofillManagerDelegateEfl::ConfirmSaveCreditCard(const AutofillMetrics& metric_logger, const base::Closure& save_card_callback) { +void AutofillManagerDelegateEfl::ConfirmSaveCreditCard(const base::Closure& save_card_callback) { NOTIMPLEMENTED(); } diff --git a/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.h b/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.h index a57dc7e..06ce4ad 100644 --- a/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/browser/autofill/autofill_manager_delegate_efl.h @@ -12,6 +12,7 @@ #include "base/i18n/rtl.h" #include "base/memory/weak_ptr.h" #include "components/autofill/core/browser/autofill_client.h" +#include "components/autofill/core/browser/autofill_metrics.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" #include "browser/password_manager/password_form_manager.h" @@ -42,7 +43,7 @@ class AutofillManagerDelegateEfl PrefService* GetPrefs() override; void HideRequestAutocompleteDialog() override; void ShowAutofillSettings() override; - void ConfirmSaveCreditCard(const AutofillMetrics& metric_logger, + void ConfirmSaveCreditCard( const base::Closure& save_card_callback) override; void ShowRequestAutocompleteDialog( const autofill::FormData& form, diff --git a/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h b/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h index cb3fdc4..5e27f9e 100644 --- a/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h +++ b/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h @@ -15,7 +15,7 @@ #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h" -#include "third_party/WebKit/public/platform/WebNotificationPermission.h" +#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h" #include "url/gurl.h" class Ewk_Notification_Permission_Request; diff --git a/tizen_src/ewk/efl_integration/browser/password_manager/content_password_manager_driver.cc b/tizen_src/ewk/efl_integration/browser/password_manager/content_password_manager_driver.cc index d93610d..cc0b970 100644 --- a/tizen_src/ewk/efl_integration/browser/password_manager/content_password_manager_driver.cc +++ b/tizen_src/ewk/efl_integration/browser/password_manager/content_password_manager_driver.cc @@ -8,6 +8,7 @@ #include "browser/password_manager/content_password_manager_driver.h" #include "components/autofill/content/browser/content_autofill_driver.h" +#include "components/autofill/content/browser/content_autofill_driver_factory.h" #include "components/autofill/content/common/autofill_messages.h" #include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/common/password_form.h" @@ -103,7 +104,7 @@ bool ContentPasswordManagerDriver::OnMessageReceived( autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { autofill::ContentAutofillDriver* driver = - autofill::ContentAutofillDriver::FromWebContents(web_contents()); + autofill::ContentAutofillDriverFactory::FromWebContents(web_contents()); return driver ? driver->autofill_manager() : NULL; } diff --git a/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.cc b/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.cc index 3d6c8ed..4b1910f 100644 --- a/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.cc +++ b/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.cc @@ -386,7 +386,7 @@ void PasswordFormManager::OnRequestDone( } void PasswordFormManager::OnGetPasswordStoreResults( - const std::vector& results) { + ScopedVector results) { DCHECK_EQ(state_, MATCHING_PHASE); if (results.empty()) { diff --git a/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.h b/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.h index 97763fc..01bdfaa 100644 --- a/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.h +++ b/tizen_src/ewk/efl_integration/browser/password_manager/password_form_manager.h @@ -104,8 +104,8 @@ class PasswordFormManager : public PasswordStoreConsumer { // Takes ownership of the elements in |result|. void OnRequestDone(const std::vector& result); - virtual void OnGetPasswordStoreResults( - const std::vector& results) override; + void OnGetPasswordStoreResults( + ScopedVector results) override; // A user opted to 'never remember' passwords for this form. // Blacklist it so that from now on when it is seen we ignore it. diff --git a/tizen_src/ewk/efl_integration/common/hit_test_params.h b/tizen_src/ewk/efl_integration/common/hit_test_params.h index 49e3645..f788fc6 100644 --- a/tizen_src/ewk/efl_integration/common/hit_test_params.h +++ b/tizen_src/ewk/efl_integration/common/hit_test_params.h @@ -10,7 +10,7 @@ #include "ipc/ipc_message.h" #include "ipc/ipc_param_traits.h" -#include "ui/gfx/size.h" +#include "ui/gfx/geometry/size.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/ipc/gfx_param_traits.h" diff --git a/tizen_src/ewk/efl_integration/content_browser_client_efl.h b/tizen_src/ewk/efl_integration/content_browser_client_efl.h index fd5e71e..ecc1db4 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.h +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.h @@ -6,6 +6,7 @@ #define CONTENT_BROWSER_CLIENT_EFL #include "content/public/browser/content_browser_client.h" +#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h" namespace base { class CommandLine; diff --git a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc index 80a76bd..b1f5cb9 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc @@ -167,10 +167,12 @@ void ContextMenuControllerEfl::GetProposedContextMenu() { AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_SELECT_ALL, std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB"))); } +#if !defined(EWK_BRINGUP) if (params_.is_draggable) { AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_DRAG, std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_DRAG_AND_DROP"))); } +#endif if (params_.is_editable && ClipboardHelperEfl::NumberOfItems() > 0) { AddItemToPropsedList(MENU_ITEM_TYPE_ACTION, MENU_ITEM_CLIPBOARD, std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CLIPBOARD"))); @@ -820,12 +822,14 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item) ClipboardHelperEfl::GetInstance()->OpenClipboardWindow(view, true); break; } +#if !defined(EWK_BRINGUP) case MENU_ITEM_DRAG: { RenderViewHost* rvh = web_contents_.GetRenderViewHost(); rvh->StartDragging(); context_menu_show_pos_.SetPoint(params_.x, params_.y); break; } +#endif default: CustomMenuItemSelected(menu_item); } diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_form_autofill_profile_private.cc b/tizen_src/ewk/efl_integration/private/ewk_context_form_autofill_profile_private.cc index 4fccc64..8623f7e 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_context_form_autofill_profile_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_context_form_autofill_profile_private.cc @@ -84,7 +84,7 @@ void to_Autofill_Profile_set_data(const Ewk_Autofill_Profile* oldStyleProfile, std::string locale, autofill::AutofillProfile &ret) { base::string16 value; - static map profile_map = + static std::map profile_map = create_EWK_to_Autofill_profile_map(); if (0 < (value = oldStyleProfile->get16Data(DataName)).length()) { ret.SetInfo(autofill::AutofillType(profile_map.find(DataName)->second), @@ -141,7 +141,7 @@ void to_EWK_Profile_set_data(const autofill::AutofillProfile& newStyleProfile, std::string locale, Ewk_Autofill_Profile* ret) { base::string16 value; - static map profile_map = + static std::map profile_map = create_Autofill_to_EWK_profile_map(); if (0 < (value = newStyleProfile.GetInfo(autofill::AutofillType( DataName), locale)).length()) { diff --git a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc index 9283526..a2cd539 100644 --- a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc @@ -106,7 +106,9 @@ void ContentRendererClientEfl::RenderViewCreated(content::RenderView* render_vie password_generation_agent); #endif +#if !defined(EWK_BRINGUP) render_view->SetWrtUrlParser(wrt_url_parser_.get()); +#endif } bool ContentRendererClientEfl::HandleNavigation(content::RenderFrame* render_frame, diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc index ae576ba..08e2408 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc @@ -61,8 +61,10 @@ bool RenderFrameObserverEfl::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) IPC_MESSAGE_HANDLER(FrameMsg_ClosePopupMenu, OnClosePopupMenu) #endif +#if !defined(EWK_BRINGUP) IPC_MESSAGE_HANDLER(FrameMsg_MoveToPreviousSelectElement, OnMovePreviousSelectElement) IPC_MESSAGE_HANDLER(FrameMsg_MoveToNextSelectElement, OnMoveNextSelectElement) +#endif IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; diff --git a/tizen_src/ewk/efl_integration/selection_handle_efl.h b/tizen_src/ewk/efl_integration/selection_handle_efl.h index 9a83d33..75083a6 100644 --- a/tizen_src/ewk/efl_integration/selection_handle_efl.h +++ b/tizen_src/ewk/efl_integration/selection_handle_efl.h @@ -5,10 +5,10 @@ #ifndef selection_handle_h #define selection_handle_h -#include "ui/gfx/geometry/point.h" - #include +#include "ui/gfx/geometry/point.h" + namespace content { class SelectionControllerEfl; -- 2.7.4