summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-03 16:33:45 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-03 16:33:45 +0000
commitfc2b46bc8a826bbce32c0a1cfef6678aa7b0bb2b (patch)
treefc99a46723b215ce1dcb6e9d0d6a9c859a1317ae
parent08bb7500c4583bb641717819ade7af8e520e92cb (diff)
downloadchromium_src-fc2b46bc8a826bbce32c0a1cfef6678aa7b0bb2b.zip
chromium_src-fc2b46bc8a826bbce32c0a1cfef6678aa7b0bb2b.tar.gz
chromium_src-fc2b46bc8a826bbce32c0a1cfef6678aa7b0bb2b.tar.bz2
Hide WebContentsView from Chrome. This also removes WebContentsViewPort.
TestWebContentsView goes away since it's not needed anymore BUG=304341 R=avi@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/262823006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268072 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--android_webview/native/aw_autofill_manager_delegate.cc4
-rw-r--r--android_webview/native/aw_web_contents_view_delegate.cc1
-rw-r--r--apps/app_window.cc2
-rw-r--r--apps/shell/browser/shell_app_window.cc5
-rw-r--r--apps/ui/views/native_app_window_views.cc3
-rw-r--r--apps/ui/web_contents_sizer.cc3
-rw-r--r--apps/ui/web_contents_sizer.mm3
-rw-r--r--chrome/browser/android/omnibox/omnibox_prerender.cc4
-rw-r--r--chrome/browser/apps/app_browsertest.cc5
-rw-r--r--chrome/browser/apps/ephemeral_app_launcher.cc3
-rw-r--r--chrome/browser/apps/web_view_interactive_browsertest.cc7
-rw-r--r--chrome/browser/apps/window_controls_browsertest.cc3
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc1
-rw-r--r--chrome/browser/chrome_content_browser_client.cc1
-rw-r--r--chrome/browser/chrome_plugin_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/external_protocol_dialog.cc3
-rw-r--r--chrome/browser/chromeos/login/login_display_host_impl.cc3
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc3
-rw-r--r--chrome/browser/devtools/devtools_file_helper.cc3
-rw-r--r--chrome/browser/devtools/devtools_ui_bindings.cc3
-rw-r--r--chrome/browser/devtools/devtools_window.cc11
-rw-r--r--chrome/browser/download/download_file_picker.cc4
-rw-r--r--chrome/browser/download/download_shelf.cc3
-rw-r--r--chrome/browser/download/save_package_file_picker.cc3
-rw-r--r--chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc3
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.cc3
-rw-r--r--chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc5
-rw-r--r--chrome/browser/extensions/api/developer_private/entry_picker.cc3
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api.cc6
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.cc3
-rw-r--r--chrome/browser/extensions/api/media_galleries/media_galleries_api.cc3
-rw-r--r--chrome/browser/extensions/api/messaging/incognito_connectability.cc4
-rw-r--r--chrome/browser/extensions/api/sessions/sessions_api.cc2
-rw-r--r--chrome/browser/extensions/api/sessions/sessions_api.h2
-rw-r--r--chrome/browser/extensions/api/streams_private/streams_private_api.cc2
-rw-r--r--chrome/browser/extensions/api/streams_private/streams_private_api.h2
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.cc3
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_event_router.cc7
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_event_router.h2
-rw-r--r--chrome/browser/extensions/extension_install_prompt.cc3
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc21
-rw-r--r--chrome/browser/extensions/extension_tab_util.h12
-rw-r--r--chrome/browser/extensions/extension_tab_util_android.cc6
-rw-r--r--chrome/browser/extensions/extension_view_host.cc7
-rw-r--r--chrome/browser/extensions/tab_helper.cc3
-rw-r--r--chrome/browser/managed_mode/managed_mode_navigation_observer.cc4
-rw-r--r--chrome/browser/media_galleries/media_galleries_dialog_controller.cc3
-rw-r--r--chrome/browser/mouseleave_browsertest.cc4
-rw-r--r--chrome/browser/password_manager/chrome_password_manager_client.cc9
-rw-r--r--chrome/browser/plugins/plugin_observer.cc3
-rw-r--r--chrome/browser/prerender/prerender_contents.cc3
-rw-r--r--chrome/browser/prerender/prerender_local_predictor.cc4
-rw-r--r--chrome/browser/prerender/prerender_manager.cc1
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc6
-rw-r--r--chrome/browser/printing/print_preview_dialog_controller.cc3
-rw-r--r--chrome/browser/printing/print_preview_test.cc3
-rw-r--r--chrome/browser/printing/print_view_manager_base.cc1
-rw-r--r--chrome/browser/printing/printing_message_filter.cc3
-rw-r--r--chrome/browser/printing/printing_ui_web_contents_observer.cc3
-rw-r--r--chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc4
-rw-r--r--chrome/browser/renderer_context_menu/spelling_menu_observer.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc1
-rw-r--r--chrome/browser/sessions/session_restore.cc4
-rw-r--r--chrome/browser/sessions/session_restore_browsertest.cc3
-rw-r--r--chrome/browser/ssl/ssl_tab_helper.cc3
-rw-r--r--chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc1
-rw-r--r--chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.cc4
-rw-r--r--chrome/browser/ui/apps/chrome_app_window_delegate.cc3
-rw-r--r--chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc1
-rw-r--r--chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc3
-rw-r--r--chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc10
-rw-r--r--chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc6
-rw-r--r--chrome/browser/ui/blocked_content/blocked_window_params.cc3
-rw-r--r--chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc3
-rw-r--r--chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc1
-rw-r--r--chrome/browser/ui/browser.cc10
-rw-r--r--chrome/browser/ui/browser.h2
-rw-r--r--chrome/browser/ui/browser_browsertest.cc13
-rw-r--r--chrome/browser/ui/browser_commands.cc8
-rw-r--r--chrome/browser/ui/browser_focus_uitest.cc3
-rw-r--r--chrome/browser/ui/browser_instant_controller.cc1
-rw-r--r--chrome/browser/ui/browser_navigator.cc5
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc7
-rw-r--r--chrome/browser/ui/browser_tabrestore.cc3
-rw-r--r--chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.cc3
-rw-r--r--chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm15
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm1
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm3
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm3
-rw-r--r--chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.mm3
-rw-r--r--chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm3
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm13
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller_private.mm5
-rw-r--r--chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm3
-rw-r--r--chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm3
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm5
-rw-r--r--chrome/browser/ui/cocoa/dev_tools_controller.mm10
-rw-r--r--chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm9
-rw-r--r--chrome/browser/ui/cocoa/download/download_started_animation_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_view_mac.mm3
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm5
-rw-r--r--chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm9
-rw-r--r--chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/profiles/user_manager_mac.mm3
-rw-r--r--chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm1
-rw-r--r--chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm1
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm1
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm5
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm7
-rw-r--r--chrome/browser/ui/cocoa/web_dialog_window_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm1
-rw-r--r--chrome/browser/ui/extensions/application_launch.cc3
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc5
-rw-r--r--chrome/browser/ui/fullscreen/fullscreen_controller.cc1
-rw-r--r--chrome/browser/ui/fullscreen/fullscreen_controller_state_unittest.cc3
-rw-r--r--chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.cc4
-rw-r--r--chrome/browser/ui/sad_tab_helper.cc1
-rw-r--r--chrome/browser/ui/search/instant_controller.cc3
-rw-r--r--chrome/browser/ui/search/instant_extended_interactive_uitest.cc1
-rw-r--r--chrome/browser/ui/search/search_tab_helper.cc3
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_impl.cc1
-rw-r--r--chrome/browser/ui/sync/one_click_signin_helper.cc1
-rw-r--r--chrome/browser/ui/tabs/tab_strip_model.cc4
-rw-r--r--chrome/browser/ui/views/autofill/autofill_dialog_views.cc3
-rw-r--r--chrome/browser/ui/views/color_chooser_aura.cc3
-rw-r--r--chrome/browser/ui/views/color_chooser_win.cc3
-rw-r--r--chrome/browser/ui/views/download/download_started_animation_views.cc5
-rw-r--r--chrome/browser/ui/views/extensions/extension_dialog.cc3
-rw-r--r--chrome/browser/ui/views/extensions/extension_popup.cc3
-rw-r--r--chrome/browser/ui/views/extensions/extension_view_views.cc5
-rw-r--r--chrome/browser/ui/views/external_protocol_dialog.cc3
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc8
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc15
-rw-r--r--chrome/browser/ui/views/frame/contents_web_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc1
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc7
-rw-r--r--chrome/browser/ui/views/location_bar/star_view_browsertest.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/zoom_bubble_view.cc4
-rw-r--r--chrome/browser/ui/views/panels/panel_view.cc3
-rw-r--r--chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc3
-rw-r--r--chrome/browser/ui/views/profiles/user_manager_view.cc1
-rw-r--r--chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc1
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc8
-rw-r--r--chrome/browser/ui/views/ssl_client_certificate_selector.cc3
-rw-r--r--chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc1
-rw-r--r--chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc5
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller.cc3
-rw-r--r--chrome/browser/ui/views/toolbar/toolbar_view.cc1
-rw-r--r--chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc1
-rw-r--r--chrome/browser/ui/views/web_dialog_view_browsertest.cc3
-rw-r--r--chrome/browser/ui/webui/app_list/start_page_handler.cc5
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler.cc3
-rw-r--r--chrome/browser/ui/webui/extensions/extension_loader_handler.cc4
-rw-r--r--chrome/browser/ui/webui/extensions/install_extension_handler.cc3
-rw-r--r--chrome/browser/ui/webui/extensions/pack_extension_handler.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc3
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_utils_win.cc3
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc3
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc3
-rw-r--r--chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc3
-rw-r--r--chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc3
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.cc3
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_handler.cc8
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_ui.cc2
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_ui.h3
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/set_as_default_browser_ui.cc3
-rw-r--r--chrome/browser/ui/webui/signin/user_manager_screen_handler.cc3
-rw-r--r--chrome/test/base/ui_test_utils.cc1
-rw-r--r--chrome/test/base/web_ui_browsertest.cc5
-rw-r--r--components/autofill/content/browser/risk/fingerprint.cc8
-rw-r--r--components/autofill/content/browser/risk/fingerprint.h2
-rw-r--r--components/web_contents_delegate_android/color_chooser_android.cc1
-rw-r--r--components/web_modal/web_contents_modal_dialog_manager.cc1
-rw-r--r--content/browser/android/content_view_core_impl.cc16
-rw-r--r--content/browser/android/content_view_core_impl.h2
-rw-r--r--content/browser/android/download_controller_android_impl.cc1
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.cc1
-rw-r--r--content/browser/frame_host/interstitial_page_impl.cc17
-rw-r--r--content/browser/frame_host/interstitial_page_impl.h1
-rw-r--r--content/browser/frame_host/render_frame_host_manager.cc2
-rw-r--r--content/browser/media/webrtc_internals.cc4
-rw-r--r--content/browser/web_contents/aura/gesture_nav_simple.cc6
-rw-r--r--content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc2
-rw-r--r--content/browser/web_contents/touch_editable_impl_aura_browsertest.cc8
-rw-r--r--content/browser/web_contents/web_contents_impl.cc122
-rw-r--r--content/browser/web_contents/web_contents_impl.h27
-rw-r--r--content/browser/web_contents/web_contents_impl_browsertest.cc15
-rw-r--r--content/browser/web_contents/web_contents_view.h (renamed from content/public/browser/web_contents_view.h)62
-rw-r--r--content/browser/web_contents/web_contents_view_android.cc13
-rw-r--r--content/browser/web_contents/web_contents_view_android.h10
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc10
-rw-r--r--content/browser/web_contents/web_contents_view_aura.h17
-rw-r--r--content/browser/web_contents/web_contents_view_aura_browsertest.cc18
-rw-r--r--content/browser/web_contents/web_contents_view_guest.cc8
-rw-r--r--content/browser/web_contents/web_contents_view_guest.h28
-rw-r--r--content/browser/web_contents/web_contents_view_mac.h8
-rw-r--r--content/browser/web_contents/web_contents_view_mac.mm6
-rw-r--r--content/browser/webui/web_ui_impl.cc2
-rw-r--r--content/content_browser.gypi3
-rw-r--r--content/content_tests.gypi2
-rw-r--r--content/port/browser/web_contents_view_port.h64
-rw-r--r--content/public/browser/content_browser_client.cc6
-rw-r--r--content/public/browser/content_browser_client.h10
-rw-r--r--content/public/browser/web_contents.h68
-rw-r--r--content/public/browser/web_contents_delegate.cc2
-rw-r--r--content/public/browser/web_contents_delegate.h3
-rw-r--r--content/public/test/browser_test_utils.cc9
-rw-r--r--content/shell/browser/shell.cc13
-rw-r--r--content/shell/browser/shell_aura.cc3
-rw-r--r--content/shell/browser/shell_devtools_frontend.cc3
-rw-r--r--content/shell/browser/shell_download_manager_delegate.cc3
-rw-r--r--content/shell/browser/shell_javascript_dialog_manager.cc7
-rw-r--r--content/shell/browser/shell_mac.mm5
-rw-r--r--content/shell/browser/shell_views.cc7
-rw-r--r--content/shell/browser/shell_web_contents_view_delegate_android.cc1
-rw-r--r--content/shell/browser/shell_web_contents_view_delegate_mac.mm9
-rw-r--r--content/shell/browser/shell_web_contents_view_delegate_win.cc11
-rw-r--r--content/shell/browser/webkit_test_controller.cc3
-rw-r--r--content/test/test_content_browser_client.cc15
-rw-r--r--content/test/test_content_browser_client.h4
-rw-r--r--content/test/test_web_contents_view.cc125
-rw-r--r--content/test/test_web_contents_view.h74
-rw-r--r--ui/keyboard/keyboard_controller_proxy.cc3
-rw-r--r--ui/views/controls/webview/webview.cc5
-rw-r--r--ui/views/examples/webview_example.cc3
237 files changed, 569 insertions, 1008 deletions
diff --git a/android_webview/native/aw_autofill_manager_delegate.cc b/android_webview/native/aw_autofill_manager_delegate.cc
index 070e25e..93e04be 100644
--- a/android_webview/native/aw_autofill_manager_delegate.cc
+++ b/android_webview/native/aw_autofill_manager_delegate.cc
@@ -21,7 +21,6 @@
#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "jni/AwAutofillManagerDelegate_jni.h"
using base::android::AttachCurrentThread;
@@ -95,8 +94,7 @@ void AwAutofillManagerDelegate::ShowAutofillPopup(
delegate_ = delegate;
// Convert element_bounds to be in screen space.
- gfx::Rect client_area;
- web_contents_->GetView()->GetContainerBounds(&client_area);
+ gfx::Rect client_area = web_contents_->GetContainerBounds();
gfx::RectF element_bounds_in_screen_space =
element_bounds + client_area.OffsetFromOrigin();
diff --git a/android_webview/native/aw_web_contents_view_delegate.cc b/android_webview/native/aw_web_contents_view_delegate.cc
index 5c3db94..94f582a 100644
--- a/android_webview/native/aw_web_contents_view_delegate.cc
+++ b/android_webview/native/aw_web_contents_view_delegate.cc
@@ -6,7 +6,6 @@
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
namespace android_webview {
diff --git a/apps/app_window.cc b/apps/app_window.cc
index aff711d..84fb3e6 100644
--- a/apps/app_window.cc
+++ b/apps/app_window.cc
@@ -31,7 +31,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/media_stream_request.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
@@ -328,7 +327,6 @@ void AppWindow::Init(const GURL& url,
// We want to show the window only when the content has been painted. For
// that to happen, we need to define a size for the content, otherwise the
// layout will happen in a 0x0 area.
- // Note: WebContents::GetView() is guaranteed to be non-null.
gfx::Insets frame_insets = native_app_window_->GetFrameInsets();
gfx::Rect initial_bounds = new_params.GetInitialWindowBounds(frame_insets);
initial_bounds.Inset(frame_insets);
diff --git a/apps/shell/browser/shell_app_window.cc b/apps/shell/browser/shell_app_window.cc
index 52b1f6a..8015ff5 100644
--- a/apps/shell/browser/shell_app_window.cc
+++ b/apps/shell/browser/shell_app_window.cc
@@ -8,7 +8,6 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/extension_messages.h"
#include "ipc/ipc_message_macros.h"
@@ -44,11 +43,11 @@ void ShellAppWindow::Init(BrowserContext* context, gfx::Size initial_size) {
void ShellAppWindow::LoadURL(const GURL& url) {
content::NavigationController::LoadURLParams params(url);
web_contents_->GetController().LoadURLWithParams(params);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
aura::Window* ShellAppWindow::GetNativeWindow() {
- return web_contents_->GetView()->GetNativeView();
+ return web_contents_->GetNativeView();
}
int ShellAppWindow::GetRenderViewRoutingID() {
diff --git a/apps/ui/views/native_app_window_views.cc b/apps/ui/views/native_app_window_views.cc
index 04e7d9f..22c384e 100644
--- a/apps/ui/views/native_app_window_views.cc
+++ b/apps/ui/views/native_app_window_views.cc
@@ -9,7 +9,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/draggable_region.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/path.h"
@@ -233,7 +232,7 @@ bool NativeAppWindowViews::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
#if defined(USE_AURA)
- if (child->Contains(web_view_->web_contents()->GetView()->GetNativeView())) {
+ if (child->Contains(web_view_->web_contents()->GetNativeView())) {
// App window should claim mouse events that fall within the draggable
// region.
return !draggable_region_.get() ||
diff --git a/apps/ui/web_contents_sizer.cc b/apps/ui/web_contents_sizer.cc
index 041187f..ab4e18a 100644
--- a/apps/ui/web_contents_sizer.cc
+++ b/apps/ui/web_contents_sizer.cc
@@ -5,7 +5,6 @@
#include "apps/ui/web_contents_sizer.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#if defined(USE_AURA)
#include "ui/aura/window.h"
@@ -18,7 +17,7 @@ namespace apps {
void ResizeWebContents(content::WebContents* web_contents,
const gfx::Size& new_size) {
#if defined(USE_AURA)
- aura::Window* window = web_contents->GetView()->GetNativeView();
+ aura::Window* window = web_contents->GetNativeView();
window->SetBounds(gfx::Rect(window->bounds().origin(), new_size));
#elif defined(OS_ANDROID)
content::RenderWidgetHostView* view = web_contents->GetRenderWidgetHostView();
diff --git a/apps/ui/web_contents_sizer.mm b/apps/ui/web_contents_sizer.mm
index 8dd7cbd..f57d75c7 100644
--- a/apps/ui/web_contents_sizer.mm
+++ b/apps/ui/web_contents_sizer.mm
@@ -7,13 +7,12 @@
#import <Cocoa/Cocoa.h>
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
namespace apps {
void ResizeWebContents(content::WebContents* web_contents,
const gfx::Size& new_size) {
- NSView* view = web_contents->GetView()->GetNativeView();
+ NSView* view = web_contents->GetNativeView();
NSRect old_wcv_frame = [view frame];
CGFloat new_x = old_wcv_frame.origin.x;
CGFloat new_y =
diff --git a/chrome/browser/android/omnibox/omnibox_prerender.cc b/chrome/browser/android/omnibox/omnibox_prerender.cc
index 05e1636..67bb950 100644
--- a/chrome/browser/android/omnibox/omnibox_prerender.cc
+++ b/chrome/browser/android/omnibox/omnibox_prerender.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_android.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "jni/OmniboxPrerender_jni.h"
#include "url/gurl.h"
@@ -135,8 +134,7 @@ void OmniboxPrerender::DoPrerender(const AutocompleteMatch& match,
DCHECK(web_contents);
if (!web_contents)
return;
- gfx::Rect container_bounds;
- web_contents->GetView()->GetContainerBounds(&container_bounds);
+ gfx::Rect container_bounds = web_contents->GetContainerBounds();
predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)->
StartPrerendering(
match.destination_url,
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index 09f0606..96cdebf 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -38,7 +38,6 @@
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
@@ -142,9 +141,9 @@ class ScopedPreviewTestingDelegate : PrintPreviewUI::TestingDelegate {
}
// PrintPreviewUI::TestingDelegate implementation.
- virtual void DidRenderPreviewPage(const content::WebContents& preview_dialog)
+ virtual void DidRenderPreviewPage(content::WebContents* preview_dialog)
OVERRIDE {
- dialog_size_ = preview_dialog.GetView()->GetContainerSize();
+ dialog_size_ = preview_dialog->GetContainerBounds().size();
++rendered_page_count_;
CHECK(rendered_page_count_ <= total_page_count_);
if (waiting_runner_ && rendered_page_count_ == total_page_count_) {
diff --git a/chrome/browser/apps/ephemeral_app_launcher.cc b/chrome/browser/apps/ephemeral_app_launcher.cc
index 53bdabe..82111ef 100644
--- a/chrome/browser/apps/ephemeral_app_launcher.cc
+++ b/chrome/browser/apps/ephemeral_app_launcher.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/extensions/extension_enable_flow.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/permissions/permissions_data.h"
@@ -38,7 +37,7 @@ gfx::NativeWindow NativeWindowForWebContents(content::WebContents* contents) {
if (!contents)
return NULL;
- return contents->GetView()->GetTopLevelNativeWindow();
+ return contents->GetTopLevelNativeWindow();
}
} // namespace
diff --git a/chrome/browser/apps/web_view_interactive_browsertest.cc b/chrome/browser/apps/web_view_interactive_browsertest.cc
index 3b633fa..cb01b23 100644
--- a/chrome/browser/apps/web_view_interactive_browsertest.cc
+++ b/chrome/browser/apps/web_view_interactive_browsertest.cc
@@ -20,7 +20,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -225,8 +224,7 @@ class WebViewInteractiveTest
guest_web_contents_ = source->GetWebContents();
embedder_web_contents_ = guest_web_contents_->GetEmbedderWebContents();
- gfx::Rect offset;
- embedder_web_contents_->GetView()->GetContainerBounds(&offset);
+ gfx::Rect offset = embedder_web_contents_->GetContainerBounds();
corner_ = gfx::Point(offset.x(), offset.y());
const testing::TestInfo* const test_info =
@@ -689,9 +687,8 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DragDropWithinWebView) {
ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(GetPlatformAppWindow()));
- gfx::Rect offset;
embedder_web_contents_ = GetFirstAppWindowWebContents();
- embedder_web_contents_->GetView()->GetContainerBounds(&offset);
+ gfx::Rect offset = embedder_web_contents_->GetContainerBounds();
corner_ = gfx::Point(offset.x(), offset.y());
// In the drag drop test we add 20px padding to the page body because on
diff --git a/chrome/browser/apps/window_controls_browsertest.cc b/chrome/browser/apps/window_controls_browsertest.cc
index 7da2e46..172aa32 100644
--- a/chrome/browser/apps/window_controls_browsertest.cc
+++ b/chrome/browser/apps/window_controls_browsertest.cc
@@ -6,7 +6,6 @@
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/process_manager.h"
@@ -69,7 +68,7 @@ IN_PROC_BROWSER_TEST_F(WindowControlsTest, CloseControlWorks) {
// Send mouse click somewhere inside the [x] button
const int controlOffset = 25;
- int x = web_contents->GetView()->GetContainerSize().width() - controlOffset;
+ int x = web_contents->GetContainerBounds().size().width() - controlOffset;
int y = controlOffset;
content::SimulateMouseClickAt(web_contents,
0,
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 974c634..e60d75b 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -22,7 +22,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/events/keycodes/keyboard_codes.h"
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 83055d5..b1df734 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -119,7 +119,6 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/child_process_host.h"
#include "content/public/common/content_descriptors.h"
#include "content/public/common/url_utils.h"
diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc
index 290b36f..256d6df 100644
--- a/chrome/browser/chrome_plugin_browsertest.cc
+++ b/chrome/browser/chrome_plugin_browsertest.cc
@@ -34,7 +34,6 @@
#include "net/base/filename_util.h"
#if defined(OS_WIN)
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#endif
@@ -326,8 +325,7 @@ IN_PROC_BROWSER_TEST_F(ChromePluginTest, WindowedNPAPIPluginHidden) {
EXPECT_EQ(expected_title2, title_watcher2.WaitAndGetTitle());
HWND child = NULL;
- HWND hwnd =
- tab->GetView()->GetNativeView()->GetHost()->GetAcceleratedWidget();
+ HWND hwnd = tab->GetNativeView()->GetHost()->GetAcceleratedWidget();
EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
RECT region;
diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc
index 7bed86d..06c44d5 100644
--- a/chrome/browser/chromeos/external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/external_protocol_dialog.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/external_protocol/external_protocol_handler.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -108,7 +107,7 @@ ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents,
gfx::NativeWindow parent_window;
if (web_contents) {
- parent_window = web_contents->GetView()->GetTopLevelNativeWindow();
+ parent_window = web_contents->GetTopLevelNativeWindow();
} else {
// Dialog is top level if we don't have a web_contents associated with us.
parent_window = NULL;
diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc
index 4692b4e..772188d5 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -71,7 +71,6 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "grit/browser_resources.h"
#include "media/audio/sounds/sounds_manager.h"
@@ -960,7 +959,7 @@ void LoginDisplayHostImpl::ShowWebUI() {
}
LOG(WARNING) << "Login WebUI >> Show already initialized UI";
login_window_->Show();
- login_view_->GetWebContents()->GetView()->Focus();
+ login_view_->GetWebContents()->Focus();
login_view_->SetStatusAreaVisible(status_area_saved_visibility_);
login_view_->OnPostponedShow();
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 79d62f2..1a731cb 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -36,7 +36,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/gfx/rect.h"
@@ -337,7 +336,7 @@ void WebUILoginView::AboutToRequestFocusFromTabTraversal(bool reverse) {
// Return the focus to the web contents.
webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
GetWidget()->Activate();
- webui_login_->web_contents()->GetView()->Focus();
+ webui_login_->web_contents()->Focus();
}
void WebUILoginView::Observe(int type,
diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc
index 107d4df..03ab906 100644
--- a/chrome/browser/devtools/devtools_file_helper.cc
+++ b/chrome/browser/devtools/devtools_file_helper.cc
@@ -29,7 +29,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_client.h"
#include "content/public/common/url_constants.h"
#include "grit/generated_resources.h"
@@ -83,7 +82,7 @@ class SelectFileDialog : public ui::SelectFileDialog::Listener,
NULL,
0,
base::FilePath::StringType(),
- platform_util::GetTopLevel(web_contents_->GetView()->GetNativeView()),
+ platform_util::GetTopLevel(web_contents_->GetNativeView()),
NULL);
}
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index 56f1a05..be64ac9 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -42,7 +42,6 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/url_constants.h"
@@ -203,7 +202,7 @@ class DefaultBindingsDelegate : public DevToolsUIBindings::Delegate {
void DefaultBindingsDelegate::ActivateWindow() {
web_contents_->GetDelegate()->ActivateContents(web_contents_);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) {
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index fb9bd67..e1e627d 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -45,7 +45,6 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_client.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/url_constants.h"
@@ -481,12 +480,12 @@ void DevToolsWindow::Show(const DevToolsToggleAction& action) {
tab_strip_model->ActivateTabAt(inspected_tab_index, true);
inspected_window->UpdateDevTools();
- web_contents_->GetView()->SetInitialFocus();
+ web_contents_->SetInitialFocus();
inspected_window->Show();
// On Aura, focusing once is not enough. Do it again.
// Note that focusing only here but not before isn't enough either. We just
// need to focus twice.
- web_contents_->GetView()->SetInitialFocus();
+ web_contents_->SetInitialFocus();
PrefsTabHelper::CreateForWebContents(web_contents_);
web_contents_->GetRenderViewHost()->SyncRendererPrefs();
@@ -505,7 +504,7 @@ void DevToolsWindow::Show(const DevToolsToggleAction& action) {
if (should_show_window) {
browser_->window()->Show();
- web_contents_->GetView()->SetInitialFocus();
+ web_contents_->SetInitialFocus();
}
DoAction(action);
@@ -864,7 +863,7 @@ bool DevToolsWindow::PreHandleGestureEvent(
void DevToolsWindow::ActivateWindow() {
if (is_docked_ && GetInspectedBrowserWindow())
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
else if (!is_docked_ && !browser_->window()->IsActive())
browser_->window()->Activate();
}
@@ -1061,7 +1060,7 @@ void DevToolsWindow::CreateDevToolsBrowser() {
browser_ = new Browser(Browser::CreateParams::CreateForDevTools(
profile_,
chrome::GetHostDesktopTypeForNativeView(
- web_contents_->GetView()->GetNativeView())));
+ web_contents_->GetNativeView())));
browser_->tab_strip_model()->AddWebContents(
web_contents_, -1, content::PAGE_TRANSITION_AUTO_TOPLEVEL,
TabStripModel::ADD_ACTIVE);
diff --git a/chrome/browser/download/download_file_picker.cc b/chrome/browser/download/download_file_picker.cc
index a2d2d3e2..b1af519 100644
--- a/chrome/browser/download/download_file_picker.cc
+++ b/chrome/browser/download/download_file_picker.cc
@@ -12,7 +12,6 @@
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -80,8 +79,7 @@ DownloadFilePicker::DownloadFilePicker(
file_type_info.include_all_files = true;
file_type_info.support_drive = true;
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()) :
- NULL;
+ platform_util::GetTopLevel(web_contents->GetNativeView()) : NULL;
select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE,
base::string16(),
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index d54141c..ddd4a85 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -24,7 +24,6 @@
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -360,7 +359,7 @@ void DownloadShelf::ShowDownload(DownloadItem* download) {
browser()->tab_strip_model()->GetActiveWebContents();
if (DownloadItemModel(download).ShouldShowDownloadStartedAnimation() &&
shelf_tab &&
- platform_util::IsVisible(shelf_tab->GetView()->GetNativeView()) &&
+ platform_util::IsVisible(shelf_tab->GetNativeView()) &&
gfx::Animation::ShouldRenderRichAnimation()) {
DownloadStartedAnimation::Show(shelf_tab);
}
diff --git a/chrome/browser/download/save_package_file_picker.cc b/chrome/browser/download/save_package_file_picker.cc
index da18db3..3a320f7 100644
--- a/chrome/browser/download/save_package_file_picker.cc
+++ b/chrome/browser/download/save_package_file_picker.cc
@@ -22,7 +22,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/save_page_type.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -211,7 +210,7 @@ SavePackageFilePicker::SavePackageFilePicker(
&file_type_info,
file_type_index,
default_extension_copy,
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()),
+ platform_util::GetTopLevel(web_contents->GetNativeView()),
NULL);
} else {
// Just use 'suggested_path_copy' instead of opening the dialog prompt.
diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc
index a090c2d..fd57543 100644
--- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc
+++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc
@@ -30,7 +30,6 @@
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/view_type_utils.h"
@@ -544,7 +543,7 @@ bool BookmarkManagerPrivateStartDragFunction::RunOnReady() {
source = ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH;
chrome::DragBookmarks(
- GetProfile(), nodes, web_contents->GetView()->GetNativeView(), source);
+ GetProfile(), nodes, web_contents->GetNativeView(), source);
return true;
} else {
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
index a8587a0..2a736b0 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -41,7 +41,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/quota_service.h"
@@ -955,7 +954,7 @@ void BookmarksIOFunction::ShowSelectFileDialog(
file_type_info.extensions.resize(1);
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("html"));
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView())
+ platform_util::GetTopLevel(web_contents->GetNativeView())
: NULL;
#if defined(OS_WIN)
if (!owning_window &&
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
index a6ff794..8398736 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
@@ -18,7 +18,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "net/base/net_util.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
@@ -131,13 +130,13 @@ bool DesktopCaptureChooseDesktopMediaFunction::RunAsync() {
Observe(web_contents);
render_view = web_contents->GetRenderViewHost();
- parent_window = web_contents->GetView()->GetTopLevelNativeWindow();
+ parent_window = web_contents->GetTopLevelNativeWindow();
} else {
origin_ = GetExtension()->url();
target_name = base::UTF8ToUTF16(GetExtension()->name());
render_view = render_view_host();
parent_window =
- GetAssociatedWebContents()->GetView()->GetTopLevelNativeWindow();
+ GetAssociatedWebContents()->GetTopLevelNativeWindow();
}
render_process_id_ = render_view->GetProcess()->GetID();
render_view_id_ = render_view->GetRoutingID();
diff --git a/chrome/browser/extensions/api/developer_private/entry_picker.cc b/chrome/browser/extensions/api/developer_private/entry_picker.cc
index f21371c..9e3b6af 100644
--- a/chrome/browser/extensions/api/developer_private/entry_picker.cc
+++ b/chrome/browser/extensions/api/developer_private/entry_picker.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/shell_dialogs/select_file_dialog.h"
namespace {
@@ -37,7 +36,7 @@ EntryPicker::EntryPicker(EntryPickerClient* client,
this, new ChromeSelectFilePolicy(web_contents));
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()) :
+ platform_util::GetTopLevel(web_contents->GetNativeView()) :
NULL;
if (g_skip_picker_for_test) {
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index c51e4fb..46f1d4e 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -61,7 +61,6 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_registry.h"
@@ -1292,8 +1291,7 @@ void DownloadsAcceptDangerFunction::PromptOrWait(int download_id, int retries) {
SendResponse(error_.empty());
return;
}
- bool visible = platform_util::IsVisible(
- web_contents->GetView()->GetNativeView());
+ bool visible = platform_util::IsVisible(web_contents->GetNativeView());
if (!visible) {
if (retries > 0) {
base::MessageLoopForUI::current()->PostDelayedTask(
@@ -1417,7 +1415,7 @@ bool DownloadsDragFunction::RunAsync() {
RecordApiFunctions(DOWNLOADS_FUNCTION_DRAG);
gfx::Image* icon = g_browser_process->icon_manager()->LookupIconFromFilepath(
download_item->GetTargetFilePath(), IconLoader::NORMAL);
- gfx::NativeView view = web_contents->GetView()->GetNativeView();
+ gfx::NativeView view = web_contents->GetNativeView();
{
// Enable nested tasks during DnD, while |DragDownload()| blocks.
base::MessageLoop::ScopedNestableTaskAllower allow(
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index 56895d7..fee90cb 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -32,7 +32,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/permissions/api_permission.h"
#include "grit/generated_resources.h"
@@ -438,7 +437,7 @@ class FileSystemChooseEntryFunction::FilePicker
select_file_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_contents));
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()) :
+ platform_util::GetTopLevel(web_contents->GetNativeView()) :
NULL;
if (g_skip_picker_for_test) {
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
index 3e7aa8d..024efde 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
@@ -42,7 +42,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
@@ -228,7 +227,7 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener,
NULL,
0,
base::FilePath::StringType(),
- platform_util::GetTopLevel(web_contents_->GetView()->GetNativeView()),
+ platform_util::GetTopLevel(web_contents_->GetNativeView()),
NULL);
}
diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability.cc b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
index c8d59ee..ae1baa4 100644
--- a/chrome/browser/extensions/api/messaging/incognito_connectability.cc
+++ b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/extension.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -79,8 +78,7 @@ bool IncognitoConnectability::Query(const Extension* extension,
IDS_EXTENSION_PROMPT_APP_CONNECT_FROM_INCOGNITO :
IDS_EXTENSION_PROMPT_EXTENSION_CONNECT_FROM_INCOGNITO;
result = chrome::ShowMessageBox(
- web_contents ? web_contents->GetView()->GetTopLevelNativeWindow()
- : NULL,
+ web_contents ? web_contents->GetTopLevelNativeWindow() : NULL,
base::string16(), // no title
l10n_util::GetStringFUTF16(template_id,
base::UTF8ToUTF16(origin.spec()),
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.cc b/chrome/browser/extensions/api/sessions/sessions_api.cc
index f0f8ddb..a484be4 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -405,7 +405,7 @@ void SessionsRestoreFunction::SetInvalidIdError(const std::string& invalid_id) {
void SessionsRestoreFunction::SetResultRestoredTab(
- const content::WebContents* contents) {
+ content::WebContents* contents) {
scoped_ptr<base::DictionaryValue> tab_value(
ExtensionTabUtil::CreateTabValue(contents, GetExtension()));
scoped_ptr<tabs::Tab> tab(tabs::Tab::FromValue(*tab_value));
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.h b/chrome/browser/extensions/api/sessions/sessions_api.h
index f30d371..da0305c 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.h
+++ b/chrome/browser/extensions/api/sessions/sessions_api.h
@@ -73,7 +73,7 @@ class SessionsRestoreFunction : public ChromeSyncExtensionFunction {
private:
void SetInvalidIdError(const std::string& invalid_id);
- void SetResultRestoredTab(const content::WebContents* contents);
+ void SetResultRestoredTab(content::WebContents* contents);
bool SetResultRestoredWindow(int window_id);
bool RestoreMostRecentlyClosed(Browser* browser);
bool RestoreLocalSession(const SessionId& session_id, Browser* browser);
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
index 66bf858..1a1445a 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -59,7 +59,7 @@ StreamsPrivateAPI::~StreamsPrivateAPI() {
void StreamsPrivateAPI::ExecuteMimeTypeHandler(
const std::string& extension_id,
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
scoped_ptr<content::StreamHandle> stream,
int64 expected_content_size) {
// Create the event's arguments value.
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.h b/chrome/browser/extensions/api/streams_private/streams_private_api.h
index fcf7245..0ac149f 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.h
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h
@@ -31,7 +31,7 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
virtual ~StreamsPrivateAPI();
void ExecuteMimeTypeHandler(const std::string& extension_id,
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
scoped_ptr<content::StreamHandle> stream,
int64 expected_content_size);
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index ae2261f..d0ca7fe 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -62,7 +62,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_function_util.h"
@@ -834,7 +833,7 @@ bool TabsQueryFunction::RunSync() {
TabStripModel* tab_strip = browser->tab_strip_model();
for (int i = 0; i < tab_strip->count(); ++i) {
- const WebContents* web_contents = tab_strip->GetWebContentsAt(i);
+ WebContents* web_contents = tab_strip->GetWebContentsAt(i);
if (index > -1 && i != index)
continue;
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.cc b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
index 4957647..4e93b40 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
@@ -203,8 +203,8 @@ void TabsEventRouter::TabCreatedAt(WebContents* contents,
}
void TabsEventRouter::TabInsertedAt(WebContents* contents,
- int index,
- bool active) {
+ int index,
+ bool active) {
// If tab is new, send created event.
int tab_id = ExtensionTabUtil::GetTabId(contents);
if (!GetTabEntry(contents)) {
@@ -472,8 +472,7 @@ void TabsEventRouter::DispatchTabUpdatedEvent(
EventRouter::Get(profile)->BroadcastEvent(event.Pass());
}
-TabsEventRouter::TabEntry* TabsEventRouter::GetTabEntry(
- const WebContents* contents) {
+TabsEventRouter::TabEntry* TabsEventRouter::GetTabEntry(WebContents* contents) {
int tab_id = ExtensionTabUtil::GetTabId(contents);
std::map<int, TabEntry>::iterator i = tab_entries_.find(tab_id);
if (tab_entries_.end() == i)
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.h b/chrome/browser/extensions/api/tabs/tabs_event_router.h
index 461786a..12ecfb7 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.h
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h
@@ -156,7 +156,7 @@ class TabsEventRouter : public TabStripModelObserver,
// Gets the TabEntry for the given |contents|. Returns TabEntry* if
// found, NULL if not.
- TabEntry* GetTabEntry(const content::WebContents* contents);
+ TabEntry* GetTabEntry(content::WebContents* contents);
std::map<int, TabEntry> tab_entries_;
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 569124f..76f5a37 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -26,7 +26,6 @@
#include "chrome/common/pref_names.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
@@ -187,7 +186,7 @@ gfx::NativeWindow NativeWindowForWebContents(content::WebContents* contents) {
if (!contents)
return NULL;
- return contents->GetView()->GetTopLevelNativeWindow();
+ return contents->GetTopLevelNativeWindow();
}
} // namespace
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 7041441..1cde659 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -27,7 +27,6 @@
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
@@ -92,13 +91,11 @@ Browser* CreateBrowser(ChromeUIThreadExtensionFunction* function,
std::string* error) {
content::WebContents* web_contents = function->GetAssociatedWebContents();
DCHECK(web_contents);
- DCHECK(web_contents->GetView());
- DCHECK(web_contents->GetView()->GetNativeView());
+ DCHECK(web_contents->GetNativeView());
DCHECK(!chrome::FindBrowserWithWebContents(web_contents));
chrome::HostDesktopType desktop_type =
- chrome::GetHostDesktopTypeForNativeView(
- web_contents->GetView()->GetNativeView());
+ chrome::GetHostDesktopTypeForNativeView(web_contents->GetNativeView());
Browser::CreateParams params(
Browser::TYPE_TABBED, function->GetProfile(), desktop_type);
Browser* browser = new Browser(params);
@@ -247,7 +244,7 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
tab_strip->SetOpenerOfWebContentsAt(new_index, opener);
if (active)
- navigate_params.target_contents->GetView()->SetInitialFocus();
+ navigate_params.target_contents->SetInitialFocus();
// Return data about the newly created tab.
return ExtensionTabUtil::CreateTabValue(navigate_params.target_contents,
@@ -289,7 +286,7 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel(
return -1;
}
-int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
+int ExtensionTabUtil::GetTabId(WebContents* web_contents) {
return SessionID::IdForTab(web_contents);
}
@@ -302,7 +299,7 @@ int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
}
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index,
const Extension* extension) {
@@ -335,7 +332,7 @@ base::ListValue* ExtensionTabUtil::CreateTabList(
}
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index) {
// If we have a matching AppWindow with a controller, get the tab value
@@ -364,9 +361,9 @@ base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
result->SetBoolean(keys::kIncognitoKey,
contents->GetBrowserContext()->IsOffTheRecord());
result->SetInteger(keys::kWidthKey,
- contents->GetView()->GetContainerSize().width());
+ contents->GetContainerBounds().size().width());
result->SetInteger(keys::kHeightKey,
- contents->GetView()->GetContainerSize().height());
+ contents->GetContainerBounds().size().height());
// Privacy-sensitive fields: these should be stripped off by
// ScrubTabValueForExtension if the extension should not see them.
@@ -388,7 +385,7 @@ base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
}
void ExtensionTabUtil::ScrubTabValueForExtension(
- const WebContents* contents,
+ WebContents* contents,
const Extension* extension,
base::DictionaryValue* tab_info) {
bool has_permission =
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h
index b997aa3..c7e201f 100644
--- a/chrome/browser/extensions/extension_tab_util.h
+++ b/chrome/browser/extensions/extension_tab_util.h
@@ -60,7 +60,7 @@ class ExtensionTabUtil {
static int GetWindowId(const Browser* browser);
static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model);
- static int GetTabId(const content::WebContents* web_contents);
+ static int GetTabId(content::WebContents* web_contents);
static std::string GetTabStatusText(bool is_loading);
static int GetWindowIdOfTab(const content::WebContents* web_contents);
static base::ListValue* CreateTabList(const Browser* browser,
@@ -75,12 +75,12 @@ class ExtensionTabUtil {
// permissions of the extension, the object may or may not include sensitive
// data such as the tab's URL.
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
const Extension* extension) {
return CreateTabValue(web_contents, NULL, -1, extension);
}
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
TabStripModel* tab_strip,
int tab_index,
const Extension* extension);
@@ -88,18 +88,18 @@ class ExtensionTabUtil {
// Creates a Tab object but performs no extension permissions checks; the
// returned object will contain privacy-sensitive data.
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents) {
+ content::WebContents* web_contents) {
return CreateTabValue(web_contents, NULL, -1);
}
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
TabStripModel* tab_strip,
int tab_index);
// Removes any privacy-sensitive fields from a Tab object if appropriate,
// given the permissions of the extension and the tab in question. The
// tab_info object is modified in place.
- static void ScrubTabValueForExtension(const content::WebContents* contents,
+ static void ScrubTabValueForExtension(content::WebContents* contents,
const Extension* extension,
base::DictionaryValue* tab_info);
diff --git a/chrome/browser/extensions/extension_tab_util_android.cc b/chrome/browser/extensions/extension_tab_util_android.cc
index da7be3f..9d0abe8 100644
--- a/chrome/browser/extensions/extension_tab_util_android.cc
+++ b/chrome/browser/extensions/extension_tab_util_android.cc
@@ -26,7 +26,7 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel(
}
// static
-int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
+int ExtensionTabUtil::GetTabId(WebContents* web_contents) {
return SessionID::IdForTab(web_contents);
}
@@ -38,7 +38,7 @@ int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
// static
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index,
const Extension* extension) {
@@ -55,7 +55,7 @@ base::ListValue* ExtensionTabUtil::CreateTabList(const Browser* browser,
// static
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index) {
NOTIMPLEMENTED();
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc
index 3bdad60..b5ace6b 100644
--- a/chrome/browser/extensions/extension_view_host.cc
+++ b/chrome/browser/extensions/extension_view_host.cc
@@ -15,7 +15,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/runtime_data.h"
#include "extensions/common/extension_messages.h"
@@ -276,7 +275,7 @@ ExtensionViewHost::GetWebContentsModalDialogHost() {
}
bool ExtensionViewHost::IsWebContentsVisible(WebContents* web_contents) {
- return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
+ return platform_util::IsVisible(web_contents->GetNativeView());
}
gfx::NativeView ExtensionViewHost::GetHostView() const {
@@ -286,7 +285,7 @@ gfx::NativeView ExtensionViewHost::GetHostView() const {
gfx::Point ExtensionViewHost::GetDialogPosition(const gfx::Size& size) {
if (!GetVisibleWebContents())
return gfx::Point();
- gfx::Rect bounds = GetVisibleWebContents()->GetView()->GetViewBounds();
+ gfx::Rect bounds = GetVisibleWebContents()->GetViewBounds();
return gfx::Point(
std::max(0, (bounds.width() - size.width()) / 2),
std::max(0, (bounds.height() - size.height()) / 2));
@@ -295,7 +294,7 @@ gfx::Point ExtensionViewHost::GetDialogPosition(const gfx::Size& size) {
gfx::Size ExtensionViewHost::GetMaximumDialogSize() {
if (!GetVisibleWebContents())
return gfx::Size();
- return GetVisibleWebContents()->GetView()->GetViewBounds().size();
+ return GetVisibleWebContents()->GetViewBounds().size();
}
void ExtensionViewHost::AddObserver(
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 76bed7b..fda6175 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -51,7 +51,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/frame_navigate_params.h"
#include "extensions/browser/extension_error.h"
#include "extensions/browser/extension_registry.h"
@@ -342,7 +341,7 @@ void TabHelper::OnDidGetApplicationInfo(int32 page_id,
switch (pending_web_app_action_) {
case CREATE_SHORTCUT: {
chrome::ShowCreateWebAppShortcutsDialog(
- web_contents()->GetView()->GetTopLevelNativeWindow(),
+ web_contents()->GetTopLevelNativeWindow(),
web_contents());
break;
}
diff --git a/chrome/browser/managed_mode/managed_mode_navigation_observer.cc b/chrome/browser/managed_mode/managed_mode_navigation_observer.cc
index 12cb5b2..0e27dc8 100644
--- a/chrome/browser/managed_mode/managed_mode_navigation_observer.cc
+++ b/chrome/browser/managed_mode/managed_mode_navigation_observer.cc
@@ -26,7 +26,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -63,8 +62,7 @@ void GoBackToSafety(content::WebContents* web_contents) {
// If we can't go back (because we opened a new tab), try to close the tab.
// If this is the last tab on this desktop, open a new window.
chrome::HostDesktopType host_desktop_type =
- chrome::GetHostDesktopTypeForNativeView(
- web_contents->GetView()->GetNativeView());
+ chrome::GetHostDesktopTypeForNativeView(web_contents->GetNativeView());
const BrowserList* browser_list = BrowserList::GetInstance(host_desktop_type);
if (browser_list->size() == 1) {
Browser* browser = browser_list->get(0);
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller.cc b/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
index d815e1d..8ad59e8 100644
--- a/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
@@ -18,7 +18,6 @@
#include "components/storage_monitor/storage_info.h"
#include "components/storage_monitor/storage_monitor.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/common/extension.h"
#include "extensions/common/permissions/media_galleries_permission.h"
@@ -207,7 +206,7 @@ void MediaGalleriesDialogController::OnAddFolderClicked() {
NULL,
0,
base::FilePath::StringType(),
- web_contents_->GetView()->GetTopLevelNativeWindow(),
+ web_contents_->GetTopLevelNativeWindow(),
NULL);
}
diff --git a/chrome/browser/mouseleave_browsertest.cc b/chrome/browser/mouseleave_browsertest.cc
index d909f1a..664f6b6 100644
--- a/chrome/browser/mouseleave_browsertest.cc
+++ b/chrome/browser/mouseleave_browsertest.cc
@@ -10,7 +10,6 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/browser_test_utils.h"
#include "ui/base/test/ui_controls.h"
@@ -26,8 +25,7 @@ class MouseLeaveTest : public InProcessBrowserTest {
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
- gfx::Rect tab_view_bounds;
- tab->GetView()->GetContainerBounds(&tab_view_bounds);
+ gfx::Rect tab_view_bounds = tab->GetContainerBounds();
gfx::Point in_content_point(
tab_view_bounds.x() + tab_view_bounds.width() / 2,
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 06bd024..0dbeefb 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -28,8 +28,6 @@
#include "components/password_manager/core/common/password_manager_switches.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
-#include "ipc/ipc_message_macros.h"
#if defined(OS_ANDROID)
#include "chrome/browser/android/password_authentication_manager.h"
@@ -263,8 +261,7 @@ bool ChromePasswordManagerClient::OnMessageReceived(
gfx::RectF ChromePasswordManagerClient::GetBoundsInScreenSpace(
const gfx::RectF& bounds) {
- gfx::Rect client_area;
- web_contents()->GetView()->GetContainerBounds(&client_area);
+ gfx::Rect client_area = web_contents()->GetContainerBounds();
return bounds + client_area.OffsetFromOrigin();
}
@@ -287,7 +284,7 @@ void ChromePasswordManagerClient::ShowPasswordGenerationPopup(
driver_.GetPasswordManager(),
observer_,
web_contents(),
- web_contents()->GetView()->GetNativeView());
+ web_contents()->GetNativeView());
popup_controller_->Show(true /* display_password */);
#endif // #if defined(USE_AURA)
}
@@ -308,7 +305,7 @@ void ChromePasswordManagerClient::ShowPasswordEditingPopup(
driver_.GetPasswordManager(),
observer_,
web_contents(),
- web_contents()->GetView()->GetNativeView());
+ web_contents()->GetNativeView());
popup_controller_->Show(false /* display_password */);
#endif // #if defined(USE_AURA)
}
diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
index c838046..4312062 100644
--- a/chrome/browser/plugins/plugin_observer.cc
+++ b/chrome/browser/plugins/plugin_observer.cc
@@ -29,7 +29,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/webplugininfo.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -272,7 +271,7 @@ void PluginObserver::RenderFrameCreated(
// where we have instances on both Ash and Native desktop.
// We will do both tests. Both have some factor of unreliability.
- aura::Window* window = web_contents()->GetView()->GetNativeView();
+ aura::Window* window = web_contents()->GetNativeView();
if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH ||
chrome::GetHostDesktopTypeForNativeView(window) ==
chrome::HOST_DESKTOP_TYPE_ASH) {
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 38a16a1..25b6c0e 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -37,7 +37,6 @@
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
#include "ui/gfx/rect.h"
@@ -187,7 +186,7 @@ class PrerenderContents::WebContentsDelegateImpl
}
virtual gfx::Size GetSizeForNewRenderView(
- const WebContents* web_contents) const OVERRIDE {
+ WebContents* web_contents) const OVERRIDE {
// Have to set the size of the RenderView on initialization to be sure it is
// set before the RenderView is hidden on all platforms (esp. Android).
return prerender_contents_->size_;
diff --git a/chrome/browser/prerender/prerender_local_predictor.cc b/chrome/browser/prerender/prerender_local_predictor.cc
index 706f375..952f2a2 100644
--- a/chrome/browser/prerender/prerender_local_predictor.cc
+++ b/chrome/browser/prerender/prerender_local_predictor.cc
@@ -36,7 +36,6 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/page_transition_types.h"
#include "crypto/secure_hash.h"
#include "grit/browser_resources.h"
@@ -600,8 +599,7 @@ void PrerenderLocalPredictor::OnLookupURL(
info->session_storage_namespace_ =
source_web_contents->GetController().GetDefaultSessionStorageNamespace();
- gfx::Rect container_bounds;
- source_web_contents->GetView()->GetContainerBounds(&container_bounds);
+ gfx::Rect container_bounds = source_web_contents->GetContainerBounds();
info->size_.reset(new gfx::Size(container_bounds.size()));
RecordEvent(EVENT_PRERENDER_URL_LOOKUP_SUCCESS);
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index d98a175..aa615b1 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -60,7 +60,6 @@
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 740664c..2a44102 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -36,7 +36,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/common/frame_navigate_params.h"
#include "webkit/common/webpreferences.h"
@@ -465,9 +464,8 @@ void CloudPrintFlowHandler::HandleSetPageParameters(
}
void CloudPrintFlowHandler::StoreDialogClientSize() const {
- if (web_ui() && web_ui()->GetWebContents() &&
- web_ui()->GetWebContents()->GetView()) {
- gfx::Size size = web_ui()->GetWebContents()->GetView()->GetContainerSize();
+ if (web_ui() && web_ui()->GetWebContents()) {
+ gfx::Size size = web_ui()->GetWebContents()->GetContainerBounds().size();
Profile* profile = Profile::FromWebUI(web_ui());
profile->GetPrefs()->SetInteger(prefs::kCloudPrintDialogWidth,
size.width());
diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc
index 27d365f..3c8c24f 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller.cc
@@ -40,7 +40,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/webplugininfo.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
@@ -138,7 +137,7 @@ void PrintPreviewDialogDelegate::GetDialogSize(gfx::Size* size) const {
size->SetToMax(host->GetMaximumDialogSize());
size->Enlarge(-2 * kBorder, -kBorder);
} else {
- size->SetToMax(initiator_->GetView()->GetContainerSize());
+ size->SetToMax(initiator_->GetContainerBounds().size());
size->Enlarge(-2 * kBorder, -2 * kBorder);
}
diff --git a/chrome/browser/printing/print_preview_test.cc b/chrome/browser/printing/print_preview_test.cc
index ad93a33..4ce8fa4 100644
--- a/chrome/browser/printing/print_preview_test.cc
+++ b/chrome/browser/printing/print_preview_test.cc
@@ -13,7 +13,6 @@
#include "components/web_modal/web_contents_modal_dialog_host.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
using web_modal::WebContentsModalDialogHost;
using web_modal::ModalDialogHostObserver;
@@ -38,7 +37,7 @@ class PrintPreviewTestBrowserWindow
// The web contents modal dialog must be parented to *something*; use the
// WebContents window since there is no true browser window for unit tests.
virtual gfx::NativeView GetHostView() const OVERRIDE {
- return FindBrowser()->tab_strip_model()->GetActiveWebContents()->GetView()->
+ return FindBrowser()->tab_strip_model()->GetActiveWebContents()->
GetNativeView();
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index cfadc09..53598aa 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -26,7 +26,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "printing/metafile_impl.h"
#include "printing/printed_document.h"
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index fb6e58b..421cf49 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -30,7 +30,6 @@
#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "chrome/browser/printing/print_dialog_cloud.h"
-#include "content/public/browser/web_contents_view.h"
#endif
#if defined(OS_ANDROID)
@@ -242,7 +241,7 @@ void PrintingMessageFilter::CreatePrintDialogForFile(
return;
print_dialog_cloud::CreatePrintDialogForFile(
wc->GetBrowserContext(),
- wc->GetView()->GetTopLevelNativeWindow(),
+ wc->GetTopLevelNativeWindow(),
path,
wc->GetTitle(),
base::string16(),
diff --git a/chrome/browser/printing/printing_ui_web_contents_observer.cc b/chrome/browser/printing/printing_ui_web_contents_observer.cc
index 03a09f7..311d621 100644
--- a/chrome/browser/printing/printing_ui_web_contents_observer.cc
+++ b/chrome/browser/printing/printing_ui_web_contents_observer.cc
@@ -6,7 +6,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
PrintingUIWebContentsObserver::PrintingUIWebContentsObserver(
content::WebContents* web_contents)
@@ -16,5 +15,5 @@ PrintingUIWebContentsObserver::PrintingUIWebContentsObserver(
gfx::NativeView PrintingUIWebContentsObserver::GetParentView() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- return web_contents() ? web_contents()->GetView()->GetNativeView() : NULL;
+ return web_contents() ? web_contents()->GetNativeView() : NULL;
}
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
index 99c25fe..b09b518 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
@@ -21,7 +21,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/browser_test_utils.h"
#include "third_party/WebKit/public/web/WebContextMenuData.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -101,10 +100,9 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest,
mouse_event.button = blink::WebMouseEvent::ButtonRight;
mouse_event.x = 15;
mouse_event.y = 15;
- gfx::Rect offset;
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
- tab->GetView()->GetContainerBounds(&offset);
+ gfx::Rect offset = tab->GetContainerBounds();
mouse_event.globalX = 15 + offset.x();
mouse_event.globalY = 15 + offset.y();
mouse_event.clickCount = 1;
diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
index dff5965..bbce83d 100644
--- a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
+++ b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
@@ -25,7 +25,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "extensions/browser/view_type_utils.h"
#include "grit/generated_resources.h"
@@ -300,7 +299,7 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) {
gfx::Rect rect = rvh->GetView()->GetViewBounds();
chrome::ShowConfirmBubble(
#if defined(TOOLKIT_VIEWS)
- proxy_->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
+ proxy_->GetWebContents()->GetTopLevelNativeWindow(),
#else
rvh->GetView()->GetNativeView(),
#endif
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
index a9f1f38..d0e3a34 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -34,7 +34,6 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/test_browser_thread.h"
#include "content/public/test/test_utils.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 228873b..da5a3ca 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -17,14 +17,12 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/web_contents_tester.h"
using content::InterstitialPage;
using content::NavigationEntry;
using content::WebContents;
using content::WebContentsTester;
-using content::WebContentsView;
static const char* kGoogleURL = "http://www.google.com/";
static const char* kGoodURL = "http://www.goodguys.com/";
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 3bbea4d..ab6d68d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -39,7 +39,6 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "net/cookies/cookie_store.h"
#include "sql/connection.h"
#include "sql/statement.h"
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index cf069bb..fcd601a 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -49,7 +49,6 @@
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension_set.h"
#include "net/base/network_change_notifier.h"
@@ -1074,8 +1073,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
// TODO(jcampan): http://crbug.com/8123 we should not need to set the
// initial focus explicitly.
- browser->tab_strip_model()->GetActiveWebContents()->
- GetView()->SetInitialFocus();
+ browser->tab_strip_model()->GetActiveWebContents()->SetInitialFocus();
if (!browser_shown_) {
browser_shown_ = true;
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc
index b5b1747..029200b 100644
--- a/chrome/browser/sessions/session_restore_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -42,7 +42,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/test/browser_test_utils.h"
@@ -215,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoredTabsShouldHaveRootWindow) {
// Check the restored tabs have a root window.
for (int i = 0; i < tabs; ++i) {
content::WebContents* contents = tab_strip_model->GetWebContentsAt(i);
- gfx::NativeView window = contents->GetView()->GetNativeView();
+ gfx::NativeView window = contents->GetNativeView();
bool tab_has_root_window = !!window->GetRootWindow();
EXPECT_TRUE(tab_has_root_window);
}
diff --git a/chrome/browser/ssl/ssl_tab_helper.cc b/chrome/browser/ssl/ssl_tab_helper.cc
index a5be317..a1d5a0b 100644
--- a/chrome/browser/ssl/ssl_tab_helper.cc
+++ b/chrome/browser/ssl/ssl_tab_helper.cc
@@ -28,7 +28,6 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "net/base/net_errors.h"
@@ -123,7 +122,7 @@ bool SSLCertResultInfoBarDelegate::Accept() {
content::WebContents* web_contents =
InfoBarService::WebContentsFromInfoBar(infobar());
ShowCertificateViewer(web_contents,
- web_contents->GetView()->GetTopLevelNativeWindow(),
+ web_contents->GetTopLevelNativeWindow(),
cert_.get());
return false; // Hiding the infobar just as the dialog opens looks weird.
}
diff --git a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
index c75c820..cc97dcc 100644
--- a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
+++ b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/ui/android/context_menu_helper.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/common/context_menu_params.h"
diff --git a/chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.cc
index 68fabac..a037376 100644
--- a/chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.cc
@@ -7,7 +7,6 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/text_elider.h"
#if defined(USE_AURA)
@@ -87,8 +86,7 @@ JavaScriptAppModalDialog::~JavaScriptAppModalDialog() {
}
NativeAppModalDialog* JavaScriptAppModalDialog::CreateNativeDialog() {
- gfx::NativeWindow parent_window =
- web_contents()->GetView()->GetTopLevelNativeWindow();
+ gfx::NativeWindow parent_window = web_contents()->GetTopLevelNativeWindow();
#if defined(USE_AURA)
if (!parent_window->GetRootWindow()) {
diff --git a/chrome/browser/ui/apps/chrome_app_window_delegate.cc b/chrome/browser/ui/apps/chrome_app_window_delegate.cc
index b0ccf7e..3a72af3e 100644
--- a/chrome/browser/ui/apps/chrome_app_window_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_window_delegate.cc
@@ -22,7 +22,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/constants.h"
#if defined(USE_ASH)
@@ -245,5 +244,5 @@ void ChromeAppWindowDelegate::SetWebContentsBlocked(
bool ChromeAppWindowDelegate::IsWebContentsVisible(
content::WebContents* web_contents) {
- return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
+ return platform_util::IsVisible(web_contents->GetNativeView());
}
diff --git a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
index 8c5dfb4..356afd1 100644
--- a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
+++ b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
@@ -14,7 +14,6 @@
#include "chrome/common/extensions/api/virtual_keyboard_private.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_system.h"
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
index acf1be1..81916fe 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_system.h"
ChromeNewWindowDelegateChromeos::ChromeNewWindowDelegateChromeos() {}
@@ -64,7 +63,7 @@ void ChromeNewWindowDelegateChromeos::OpenCrosh() {
false));
browser->window()->Show();
browser->window()->Activate();
- page->GetView()->Focus();
+ page->Focus();
}
void ChromeNewWindowDelegateChromeos::ShowKeyboardOverlay() {
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index 4c8af36..ec41f89 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -73,7 +73,6 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/url_constants.h"
#include "grit/chromium_strings.h"
#include "grit/component_scaled_resources.h"
@@ -257,13 +256,12 @@ void GetBillingInfoFromOutputs(const FieldValueMap& output,
// window might be a browser window for a Chrome tab, or it might be an app
// window for a platform app.
ui::BaseWindow* GetBaseWindowForWebContents(
- const content::WebContents* web_contents) {
+ content::WebContents* web_contents) {
Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
if (browser)
return browser->window();
- gfx::NativeWindow native_window =
- web_contents->GetView()->GetTopLevelNativeWindow();
+ gfx::NativeWindow native_window = web_contents->GetTopLevelNativeWindow();
apps::AppWindow* app_window =
apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile(
native_window);
@@ -1442,7 +1440,7 @@ gfx::Image AutofillDialogControllerImpl::GetGeneratedCardImage(
const int kCardHeightPx = 190;
const gfx::Size size(kCardWidthPx, kCardHeightPx);
ui::ScaleFactor scale_factor = ui::GetScaleFactorForNativeView(
- web_contents()->GetView()->GetNativeView());
+ web_contents()->GetNativeView());
gfx::Canvas canvas(size, ui::GetImageScale(scale_factor), false);
gfx::Rect display_rect(size);
@@ -2850,7 +2848,7 @@ void AutofillDialogControllerImpl::LoadRiskFingerprintData() {
g_browser_process->local_state()->GetInt64(::prefs::kInstallDate));
risk::GetFingerprint(
- obfuscated_gaia_id, window_bounds, *web_contents(),
+ obfuscated_gaia_id, window_bounds, web_contents(),
chrome::VersionInfo().Version(), charset, accept_languages, install_time,
g_browser_process->GetApplicationLocale(), GetUserAgent(),
base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData,
diff --git a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
index 23ef6d0..2b9fccc 100644
--- a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
+++ b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
@@ -24,7 +24,6 @@
#include "components/autofill/content/common/autofill_messages.h"
#include "components/autofill/core/common/autofill_pref_names.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/rect.h"
#if defined(OS_ANDROID)
@@ -123,8 +122,7 @@ void TabAutofillManagerDelegate::ShowAutofillPopup(
const std::vector<int>& identifiers,
base::WeakPtr<AutofillPopupDelegate> delegate) {
// Convert element_bounds to be in screen space.
- gfx::Rect client_area;
- web_contents_->GetView()->GetContainerBounds(&client_area);
+ gfx::Rect client_area = web_contents_->GetContainerBounds();
gfx::RectF element_bounds_in_screen_space =
element_bounds + client_area.OffsetFromOrigin();
@@ -133,7 +131,7 @@ void TabAutofillManagerDelegate::ShowAutofillPopup(
popup_controller_,
delegate,
web_contents(),
- web_contents()->GetView()->GetNativeView(),
+ web_contents()->GetNativeView(),
element_bounds_in_screen_space,
text_direction);
diff --git a/chrome/browser/ui/blocked_content/blocked_window_params.cc b/chrome/browser/ui/blocked_content/blocked_window_params.cc
index 69fdaea..f3641a2 100644
--- a/chrome/browser/ui/blocked_content/blocked_window_params.cc
+++ b/chrome/browser/ui/blocked_content/blocked_window_params.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#include "url/gurl.h"
@@ -46,7 +45,7 @@ chrome::NavigateParams BlockedWindowParams::CreateNavigateParams(
nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
nav_params.user_gesture = user_gesture_;
nav_params.should_set_opener = !opener_suppressed_;
- web_contents->GetView()->GetContainerBounds(&nav_params.window_bounds);
+ nav_params.window_bounds = web_contents->GetContainerBounds();
if (features_.xSet)
nav_params.window_bounds.set_x(features_.x);
if (features_.ySet)
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index 26f4e14..5b275b1 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -34,7 +34,6 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
@@ -388,7 +387,7 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, MAYBE_WindowFeatures) {
DontCheckTitle);
// Check that the new popup has (roughly) the requested size.
- gfx::Size window_size = popup->GetView()->GetContainerSize();
+ gfx::Size window_size = popup->GetContainerBounds().size();
EXPECT_TRUE(349 <= window_size.width() && window_size.width() <= 351);
EXPECT_TRUE(249 <= window_size.height() && window_size.height() <= 251);
}
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
index d2c3bf3..01953d5 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
@@ -18,7 +18,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#if defined(OS_ANDROID)
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 78dc3cc..1411716 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -169,7 +169,6 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/page_zoom.h"
#include "content/public/common/renderer_preferences.h"
@@ -880,7 +879,7 @@ void Browser::UpdateUIForNavigationInTab(WebContents* contents,
ScheduleUIUpdate(contents, content::INVALIDATE_TYPE_URL);
if (contents_is_selected)
- contents->GetView()->SetInitialFocus();
+ contents->SetInitialFocus();
}
///////////////////////////////////////////////////////////////////////////////
@@ -1717,12 +1716,11 @@ bool Browser::RequestPpapiBrokerPermission(
return true;
}
-gfx::Size Browser::GetSizeForNewRenderView(
- const WebContents* web_contents) const {
+gfx::Size Browser::GetSizeForNewRenderView(WebContents* web_contents) const {
// When navigating away from NTP with unpinned bookmark bar, the bookmark bar
// would disappear on non-NTP pages, resulting in a bigger size for the new
// render view.
- gfx::Size size = web_contents->GetView()->GetContainerSize();
+ gfx::Size size = web_contents->GetContainerBounds().size();
// Don't change render view size if bookmark bar is currently not detached,
// or there's no pending entry, or navigating to a NTP page.
if (size.IsEmpty() || bookmark_bar_state_ != BookmarkBar::DETACHED)
@@ -1822,7 +1820,7 @@ void Browser::SetWebContentsBlocked(content::WebContents* web_contents,
}
tab_strip_model_->SetTabBlocked(index, blocked);
if (!blocked && tab_strip_model_->GetActiveWebContents() == web_contents)
- web_contents->GetView()->Focus();
+ web_contents->Focus();
}
web_modal::WebContentsModalDialogHost*
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index efc35f1..7172f5c 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -642,7 +642,7 @@ class Browser : public TabStripModelObserver,
const base::FilePath& plugin_path,
const base::Callback<void(bool)>& callback) OVERRIDE;
virtual gfx::Size GetSizeForNewRenderView(
- const content::WebContents* web_contents) const OVERRIDE;
+ content::WebContents* web_contents) const OVERRIDE;
// Overridden from CoreTabHelperDelegate:
// Note that the caller is responsible for deleting |old_contents|.
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 64322fe..ccfe5fa 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -70,7 +70,6 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/renderer_preferences.h"
@@ -313,7 +312,7 @@ class RenderViewSizeObserver : public content::WebContentsObserver {
render_view_sizes_[rvh].rwhv_commit_size =
web_contents()->GetRenderWidgetHostView()->GetViewBounds().size();
render_view_sizes_[rvh].wcv_commit_size =
- web_contents()->GetView()->GetContainerSize();
+ web_contents()->GetContainerBounds().size();
}
private:
@@ -2602,7 +2601,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) {
const int height_inset =
browser()->window()->GetRenderViewHeightInsetWithDetachedBookmarkBar();
const gfx::Size initial_wcv_size =
- web_contents->GetView()->GetContainerSize();
+ web_contents->GetContainerBounds().size();
RenderViewSizeObserver observer(web_contents, browser()->window());
// Navigate to a non-NTP page, without resizing WebContentsView.
@@ -2638,9 +2637,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) {
#if defined(OS_MACOSX)
EXPECT_EQ(gfx::Size(wcv_commit_size0.width(),
wcv_commit_size0.height() + height_inset),
- web_contents->GetView()->GetContainerSize());
+ web_contents->GetContainerBounds().size());
#else
- EXPECT_EQ(wcv_commit_size0, web_contents->GetView()->GetContainerSize());
+ EXPECT_EQ(wcv_commit_size0, web_contents->GetContainerBounds().size());
#endif
// Navigate to another non-NTP page, without resizing WebContentsView.
@@ -2657,7 +2656,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) {
EXPECT_EQ(rwhv_create_size1, rwhv_commit_size1);
EXPECT_EQ(rwhv_commit_size1,
web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
- EXPECT_EQ(wcv_commit_size1, web_contents->GetView()->GetContainerSize());
+ EXPECT_EQ(wcv_commit_size1, web_contents->GetContainerBounds().size());
// Navigate from NTP to a non-NTP page, resizing WebContentsView while
// navigation entry is pending.
@@ -2707,5 +2706,5 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) {
wcv_resize_insets.height() + height_inset);
EXPECT_EQ(exp_final_size,
web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
- EXPECT_EQ(exp_final_size, web_contents->GetView()->GetContainerSize());
+ EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
}
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 34db678..f24bec6 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -71,7 +71,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
@@ -232,7 +231,7 @@ void ReloadInternal(Browser* browser,
WebContents* new_tab = GetTabAndRevertIfNecessary(browser, disposition);
new_tab->UserGestureDone();
if (!new_tab->FocusLocationBarByDefault())
- new_tab->GetView()->Focus();
+ new_tab->Focus();
if (ignore_cache)
new_tab->GetController().ReloadIgnoringCache(true);
else
@@ -555,8 +554,7 @@ void NewTab(Browser* browser) {
if (browser->is_type_tabbed()) {
AddTabAt(browser, GURL(), -1, true);
- browser->tab_strip_model()->GetActiveWebContents()->GetView()->
- RestoreFocus();
+ browser->tab_strip_model()->GetActiveWebContents()->RestoreFocus();
} else {
ScopedTabbedBrowserDisplayer displayer(browser->profile(),
browser->host_desktop_type());
@@ -566,7 +564,7 @@ void NewTab(Browser* browser) {
// The call to AddBlankTabAt above did not set the focus to the tab as its
// window was not active, so we have to do it explicitly.
// See http://crbug.com/6380.
- b->tab_strip_model()->GetActiveWebContents()->GetView()->RestoreFocus();
+ b->tab_strip_model()->GetActiveWebContents()->RestoreFocus();
}
}
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 4d1d1c3..7c95050 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -33,7 +33,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -287,7 +286,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) {
// Activate the location bar or the page.
if (kFocusPage[i][j]) {
- browser()->tab_strip_model()->GetWebContentsAt(j)->GetView()->Focus();
+ browser()->tab_strip_model()->GetWebContentsAt(j)->Focus();
} else {
chrome::FocusLocationBar(browser());
}
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index 7bac258..d1d8e92 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -25,7 +25,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
using base::UserMetricsAction;
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 2d65644..39cf2b5 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -39,7 +39,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -340,7 +339,7 @@ content::WebContents* CreateTargetContents(const chrome::NavigateParams& params,
tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url));
if (params.source_contents) {
create_params.initial_size =
- params.source_contents->GetView()->GetContainerSize();
+ params.source_contents->GetContainerBounds().size();
if (params.should_set_opener)
create_params.opener = params.source_contents;
}
@@ -661,7 +660,7 @@ void Navigate(NavigateParams* params) {
(params->disposition == NEW_FOREGROUND_TAB ||
params->disposition == NEW_WINDOW) &&
(params->tabstrip_add_types & TabStripModel::ADD_INHERIT_OPENER))
- params->source_contents->GetView()->Focus();
+ params->source_contents->Focus();
if (params->source_contents == params->target_contents ||
(swapped_in_prerender && params->disposition == CURRENT_TAB)) {
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 9a8e237..4af97b9 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
+#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
@@ -26,8 +27,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
-#include "ipc/ipc_message.h"
using content::WebContents;
@@ -131,7 +130,7 @@ WebContents* BrowserNavigatorTest::CreateWebContents() {
browser()->tab_strip_model()->GetActiveWebContents();
if (base_web_contents) {
create_params.initial_size =
- base_web_contents->GetView()->GetContainerSize();
+ base_web_contents->GetContainerBounds().size();
}
return WebContents::Create(create_params);
}
@@ -736,7 +735,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_TargetContents_Popup) {
// All platforms should respect size however provided width > 400 (Mac has a
// minimum window width of 400).
EXPECT_EQ(p.window_bounds.size(),
- p.target_contents->GetView()->GetContainerSize());
+ p.target_contents->GetContainerBounds().size());
// We should have two windows, the new popup and the browser() provided by the
// framework.
diff --git a/chrome/browser/ui/browser_tabrestore.cc b/chrome/browser/ui/browser_tabrestore.cc
index 38a9a93..abe591c 100644
--- a/chrome/browser/ui/browser_tabrestore.cc
+++ b/chrome/browser/ui/browser_tabrestore.cc
@@ -17,7 +17,6 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
using content::WebContents;
using content::NavigationController;
@@ -62,7 +61,7 @@ WebContents* CreateRestoredTab(
browser->tab_strip_model()->GetActiveWebContents();
if (base_web_contents) {
create_params.initial_size =
- base_web_contents->GetView()->GetContainerSize();
+ base_web_contents->GetContainerBounds().size();
}
WebContents* web_contents = content::WebContents::CreateWithSessionStorage(
create_params,
diff --git a/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.cc b/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.cc
index da6396e..33fd605 100644
--- a/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.cc
+++ b/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.cc
@@ -6,7 +6,6 @@
#include "chrome/browser/platform_util.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
ChromeWebModalDialogManagerDelegate::ChromeWebModalDialogManagerDelegate() {
}
@@ -16,5 +15,5 @@ ChromeWebModalDialogManagerDelegate::~ChromeWebModalDialogManagerDelegate() {
bool ChromeWebModalDialogManagerDelegate::IsWebContentsVisible(
content::WebContents* web_contents) {
- return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
+ return platform_util::IsVisible(web_contents->GetNativeView());
}
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index f91c580..ecd390e 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -18,7 +18,6 @@
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/extension.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/skia_util.h"
@@ -349,7 +348,7 @@ NativeAppWindowCocoa::NativeAppWindowCocoa(
window_controller_.reset(
[[NativeAppWindowController alloc] initWithWindow:window.release()]);
- NSView* view = WebContents()->GetView()->GetNativeView();
+ NSView* view = WebContents()->GetNativeView();
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
InstallView();
@@ -387,7 +386,7 @@ NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const {
}
void NativeAppWindowCocoa::InstallView() {
- NSView* view = WebContents()->GetView()->GetNativeView();
+ NSView* view = WebContents()->GetNativeView();
if (has_frame_) {
[view setFrame:[[window() contentView] bounds]];
[[window() contentView] addSubview:view];
@@ -420,7 +419,7 @@ void NativeAppWindowCocoa::InstallView() {
}
void NativeAppWindowCocoa::UninstallView() {
- NSView* view = WebContents()->GetView()->GetNativeView();
+ NSView* view = WebContents()->GetNativeView();
[view removeFromSuperview];
}
@@ -666,7 +665,7 @@ void NativeAppWindowCocoa::UpdateDraggableRegionViews() {
// All ControlRegionViews should be added as children of the WebContentsView,
// because WebContentsView will be removed and re-added when entering and
// leaving fullscreen mode.
- NSView* webView = WebContents()->GetView()->GetNativeView();
+ NSView* webView = WebContents()->GetNativeView();
NSInteger webViewWidth = NSWidth([webView bounds]);
NSInteger webViewHeight = NSHeight([webView bounds]);
@@ -716,7 +715,7 @@ bool NativeAppWindowCocoa::IsAlwaysOnTop() const {
void NativeAppWindowCocoa::RenderViewCreated(content::RenderViewHost* rvh) {
if (IsActive())
- WebContents()->GetView()->RestoreFocus();
+ WebContents()->RestoreFocus();
}
bool NativeAppWindowCocoa::IsFrameless() const {
@@ -795,7 +794,7 @@ void NativeAppWindowCocoa::WindowDidBecomeKey() {
rwhv->SetActive(true);
app_window_->OnNativeWindowActivated();
- WebContents()->GetView()->RestoreFocus();
+ WebContents()->RestoreFocus();
}
void NativeAppWindowCocoa::WindowDidResignKey() {
@@ -806,7 +805,7 @@ void NativeAppWindowCocoa::WindowDidResignKey() {
if ([NSApp isActive] && ([NSApp keyWindow] == window()))
return;
- WebContents()->GetView()->StoreFocus();
+ WebContents()->StoreFocus();
content::RenderWidgetHostView* rwhv =
WebContents()->GetRenderWidgetHostView();
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm
index 459c488..546dd98 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm
@@ -15,7 +15,6 @@
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/common/form_data.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
index b5e42db..05215d8 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
@@ -20,7 +20,6 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#import "ui/base/cocoa/flipped_view.h"
#include "ui/base/cocoa/window_size_constants.h"
@@ -213,8 +212,7 @@ const CGFloat kMinimumContentsHeight = 101;
- (CGFloat)maxHeight {
NSRect dialogFrameRect = [[self window] frame];
- NSRect browserFrameRect =
- [webContents_->GetView()->GetTopLevelNativeWindow() frame];
+ NSRect browserFrameRect = [webContents_->GetTopLevelNativeWindow() frame];
dialogFrameRect.size.height =
NSMaxY(dialogFrameRect) - NSMinY(browserFrameRect);
dialogFrameRect = [[self window] contentRectForFrameRect:dialogFrameRect];
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm
index 92fd47e..7293c4b 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm
@@ -17,7 +17,6 @@
#include "components/autofill/content/browser/wallet/wallet_service_url.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
namespace {
@@ -77,7 +76,7 @@ void CocoaSignInDelegate::HandleKeyboardEvent(
webContents_.reset(
content::WebContents::Create(
content::WebContents::CreateParams(dialog_->delegate()->profile())));
- NSView* webContentView = webContents_->GetView()->GetNativeView();
+ NSView* webContentView = webContents_->GetNativeView();
[self setView:webContentView];
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm
index 29780df..48ea1bd 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm
@@ -12,7 +12,6 @@
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#import "ui/gfx/test/ui_cocoa_test_helper.h"
@@ -69,7 +68,7 @@ TEST_F(AutofillSignInContainerTest, Subviews) {
// isKindOfClass would be the better choice, but
// WebContentsViewCocoaClass is defined in content, and not public.
bool hasWebView =[[container_ view] isEqual:
- [container_ webContents]->GetView()->GetNativeView()];
+ [container_ webContents]->GetNativeView()];
EXPECT_TRUE(hasWebView);
}
diff --git a/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.mm b/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.mm
index 4ce5514..3176b3b 100644
--- a/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.mm
@@ -15,7 +15,6 @@
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
-#include "content/public/browser/web_contents_view.h"
#include "skia/ext/skia_utils_mac.h"
#include "ui/base/cocoa/window_size_constants.h"
#include "ui/native_theme/native_theme.h"
@@ -195,7 +194,7 @@ GeneratedCreditCardBubbleCocoa::~GeneratedCreditCardBubbleCocoa() {}
void GeneratedCreditCardBubbleCocoa::Show() {
DCHECK(controller_.get());
NSView* browser_view =
- controller_->web_contents()->GetView()->GetNativeView();
+ controller_->web_contents()->GetNativeView();
NSWindow* parent_window = [browser_view window];
LocationBarViewMac* location_bar =
[[parent_window windowController] locationBarBridge];
diff --git a/chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.mm b/chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.mm
index 2ac24ae..06bcd7a 100644
--- a/chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.mm
@@ -16,7 +16,6 @@
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "skia/ext/skia_utils_mac.h"
#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/cocoa/window_size_constants.h"
@@ -199,8 +198,7 @@ NewCreditCardBubbleCocoa::~NewCreditCardBubbleCocoa() {
}
void NewCreditCardBubbleCocoa::Show() {
- NSView* browser_view =
- controller_->web_contents()->GetView()->GetNativeView();
+ NSView* browser_view = controller_->web_contents()->GetNativeView();
NSWindow* parent_window = [browser_view window];
BrowserWindowController* bwc = [BrowserWindowController
browserWindowControllerForWindow:parent_window];
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index eeba838..64c9972 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -51,7 +51,6 @@
#include "components/bookmarks/core/browser/bookmark_utils.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 106d1ba..e503c92 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -54,7 +54,6 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -74,7 +73,7 @@ namespace {
NSPoint GetPointForBubble(content::WebContents* web_contents,
int x_offset,
int y_offset) {
- NSView* view = web_contents->GetView()->GetNativeView();
+ NSView* view = web_contents->GetNativeView();
NSRect bounds = [view bounds];
NSPoint point;
point.x = NSMinX(bounds) + x_offset;
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 5fd720a..efb847c 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -84,7 +84,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
index 403c00e..b8620ea 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -34,7 +34,6 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#import "testing/gtest_mac.h"
namespace {
@@ -356,17 +355,17 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
// visible.
IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
AllowOverlappingViewsHistoryOverlay) {
- content::WebContentsView* web_contents_view =
- browser()->tab_strip_model()->GetActiveWebContents()->GetView();
- EXPECT_TRUE(web_contents_view->GetAllowOverlappingViews());
+ content::WebContents* web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ EXPECT_TRUE(web_contents->GetAllowOverlappingViews());
base::scoped_nsobject<HistoryOverlayController> overlay(
[[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
- [overlay showPanelForView:web_contents_view->GetNativeView()];
- EXPECT_TRUE(web_contents_view->GetAllowOverlappingViews());
+ [overlay showPanelForView:web_contents->GetNativeView()];
+ EXPECT_TRUE(web_contents->GetAllowOverlappingViews());
overlay.reset();
- EXPECT_TRUE(web_contents_view->GetAllowOverlappingViews());
+ EXPECT_TRUE(web_contents->GetAllowOverlappingViews());
}
// Tests that status bubble's base frame does move when devTools are docked.
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 65c4c4a..3ca8021 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -41,7 +41,6 @@
#include "chrome/common/pref_names.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#import "ui/base/cocoa/focus_tracker.h"
#include "ui/base/ui_base_types.h"
@@ -999,12 +998,12 @@ willPositionSheet:(NSWindow*)sheet
// transitioning between composited and non-composited mode.
// http://crbug.com/279472
allowOverlappingViews = YES;
- contents->GetView()->SetAllowOverlappingViews(allowOverlappingViews);
+ contents->SetAllowOverlappingViews(allowOverlappingViews);
DevToolsWindow* devToolsWindow =
DevToolsWindow::GetDockedInstanceForInspectedTab(contents);
if (devToolsWindow) {
- devToolsWindow->web_contents()->GetView()->
+ devToolsWindow->web_contents()->
SetAllowOverlappingViews(allowOverlappingViews);
}
}
diff --git a/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm b/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm
index ca4d5b1..4f83ff5 100644
--- a/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm
+++ b/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm
@@ -11,7 +11,6 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/test_utils.h"
#include "net/base/test_data_directory.h"
#include "net/cert/x509_certificate.h"
@@ -34,7 +33,7 @@ IN_PROC_BROWSER_TEST_F(SSLCertificateViewerCocoaTest, Basic) {
ASSERT_TRUE(cert.get());
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
- gfx::NativeWindow window = web_contents->GetView()->GetTopLevelNativeWindow();
+ gfx::NativeWindow window = web_contents->GetTopLevelNativeWindow();
WebContentsModalDialogManager* web_contents_modal_dialog_manager =
WebContentsModalDialogManager::FromWebContents(web_contents);
EXPECT_FALSE(web_contents_modal_dialog_manager->IsDialogActive());
diff --git a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
index 36529a9..9ec3864 100644
--- a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
@@ -11,7 +11,6 @@
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/size.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_ui.h"
@@ -115,9 +114,8 @@ ConstrainedWebDialogDelegateViewMac::ConstrainedWebDialogDelegateViewMac(
window_.reset(
[[ConstrainedWindowCustomWindow alloc] initWithContentRect:frame]);
- [GetWebContents()->GetView()->GetNativeView() setFrame:frame];
- [[window_ contentView]
- addSubview:GetWebContents()->GetView()->GetNativeView()];
+ [GetWebContents()->GetNativeView() setFrame:frame];
+ [[window_ contentView] addSubview:GetWebContents()->GetNativeView()];
base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]);
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
index c3a2b4f4..92a7b68 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
@@ -13,7 +13,6 @@
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
using web_modal::WebContentsModalDialogManager;
using web_modal::NativeWebContentsModalDialog;
@@ -90,5 +89,5 @@ NSWindow* ConstrainedWindowMac::GetParentWindow() const {
if (browser)
return browser->window()->GetNativeWindow();
- return web_contents_->GetView()->GetTopLevelNativeWindow();
+ return web_contents_->GetTopLevelNativeWindow();
}
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm
index 76593a3..021c33e 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm
@@ -13,7 +13,6 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "url/gurl.h"
@@ -100,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowMacTest, ShowInUninitializedTab) {
content::WebContents* tab2 =
browser()->tab_strip_model()->GetWebContentsAt(2);
ASSERT_TRUE(tab2);
- EXPECT_FALSE([tab2->GetView()->GetNativeView() superview]);
+ EXPECT_FALSE([tab2->GetNativeView() superview]);
// Show dialog and verify that it's not visible yet.
NiceMock<ConstrainedWindowDelegateMock> delegate;
@@ -109,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowMacTest, ShowInUninitializedTab) {
// Activate the tab and verify that the constrained window is shown.
browser()->tab_strip_model()->ActivateTabAt(2, true);
- EXPECT_TRUE([tab2->GetView()->GetNativeView() superview]);
+ EXPECT_TRUE([tab2->GetNativeView() superview]);
EXPECT_TRUE([sheet_window_ isVisible]);
EXPECT_EQ(1.0, [sheet_window_ alphaValue]);
diff --git a/chrome/browser/ui/cocoa/dev_tools_controller.mm b/chrome/browser/ui/cocoa/dev_tools_controller.mm
index 1d291de..5d65f1e4 100644
--- a/chrome/browser/ui/cocoa/dev_tools_controller.mm
+++ b/chrome/browser/ui/cocoa/dev_tools_controller.mm
@@ -15,7 +15,6 @@
#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/base/cocoa/base_view.h"
#include "ui/base/cocoa/focus_tracker.h"
#include "ui/gfx/mac/scoped_ns_disable_screen_updates.h"
@@ -132,8 +131,8 @@ using content::WebContents;
if (devToolsWindow_) {
const DevToolsContentsResizingStrategy& strategy =
devToolsWindow_->GetContentsResizingStrategy();
- devToolsWindow_->web_contents()->GetView()->SetOverlayView(
- contents->GetView(),
+ devToolsWindow_->web_contents()->SetOverlayView(
+ contents,
gfx::Point(strategy.insets().left(), strategy.insets().top()));
[devToolsContainerView_ setContentsResizingStrategy:strategy];
} else {
@@ -154,15 +153,14 @@ using content::WebContents;
// |devToolsView| is a WebContentsViewCocoa object, whose ViewID was
// set to VIEW_ID_TAB_CONTAINER initially, so we need to change it to
// VIEW_ID_DEV_TOOLS_DOCKED here.
- NSView* devToolsView =
- devToolsWindow_->web_contents()->GetView()->GetNativeView();
+ NSView* devToolsView = devToolsWindow_->web_contents()->GetNativeView();
view_id_util::SetID(devToolsView, VIEW_ID_DEV_TOOLS_DOCKED);
[devToolsContainerView_ showDevTools:devToolsView];
}
- (void)hideDevToolsView {
- devToolsWindow_->web_contents()->GetView()->RemoveOverlayView();
+ devToolsWindow_->web_contents()->RemoveOverlayView();
[devToolsContainerView_ hideDevTools];
[focusTracker_ restoreFocusInWindow:[devToolsContainerView_ window]];
focusTracker_.reset();
diff --git a/chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm b/chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm
index ad93cce..c850488 100644
--- a/chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm
@@ -14,7 +14,6 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
class DevToolsControllerTest : public InProcessBrowserTest {
public:
@@ -35,17 +34,15 @@ IN_PROC_BROWSER_TEST_F(DevToolsControllerTest, AllowOverlappingViews) {
browser()->tab_strip_model()->GetActiveWebContents();
DevToolsWindow* dev_tools =
DevToolsWindow::GetDockedInstanceForInspectedTab(web_contents);
- content::WebContentsView* dev_tools_view =
- dev_tools->web_contents()->GetView();
// Without the find bar.
- EXPECT_TRUE(dev_tools_view->GetAllowOverlappingViews());
+ EXPECT_TRUE(dev_tools->web_contents()->GetAllowOverlappingViews());
// With the find bar.
browser()->GetFindBarController()->find_bar()->Show(false);
- EXPECT_TRUE(dev_tools_view->GetAllowOverlappingViews());
+ EXPECT_TRUE(dev_tools->web_contents()->GetAllowOverlappingViews());
// Without the find bar.
browser()->GetFindBarController()->find_bar()->Hide(false);
- EXPECT_TRUE(dev_tools_view->GetAllowOverlappingViews());
+ EXPECT_TRUE(dev_tools->web_contents()->GetAllowOverlappingViews());
}
diff --git a/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm b/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
index 48f937d..2e5270ce 100644
--- a/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
+++ b/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
@@ -14,7 +14,6 @@
#include "base/logging.h"
#import "chrome/browser/ui/cocoa/animatable_image.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/theme_resources.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h"
#include "third_party/skia/include/utils/mac/SkCGUtils.h"
@@ -49,8 +48,7 @@ class DownloadAnimationWebObserver;
// against the left edge, and three times the download image's height from
// the bottom of the tab, assuming there is enough room. If there isn't
// enough, don't show the animation and let the shelf speak for itself.
- gfx::Rect bounds;
- webContents->GetView()->GetContainerBounds(&bounds);
+ gfx::Rect bounds = webContents->GetContainerBounds();
imageWidth_ = [image size].width;
CGFloat imageHeight = [image size].height;
@@ -60,7 +58,7 @@ class DownloadAnimationWebObserver;
return nil;
}
- NSView* tabContentsView = webContents->GetView()->GetNativeView();
+ NSView* tabContentsView = webContents->GetNativeView();
NSWindow* parentWindow = [tabContentsView window];
if (!parentWindow) {
// The tab is no longer frontmost.
diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
index b776789..f0a61c2 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
@@ -9,7 +9,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_host.h"
#include "extensions/common/view_type.h"
@@ -36,7 +35,7 @@ void ExtensionViewMac::Init() {
}
gfx::NativeView ExtensionViewMac::native_view() {
- return extension_host_->host_contents()->GetView()->GetNativeView();
+ return extension_host_->host_contents()->GetNativeView();
}
content::RenderViewHost* ExtensionViewMac::render_view_host() const {
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index fd7123b..b328234 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -24,7 +24,6 @@
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h"
#import "ui/base/cocoa/find_pasteboard.h"
#import "ui/base/cocoa/focus_tracker.h"
@@ -328,7 +327,7 @@ const float kRightEdgeOffset = 25;
if (!(focusTracker_.get() &&
[focusTracker_ restoreFocusInWindow:[findBarView_ window]])) {
// Fall back to giving focus to the tab contents.
- findBarBridge_->GetFindBarController()->web_contents()->GetView()->Focus();
+ findBarBridge_->GetFindBarController()->web_contents()->Focus();
}
focusTracker_.reset(nil);
}
@@ -541,7 +540,7 @@ const float kRightEdgeOffset = 25;
return frame.origin.x;
// Get the size of the container.
- gfx::Rect containerRect(contents->GetView()->GetContainerSize());
+ gfx::Rect containerRect(contents->GetContainerBounds().size());
// Position the FindBar on the top right corner.
viewRect.set_x(
diff --git a/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm
index 496478d..2c46ba3 100644
--- a/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm
@@ -17,7 +17,6 @@
#include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
diff --git a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm
index ef8f353..8337fcf 100644
--- a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm
@@ -33,7 +33,6 @@
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/ui_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
@@ -231,7 +230,7 @@ const double kWidthOfMouseResizeArea = 15.0;
NSRect contentFrame = [self contentRectForFrameRect:[[self window] frame]];
contentFrame.origin = NSZeroPoint;
- NSView* contentView = webContents->GetView()->GetNativeView();
+ NSView* contentView = webContents->GetNativeView();
if (!NSEqualRects([contentView frame], contentFrame))
[contentView setFrame:contentFrame];
}
@@ -331,7 +330,7 @@ const double kWidthOfMouseResizeArea = 15.0;
}
- (void)webContentsInserted:(WebContents*)contents {
- NSView* view = contents->GetView()->GetNativeView();
+ NSView* view = contents->GetNativeView();
[[[self window] contentView] addSubview:view];
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
@@ -339,7 +338,7 @@ const double kWidthOfMouseResizeArea = 15.0;
}
- (void)webContentsDetached:(WebContents*)contents {
- [contents->GetView()->GetNativeView() removeFromSuperview];
+ [contents->GetNativeView() removeFromSuperview];
}
- (PanelTitlebarViewCocoa*)titlebarView {
@@ -691,7 +690,7 @@ const double kWidthOfMouseResizeArea = 15.0;
content::WebContents* webContents = panel->GetWebContents();
if (!webContents)
return;
- NSView* contentView = webContents->GetView()->GetNativeView();
+ NSView* contentView = webContents->GetNativeView();
if (NSHeight([self contentRectForFrameRect:[[self window] frame]]) <= 0) {
// No need to retain the view before it is removed from its superview
// because WebContentsView keeps a reference to this view.
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index dfb5158..f5f6f26 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -42,7 +42,6 @@
#include "components/signin/core/browser/signin_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "google_apis/gaia/oauth2_token_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1372,7 +1371,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
content::Referrer(),
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
- NSView* webview = webContents_->GetView()->GetNativeView();
+ NSView* webview = webContents_->GetNativeView();
[webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)];
[container addSubview:webview];
yOffset = NSMaxY([webview frame]);
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 89a0cb5..3087ac4 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -8,7 +8,6 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -83,7 +82,7 @@ void HideUserManager() {
// Initialize the web view.
webContents_.reset(content::WebContents::Create(
content::WebContents::CreateParams(profile)));
- window.contentView = webContents_->GetView()->GetNativeView();
+ window.contentView = webContents_->GetNativeView();
DCHECK(window.contentView);
[[NSNotificationCenter defaultCenter]
diff --git a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm
index e1e228a..f08ed53 100644
--- a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm
+++ b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm
@@ -15,7 +15,6 @@
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util_mac.h"
diff --git a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm
index fe81885..c9db177 100644
--- a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm
+++ b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/test_utils.h"
#include "ui/base/cocoa/window_size_constants.h"
diff --git a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
index 5fdc5be..3e6d73c 100644
--- a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
@@ -10,7 +10,6 @@
#include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
ChromeWebContentsViewDelegateMac::ChromeWebContentsViewDelegateMac(
content::WebContents* web_contents)
diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm
index 0511375..50b743a 100644
--- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
@implementation OverlayableContentsController
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm
index df5da7a..70732b0 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm
@@ -8,7 +8,6 @@
#include "base/mac/mac_util.h"
#import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
namespace chrome {
@@ -42,7 +41,7 @@ void SadTabCocoa::Close() {
webContents_ = webContents;
if (webContents_) { // NULL in unit_tests.
- NSView* ns_view = webContents_->GetView()->GetNativeView();
+ NSView* ns_view = webContents_->GetNativeView();
[[self view] setAutoresizingMask:
(NSViewWidthSizable | NSViewHeightSizable)];
[ns_view addSubview:[self view]];
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index e0b033b32..b49b82d 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -17,7 +17,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/base/cocoa/animation_utils.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/geometry/rect.h"
@@ -222,7 +221,7 @@ class FullscreenObserver : public WebContentsObserver {
contentsNativeView = fullscreenView->GetNativeView();
} else {
isEmbeddingFullscreenWidget_ = NO;
- contentsNativeView = contents_->GetView()->GetNativeView();
+ contentsNativeView = contents_->GetNativeView();
}
[contentsNativeView setFrame:[self frameForContentsView]];
if ([subviews count] == 0) {
@@ -242,7 +241,7 @@ class FullscreenObserver : public WebContentsObserver {
// transitioning between composited and non-composited mode.
// http://crbug.com/279472
if (!fullscreenView)
- contents_->GetView()->SetAllowOverlappingViews(true);
+ contents_->SetAllowOverlappingViews(true);
}
- (void)changeWebContents:(WebContents*)newContents {
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 36c20f0..b89ffb1 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -57,7 +57,6 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
@@ -1311,7 +1310,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
// Called before |contents| is deactivated.
- (void)tabDeactivatedWithContents:(content::WebContents*)contents {
- contents->GetView()->StoreFocus();
+ contents->StoreFocus();
}
// Called when a notification is received from the model to select a particular
@@ -1357,7 +1356,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
if (newContents) {
newContents->WasShown();
- newContents->GetView()->RestoreFocus();
+ newContents->RestoreFocus();
}
}
@@ -2235,5 +2234,5 @@ NSView* GetSheetParentViewForWebContents(WebContents* web_contents) {
//
// Changing it? Do not forget to modify
// -[TabStripController swapInTabAtIndex:] too.
- return [web_contents->GetView()->GetNativeView() superview];
+ return [web_contents->GetNativeView() superview];
}
diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
index db0be89..8c31923 100644
--- a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
@@ -13,7 +13,6 @@
#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/size.h"
@@ -344,7 +343,7 @@ void WebDialogWindowDelegateBridge::HandleKeyboardEvent(
- (void)loadDialogContents {
webContents_.reset(WebContents::Create(
WebContents::CreateParams(delegate_->browser_context())));
- [[self window] setContentView:webContents_->GetView()->GetNativeView()];
+ [[self window] setContentView:webContents_->GetNativeView()];
webContents_->SetDelegate(delegate_.get());
// This must be done before loading the page; see the comments in
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
index 3984236..1d67b3c 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
@@ -10,7 +10,6 @@
#import "chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h"
#import "chrome/browser/ui/website_settings/permission_bubble_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
PermissionBubbleCocoa::PermissionBubbleCocoa(NSWindow* parent_window)
: parent_window_(parent_window), delegate_(NULL), bubbleController_(nil) {}
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index b96c1ab..f5b8f16 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -33,7 +33,6 @@
#include "chrome/common/url_constants.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/renderer_preferences.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
@@ -217,7 +216,7 @@ WebContents* OpenApplicationWindow(const AppLaunchParams& params) {
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
// focus explicitly.
- web_contents->GetView()->SetInitialFocus();
+ web_contents->SetInitialFocus();
return web_contents;
}
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 4f0bf21..1a2ab5d 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -36,14 +36,12 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/browser_test_utils.h"
#include "net/base/filename_util.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/events/keycodes/keyboard_codes.h"
#if defined(OS_WIN)
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#endif
@@ -1597,8 +1595,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, WindowedNPAPIPluginHidden) {
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
// Now get the region of the plugin before the find bar is shown.
- HWND hwnd =
- tab->GetView()->GetNativeView()->GetHost()->GetAcceleratedWidget();
+ HWND hwnd = tab->GetNativeView()->GetHost()->GetAcceleratedWidget();
HWND child = NULL;
EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller.cc b/chrome/browser/ui/fullscreen/fullscreen_controller.cc
index a99b0e3..53d83b1 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller.cc
@@ -27,7 +27,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/extension.h"
#if defined(OS_MACOSX)
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_state_unittest.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_state_unittest.cc
index d7dd1cb..e065327 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller_state_unittest.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller_state_unittest.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/url_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -525,7 +524,7 @@ TEST_F(FullscreenControllerStateUnitTest, OneCapturedFullscreenedTab) {
// TODO(miu): Need to make an adjustment to content::WebContentsViewMac for
// the following to work:
#if !defined(OS_MACOSX)
- EXPECT_EQ(kCaptureSize, first_tab->GetView()->GetViewBounds().size());
+ EXPECT_EQ(kCaptureSize, first_tab->GetViewBounds().size());
#endif
// Switch back to the first tab and exit fullscreen.
diff --git a/chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.cc b/chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.cc
index 5800fcf..345a9e8 100644
--- a/chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.cc
+++ b/chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/ui/search/search_tab_helper.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
@@ -101,8 +100,7 @@ void OmniboxCurrentPageDelegateImpl::OnFocusChanged(
void OmniboxCurrentPageDelegateImpl::DoPrerender(
const AutocompleteMatch& match) {
content::WebContents* web_contents = controller_->GetWebContents();
- gfx::Rect container_bounds;
- web_contents->GetView()->GetContainerBounds(&container_bounds);
+ gfx::Rect container_bounds = web_contents->GetContainerBounds();
InstantSearchPrerenderer* prerenderer =
InstantSearchPrerenderer::GetForProfile(profile_);
diff --git a/chrome/browser/ui/sad_tab_helper.cc b/chrome/browser/ui/sad_tab_helper.cc
index 8ad27ec..ab8a6e0 100644
--- a/chrome/browser/ui/sad_tab_helper.cc
+++ b/chrome/browser/ui/sad_tab_helper.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/ui/sad_tab.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(SadTabHelper);
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 396904b..7361475 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -31,7 +31,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "net/base/escape.h"
#include "net/base/network_change_notifier.h"
#include "url/gurl.h"
@@ -91,7 +90,7 @@ bool InstantController::SubmitQuery(const base::string16& search_terms) {
// page. (NOTE: in particular, we do not send the query to NTPs.)
SearchTabHelper::FromWebContents(instant_tab_->contents())->Submit(
search_terms);
- instant_tab_->contents()->GetView()->Focus();
+ instant_tab_->contents()->Focus();
EnsureSearchTermsAreSet(instant_tab_->contents(), search_terms);
return true;
}
diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
index bdb18dd..b479686 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -68,7 +68,6 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
index e9c9779..4bc6991 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -39,7 +39,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/referrer.h"
#include "grit/generated_resources.h"
@@ -432,7 +431,7 @@ void SearchTabHelper::FocusOmnibox(OmniboxFocusState state) {
// from changing the omnibox value and closing the popup without user
// interaction.
if (!omnibox->model()->popup_model()->IsOpen())
- web_contents()->GetView()->Focus();
+ web_contents()->Focus();
break;
}
#endif
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index f281cc0..2caa700 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -88,7 +88,6 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index 82c0af5..d0510b6 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -74,7 +74,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
#include "google_apis/gaia/gaia_auth_util.h"
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 02c2ccd..06ac829 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -26,8 +26,6 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
-
using base::UserMetricsAction;
using content::WebContents;
@@ -840,7 +838,7 @@ void TabStripModel::AddWebContents(WebContents* contents,
if (WebContents* old_contents = GetActiveWebContents()) {
if ((add_types & ADD_ACTIVE) == 0) {
apps::ResizeWebContents(contents,
- old_contents->GetView()->GetContainerSize());
+ old_contents->GetContainerBounds().size());
}
}
}
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 7a38f8e..6168bef 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -25,7 +25,6 @@
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -1257,7 +1256,7 @@ void AutofillDialogViews::Show() {
// Listen for size changes on the browser.
views::Widget* browser_widget =
views::Widget::GetTopLevelWidgetForNativeView(
- delegate_->GetWebContents()->GetView()->GetNativeView());
+ delegate_->GetWebContents()->GetNativeView());
observer_.Add(browser_widget);
// Listen for unhandled mouse presses on the non-client view.
diff --git a/chrome/browser/ui/views/color_chooser_aura.cc b/chrome/browser/ui/views/color_chooser_aura.cc
index 720f90c..f8d7602 100644
--- a/chrome/browser/ui/views/color_chooser_aura.cc
+++ b/chrome/browser/ui/views/color_chooser_aura.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/views/color_chooser/color_chooser_view.h"
#include "ui/views/widget/widget.h"
@@ -17,7 +16,7 @@ ColorChooserAura::ColorChooserAura(content::WebContents* web_contents,
: web_contents_(web_contents) {
view_ = new views::ColorChooserView(this, initial_color);
widget_ = views::Widget::CreateWindowWithParent(
- view_, web_contents->GetView()->GetTopLevelNativeWindow());
+ view_, web_contents->GetTopLevelNativeWindow());
widget_->Show();
}
diff --git a/chrome/browser/ui/views/color_chooser_win.cc b/chrome/browser/ui/views/color_chooser_win.cc
index 0fde020..d4f07c1 100644
--- a/chrome/browser/ui/views/color_chooser_win.cc
+++ b/chrome/browser/ui/views/color_chooser_win.cc
@@ -12,7 +12,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/views/color_chooser/color_chooser_listener.h"
#if defined(USE_ASH)
@@ -104,7 +103,7 @@ namespace chrome {
content::ColorChooser* ShowColorChooser(content::WebContents* web_contents,
SkColor initial_color) {
#if defined(USE_ASH)
- gfx::NativeView native_view = web_contents->GetView()->GetNativeView();
+ gfx::NativeView native_view = web_contents->GetNativeView();
if (GetHostDesktopTypeForNativeView(native_view) == HOST_DESKTOP_TYPE_ASH)
return ColorChooserAura::Open(web_contents, initial_color);
#endif
diff --git a/chrome/browser/ui/views/download/download_started_animation_views.cc b/chrome/browser/ui/views/download/download_started_animation_views.cc
index fcde0a2..aaa37ca 100644
--- a/chrome/browser/ui/views/download/download_started_animation_views.cc
+++ b/chrome/browser/ui/views/download/download_started_animation_views.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/download/download_started_animation.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/animation/linear_animation.h"
@@ -67,7 +66,7 @@ DownloadStartedAnimationViews::DownloadStartedAnimationViews(
// If we're too small to show the download image, then don't bother -
// the shelf will be enough.
- web_contents->GetView()->GetContainerBounds(&web_contents_bounds_);
+ web_contents_bounds_= web_contents->GetContainerBounds();
if (web_contents_bounds_.height() < kDownloadImage->height())
return;
@@ -78,7 +77,7 @@ DownloadStartedAnimationViews::DownloadStartedAnimationViews(
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
params.accept_events = false;
- params.parent = web_contents->GetView()->GetNativeView();
+ params.parent = web_contents->GetNativeView();
popup_->Init(params);
popup_->SetOpacity(0x00);
popup_->SetContentsView(this);
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.cc b/chrome/browser/ui/views/extensions/extension_dialog.cc
index 1d8aec9..ba2c1c7 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.cc
+++ b/chrome/browser/ui/views/extensions/extension_dialog.cc
@@ -15,7 +15,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/base/base_window.h"
#include "ui/gfx/screen.h"
#include "ui/views/background.h"
@@ -78,7 +77,7 @@ ExtensionDialog* ExtensionDialog::Show(
host->view()->SetVisible(true);
// Ensure the DOM JavaScript can respond immediately to keyboard shortcuts.
- host->host_contents()->GetView()->Focus();
+ host->host_contents()->Focus();
return dialog;
}
diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
index dcacc5a..5ae93cc 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.cc
+++ b/chrome/browser/ui/views/extensions/extension_popup.cc
@@ -23,7 +23,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/insets.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/widget/widget.h"
@@ -251,7 +250,7 @@ void ExtensionPopup::ShowBubble() {
GetWidget()->Show();
// Focus on the host contents when the bubble is first shown.
- host()->host_contents()->GetView()->Focus();
+ host()->host_contents()->Focus();
if (inspect_with_devtools_) {
DevToolsWindow::OpenDevToolsWindow(host()->render_view_host(),
diff --git a/chrome/browser/ui/views/extensions/extension_view_views.cc b/chrome/browser/ui/views/extensions/extension_view_views.cc
index b7c7e59..77a1263 100644
--- a/chrome/browser/ui/views/extensions/extension_view_views.cc
+++ b/chrome/browser/ui/views/extensions/extension_view_views.cc
@@ -9,7 +9,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_host.h"
#include "extensions/common/view_type.h"
#include "ui/events/event.h"
@@ -134,13 +133,13 @@ void ExtensionViewViews::PreferredSizeChanged() {
}
void ExtensionViewViews::OnFocus() {
- host()->host_contents()->GetView()->Focus();
+ host()->host_contents()->Focus();
}
void ExtensionViewViews::CreateWidgetHostView() {
DCHECK(!initialized_);
initialized_ = true;
- Attach(host_->host_contents()->GetView()->GetNativeView());
+ Attach(host_->host_contents()->GetNativeView());
host_->CreateRenderViewSoon();
SetVisible(false);
}
diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
index bab86c7..9883404 100644
--- a/chrome/browser/ui/views/external_protocol_dialog.cc
+++ b/chrome/browser/ui/views/external_protocol_dialog.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/ui/external_protocol_dialog_delegate.h"
#include "chrome/browser/ui/views/constrained_window_views.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -137,6 +136,6 @@ ExternalProtocolDialog::ExternalProtocolDialog(
render_process_host_id_, routing_id_);
gfx::NativeWindow parent_window = NULL;
if (web_contents)
- parent_window = web_contents->GetView()->GetTopLevelNativeWindow();
+ parent_window = web_contents->GetTopLevelNativeWindow();
CreateBrowserModalDialogViews(this, parent_window)->Show();
}
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 284f848..636e587 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/views/focus/external_focus_tracker.h"
@@ -169,7 +168,7 @@ bool FindBarHost::IsFindBarVisible() {
void FindBarHost::RestoreSavedFocus() {
if (focus_tracker() == NULL) {
// TODO(brettw): Focus() should be on WebContentsView.
- find_bar_controller_->web_contents()->GetView()->Focus();
+ find_bar_controller_->web_contents()->Focus();
} else {
focus_tracker()->FocusLastFocusedExternalView();
}
@@ -366,8 +365,7 @@ void FindBarHost::OnVisibilityChanged() {
void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowBoundsInScreen();
- content::WebContentsView* tab_view =
- find_bar_controller_->web_contents()->GetView();
- gfx::Rect webcontents_rect = tab_view->GetViewBounds();
+ gfx::Rect webcontents_rect =
+ find_bar_controller_->web_contents()->GetViewBounds();
avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
}
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 3e7e974..af452fb 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -107,7 +107,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -832,7 +831,7 @@ void BrowserView::OnActiveTabChanged(content::WebContents* old_contents,
GetWidget()->IsVisible()) {
// We only restore focus if our window is visible, to avoid invoking blur
// handlers when we are eventually shown.
- new_contents->GetView()->RestoreFocus();
+ new_contents->RestoreFocus();
}
// Update all the UI bits.
@@ -942,7 +941,7 @@ bool BrowserView::IsInMetroSnapMode() const {
void BrowserView::RestoreFocus() {
WebContents* selected_web_contents = GetActiveWebContents();
if (selected_web_contents)
- selected_web_contents->GetView()->RestoreFocus();
+ selected_web_contents->RestoreFocus();
}
void BrowserView::SetWindowSwitcherButton(views::Button* button) {
@@ -1428,12 +1427,12 @@ void BrowserView::TabInsertedAt(WebContents* contents,
// window yet. Per http://crbug/342672 add them now since drawing the
// WebContents requires root window specific data - information about
// the screen the WebContents is drawn on, for example.
- if (!contents->GetView()->GetNativeView()->GetRootWindow()) {
- aura::Window* window = contents->GetView()->GetNativeView();
+ if (!contents->GetNativeView()->GetRootWindow()) {
+ aura::Window* window = contents->GetNativeView();
aura::Window* root_window = GetNativeWindow()->GetRootWindow();
aura::client::ParentWindowWithContext(
window, root_window, root_window->GetBoundsInScreen());
- DCHECK(contents->GetView()->GetNativeView()->GetRootWindow());
+ DCHECK(contents->GetNativeView()->GetRootWindow());
}
web_contents_close_handler_->TabInserted();
@@ -1467,7 +1466,7 @@ void BrowserView::TabDeactivated(WebContents* contents) {
// Some reports seem to show that the focus manager and/or focused view can
// be garbage at that point, it is not clear why.
if (!contents->IsBeingDestroyed())
- contents->GetView()->StoreFocus();
+ contents->StoreFocus();
}
void BrowserView::TabStripEmpty() {
@@ -2503,7 +2502,7 @@ void BrowserView::DoCutCopyPaste(void (WebContents::*method)(),
bool BrowserView::DoCutCopyPasteForWebContents(
WebContents* contents,
void (WebContents::*method)()) {
- gfx::NativeView native_view = contents->GetView()->GetContentNativeView();
+ gfx::NativeView native_view = contents->GetContentNativeView();
if (!native_view)
return false;
if (native_view->HasFocus()) {
diff --git a/chrome/browser/ui/views/frame/contents_web_view.cc b/chrome/browser/ui/views/frame/contents_web_view.cc
index 82576ca..234873c 100644
--- a/chrome/browser/ui/views/frame/contents_web_view.cc
+++ b/chrome/browser/ui/views/frame/contents_web_view.cc
@@ -7,7 +7,6 @@
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/views/status_bubble_views.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/base/theme_provider.h"
#include "ui/compositor/layer_tree_owner.h"
@@ -84,8 +83,7 @@ void ContentsWebView::OnLayerRecreated(ui::Layer* old_layer,
void ContentsWebView::CloneWebContentsLayer() {
if (!web_contents())
return;
- cloned_layer_tree_ = wm::RecreateLayers(
- web_contents()->GetView()->GetNativeView());
+ cloned_layer_tree_ = wm::RecreateLayers(web_contents()->GetNativeView());
if (!cloned_layer_tree_ || !cloned_layer_tree_->root()) {
cloned_layer_tree_.reset();
return;
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
index 6a81264..d7f12d2 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index a663391..bb9b873 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -21,7 +21,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/result_codes.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -197,7 +196,7 @@ HungRendererDialogView* HungRendererDialogView::GetInstance() {
// static
bool HungRendererDialogView::IsFrameActive(WebContents* contents) {
gfx::NativeView frame_view =
- platform_util::GetTopLevel(contents->GetView()->GetNativeView());
+ platform_util::GetTopLevel(contents->GetNativeView());
return platform_util::IsWindowActive(frame_view);
}
@@ -244,7 +243,7 @@ void HungRendererDialogView::ShowForWebContents(WebContents* contents) {
}
gfx::NativeView frame_view =
- platform_util::GetTopLevel(contents->GetView()->GetNativeView());
+ platform_util::GetTopLevel(contents->GetNativeView());
views::Widget* insert_after =
views::Widget::GetWidgetForNativeView(frame_view);
if (insert_after)
@@ -441,7 +440,7 @@ void ShowHungRendererDialog(WebContents* contents) {
return;
gfx::NativeView toplevel_view =
- platform_util::GetTopLevel(contents->GetView()->GetNativeView());
+ platform_util::GetTopLevel(contents->GetNativeView());
// Don't show the dialog if there is no root window for the renderer, because
// it's invisible to the user (happens when the renderer is for prerendering
// for example).
diff --git a/chrome/browser/ui/views/location_bar/star_view_browsertest.cc b/chrome/browser/ui/views/location_bar/star_view_browsertest.cc
index c39b2d5..87a14eb 100644
--- a/chrome/browser/ui/views/location_bar/star_view_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/star_view_browsertest.cc
@@ -20,7 +20,6 @@
#include "ui/base/ui_base_switches.h"
#if defined(OS_WIN)
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#endif
@@ -113,8 +112,7 @@ IN_PROC_BROWSER_TEST_F(StarViewTestNoDWM, WindowedNPAPIPluginHidden) {
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
// Now get the region of the plugin before the star view is shown.
- HWND hwnd = tab->GetView()->GetNativeView()->GetHost()->
- GetAcceleratedWidget();
+ HWND hwnd = tab->GetNativeView()->GetHost()->GetAcceleratedWidget();
HWND child = NULL;
EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
index 3ebdb82..80367b8 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/views/location_bar/zoom_view.h"
#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "content/public/browser/notification_source.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -73,8 +72,7 @@ void ZoomBubbleView::ShowBubble(content::WebContents* web_contents,
// If we do not have an anchor view, parent the bubble to the content area.
if (!anchor_to_view) {
- zoom_bubble_->set_parent_window(
- web_contents->GetView()->GetTopLevelNativeWindow());
+ zoom_bubble_->set_parent_window(web_contents->GetTopLevelNativeWindow());
}
views::BubbleDelegateView::CreateBubble(zoom_bubble_);
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc
index 017cfbe..4224926 100644
--- a/chrome/browser/ui/views/panels/panel_view.cc
+++ b/chrome/browser/ui/views/panels/panel_view.cc
@@ -20,7 +20,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/path.h"
#include "ui/gfx/screen.h"
@@ -997,7 +996,7 @@ void PanelView::OnWidgetActivationChanged(views::Widget* widget, bool active) {
if (focused_) {
content::WebContents* web_contents = panel_->GetWebContents();
if (web_contents)
- web_contents->GetView()->RestoreFocus();
+ web_contents->RestoreFocus();
}
}
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index 0c3f0e0..654c114 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/views/passwords/manage_password_item_view.h"
#include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h"
#include "content/public/browser/notification_source.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/combobox_model.h"
@@ -101,7 +100,7 @@ void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents,
if (is_fullscreen) {
manage_passwords_bubble_->set_parent_window(
- web_contents->GetView()->GetTopLevelNativeWindow());
+ web_contents->GetTopLevelNativeWindow());
}
views::BubbleDelegateView::CreateBubble(manage_passwords_bubble_);
diff --git a/chrome/browser/ui/views/profiles/user_manager_view.cc b/chrome/browser/ui/views/profiles/user_manager_view.cc
index c0eb030..4f0be31 100644
--- a/chrome/browser/ui/views/profiles/user_manager_view.cc
+++ b/chrome/browser/ui/views/profiles/user_manager_view.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/auto_keep_alive.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/controls/webview/webview.h"
diff --git a/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc b/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
index c6187f9..d879b71 100644
--- a/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
+++ b/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
@@ -10,7 +10,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 913025a..0c7a205 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -16,7 +16,6 @@
#include "chrome/common/url_constants.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -239,7 +238,7 @@ void SadTabView::Show() {
// It is not possible to create a native_widget_win that has no parent in
// and later re-parent it.
// TODO(avi): This is a cheat. Can this be made cleaner?
- sad_tab_params.parent = web_contents_->GetView()->GetNativeView();
+ sad_tab_params.parent = web_contents_->GetNativeView();
set_owned_by_client();
@@ -248,9 +247,8 @@ void SadTabView::Show() {
sad_tab->SetContentsView(this);
views::Widget::ReparentNativeView(sad_tab->GetNativeView(),
- web_contents_->GetView()->GetNativeView());
- gfx::Rect bounds;
- web_contents_->GetView()->GetContainerBounds(&bounds);
+ web_contents_->GetNativeView());
+ gfx::Rect bounds = web_contents_->GetContainerBounds();
sad_tab->SetBounds(gfx::Rect(bounds.size()));
}
diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector.cc b/chrome/browser/ui/views/ssl_client_certificate_selector.cc
index 9175e8f..08eefd9 100644
--- a/chrome/browser/ui/views/ssl_client_certificate_selector.cc
+++ b/chrome/browser/ui/views/ssl_client_certificate_selector.cc
@@ -14,7 +14,6 @@
#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "net/cert/x509_certificate.h"
#include "net/ssl/ssl_cert_request_info.h"
@@ -267,7 +266,7 @@ void SSLClientCertificateSelector::ButtonPressed(
net::X509Certificate* cert = GetSelectedCert();
if (cert)
ShowCertificateViewer(web_contents_,
- web_contents_->GetView()->GetTopLevelNativeWindow(),
+ web_contents_->GetTopLevelNativeWindow(),
cert);
}
}
diff --git a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
index 07f6ec9e..b1c19ee 100644
--- a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
+++ b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
@@ -16,7 +16,6 @@
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
index 1b56ee4..1b9d752 100644
--- a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
+++ b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
@@ -17,7 +17,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/window.h"
#include "ui/views/focus/focus_manager.h"
@@ -190,7 +189,7 @@ void ChromeWebContentsViewDelegateViews::SizeChanged(const gfx::Size& size) {
aura::Window* ChromeWebContentsViewDelegateViews::GetActiveNativeView() {
return web_contents_->GetFullscreenRenderWidgetHostView() ?
web_contents_->GetFullscreenRenderWidgetHostView()->GetNativeView() :
- web_contents_->GetView()->GetNativeView();
+ web_contents_->GetNativeView();
}
views::Widget* ChromeWebContentsViewDelegateViews::GetTopLevelWidget() {
@@ -208,7 +207,7 @@ void ChromeWebContentsViewDelegateViews::SetInitialFocus() {
if (web_contents_->GetDelegate())
web_contents_->GetDelegate()->SetFocusToLocationBar(false);
} else {
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
}
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 624c229..54f836d1 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -33,7 +33,6 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "ui/aura/env.h"
#include "ui/base/resource/resource_bundle.h"
@@ -589,7 +588,7 @@ void TabDragController::RestoreFocus() {
if (is_dragging_new_browser_) {
content::WebContents* active_contents = source_dragged_contents();
if (active_contents && !active_contents->FocusLocationBarByDefault())
- active_contents->GetView()->Focus();
+ active_contents->Focus();
}
return;
}
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 2f03229..a271814 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -54,7 +54,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc b/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc
index 5f88794..d2c1198 100644
--- a/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc
+++ b/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc
@@ -10,7 +10,6 @@
#include "components/web_modal/single_web_contents_dialog_manager.h"
#include "components/web_modal/web_contents_modal_dialog_host.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/point.h"
#include "ui/gfx/size.h"
#include "ui/views/border.h"
diff --git a/chrome/browser/ui/views/web_dialog_view_browsertest.cc b/chrome/browser/ui/views/web_dialog_view_browsertest.cc
index 1e4fb26..e2c010d 100644
--- a/chrome/browser/ui/views/web_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/web_dialog_view_browsertest.cc
@@ -18,7 +18,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/webview/web_dialog_view.h"
@@ -109,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) {
browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(web_contents != NULL);
views::Widget::CreateWindowWithParent(
- view, web_contents->GetView()->GetTopLevelNativeWindow());
+ view, web_contents->GetTopLevelNativeWindow());
view->GetWidget()->Show();
// TestWebDialogView should quit current message loop on size change.
diff --git a/chrome/browser/ui/webui/app_list/start_page_handler.cc b/chrome/browser/ui/webui/app_list/start_page_handler.cc
index 8987645..930b75b 100644
--- a/chrome/browser/ui/webui/app_list/start_page_handler.cc
+++ b/chrome/browser/ui/webui/app_list/start_page_handler.cc
@@ -23,7 +23,6 @@
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
@@ -194,8 +193,8 @@ void StartPageHandler::HandleLaunchApp(const base::ListValue* args) {
AppListControllerDelegate* controller = AppListService::Get(
chrome::GetHostDesktopTypeForNativeView(
- web_ui()->GetWebContents()->GetView()->GetNativeView()))
- ->GetControllerDelegate();
+ web_ui()->GetWebContents()->GetNativeView()))->
+ GetControllerDelegate();
controller->ActivateApp(profile,
app,
AppListControllerDelegate::LAUNCH_FROM_APP_LIST,
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 2290e17..84ec86f 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -43,7 +43,6 @@
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "extensions/browser/extension_system.h"
#include "grit/generated_resources.h"
@@ -385,7 +384,7 @@ void DownloadsDOMHandler::HandleDrag(const base::ListValue* args) {
gfx::Image* icon = g_browser_process->icon_manager()->LookupIconFromFilepath(
file->GetTargetFilePath(), IconLoader::NORMAL);
- gfx::NativeView view = web_contents->GetView()->GetNativeView();
+ gfx::NativeView view = web_contents->GetNativeView();
{
// Enable nested tasks during DnD, while |DragDownload()| blocks.
base::MessageLoop::ScopedNestableTaskAllower allow(
diff --git a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
index eb597ef..6e43177 100644
--- a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
@@ -19,7 +19,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "extensions/browser/extension_system.h"
@@ -113,8 +112,7 @@ void ExtensionLoaderHandler::FileHelper::ChooseFile() {
NULL,
kFileTypeIndex,
base::FilePath::StringType(),
- loader_handler_->web_ui()->
- GetWebContents()->GetView()->GetTopLevelNativeWindow(),
+ loader_handler_->web_ui()->GetWebContents()->GetTopLevelNativeWindow(),
NULL);
content::RecordComputedAction("Options_LoadUnpackedExtension");
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.cc b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
index d503e65..3a5ba35 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "content/public/common/drop_data.h"
@@ -63,7 +62,7 @@ void InstallExtensionHandler::RegisterMessages() {
void InstallExtensionHandler::HandleStartDragMessage(
const base::ListValue* args) {
content::DropData* drop_data =
- web_ui()->GetWebContents()->GetView()->GetDropData();
+ web_ui()->GetWebContents()->GetDropData();
if (!drop_data) {
DLOG(ERROR) << "No current drop data.";
return;
diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
index 717fb51..e7de840 100644
--- a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/extensions/extension_creator.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "grit/generated_resources.h"
@@ -195,7 +194,7 @@ void PackExtensionHandler::HandleSelectFilePathMessage(
&info,
file_type_index,
base::FilePath::StringType(),
- web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
+ web_ui()->GetWebContents()->GetTopLevelNativeWindow(),
NULL);
}
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
index 74d7650..a2d593f 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
@@ -31,7 +31,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -114,7 +113,7 @@ void ForeignSessionHandler::OpenForeignSessionWindows(
iter_begin + 1;
chrome::HostDesktopType host_desktop_type =
chrome::GetHostDesktopTypeForNativeView(
- web_ui->GetWebContents()->GetView()->GetNativeView());
+ web_ui->GetWebContents()->GetNativeView());
SessionRestore::RestoreForeignSessionWindows(
Profile::FromWebUI(web_ui), host_desktop_type, iter_begin, iter_end);
}
diff --git a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
index 0121b91..edd653e 100644
--- a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
+++ b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "ui/base/webui/web_ui_util.h"
@@ -86,7 +85,7 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const base::ListValue* args) {
return;
chrome::HostDesktopType host_desktop_type =
chrome::GetHostDesktopTypeForNativeView(
- web_ui()->GetWebContents()->GetView()->GetNativeView());
+ web_ui()->GetWebContents()->GetNativeView());
WindowOpenDisposition disposition = webui::GetDispositionFromClick(args, 2);
tab_restore_service_->RestoreEntryById(delegate,
static_cast<int>(session_to_restore),
diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
index ac1ca82..de9080e 100644
--- a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/browser_process.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/views/win/hwnd_util.h"
using content::BrowserThread;
@@ -62,7 +61,7 @@ void AdvancedOptionsUtilities::ShowManageSSLCertificates(
CRYPTUI_CERT_MGR_STRUCT cert_mgr = { 0 };
cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT);
cert_mgr.hwndParent = views::HWNDForNativeWindow(
- web_contents->GetView()->GetTopLevelNativeWindow());
+ web_contents->GetTopLevelNativeWindow());
::CryptUIDlgCertMgr(&cert_mgr);
}
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 3b0907e..f334475 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -82,7 +82,6 @@
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/page_zoom.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "google_apis/gaia/google_service_auth_error.h"
@@ -1362,7 +1361,7 @@ void BrowserOptionsHandler::HandleSelectDownloadLocation(
&info,
0,
base::FilePath::StringType(),
- web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
+ web_ui()->GetWebContents()->GetTopLevelNativeWindow(),
NULL);
}
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index a94fd71..f5d3573 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -26,7 +26,6 @@
#include "chrome/browser/ui/webui/certificate_viewer_webui.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "net/base/crypto_module.h"
#include "net/base/net_errors.h"
@@ -1154,7 +1153,7 @@ void CertificateManagerHandler::ShowImportErrors(
}
gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
- return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
+ return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
}
} // namespace options
diff --git a/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc
index f78d184..de42877 100644
--- a/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.cc
@@ -11,7 +11,6 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/system_clock_client.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -73,7 +72,7 @@ void DateTimeOptionsHandler::HandleShowSetTime(const base::ListValue* args) {
// Make sure the clock status hasn't changed since the button was clicked.
if (can_set_time_) {
SetTimeDialog::ShowDialog(
- web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow());
+ web_ui()->GetWebContents()->GetTopLevelNativeWindow());
}
}
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index 9dd7a057..f236d88 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -54,7 +54,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "grit/ash_resources.h"
#include "grit/locale_settings.h"
@@ -1639,7 +1638,7 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback(
}
gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const {
- return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
+ return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
}
void InternetOptionsHandler::NetworkCommandCallback(
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index b3125a6..9ad56cd 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -21,7 +21,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -41,7 +40,7 @@ Profile* PasswordManagerHandler::GetProfile() {
#if !defined(OS_ANDROID)
gfx::NativeWindow PasswordManagerHandler::GetNativeWindow() {
- return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
+ return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
}
#endif
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 6534f82..7b4a5b3 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -58,7 +58,6 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "google_apis/gaia/oauth2_token_service.h"
#include "printing/backend/print_backend.h"
@@ -829,7 +828,7 @@ void PrintPreviewHandler::PrintToPdf() {
PostPrintToPdfTask();
} else if (!select_file_dialog_.get() ||
!select_file_dialog_->IsRunning(platform_util::GetTopLevel(
- preview_web_contents()->GetView()->GetNativeView()))) {
+ preview_web_contents()->GetNativeView()))) {
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
web_ui()->GetController());
// Pre-populating select file dialog with print job title.
@@ -938,7 +937,7 @@ void PrintPreviewHandler::PrintWithCloudPrintDialog() {
}
gfx::NativeWindow modal_parent = platform_util::GetTopLevel(
- preview_web_contents()->GetView()->GetNativeView());
+ preview_web_contents()->GetNativeView());
print_dialog_cloud::CreatePrintDialogForBytes(
preview_web_contents()->GetBrowserContext(),
modal_parent,
@@ -1234,8 +1233,7 @@ void PrintPreviewHandler::SelectFile(const base::FilePath& default_filename) {
&file_type_info,
0,
base::FilePath::StringType(),
- platform_util::GetTopLevel(
- preview_web_contents()->GetView()->GetNativeView()),
+ platform_util::GetTopLevel(preview_web_contents()->GetNativeView()),
NULL);
}
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index 959aa48..6a968d9 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -519,7 +519,7 @@ void PrintPreviewUI::OnDidPreviewPage(int page_number,
base::FundamentalValue ui_identifier(id_);
base::FundamentalValue request_id(preview_request_id);
if (g_testing_delegate)
- g_testing_delegate->DidRenderPreviewPage(*web_ui()->GetWebContents());
+ g_testing_delegate->DidRenderPreviewPage(web_ui()->GetWebContents());
web_ui()->CallJavascriptFunction(
"onDidPreviewPage", number, ui_identifier, request_id);
if (g_testing_delegate && g_testing_delegate->IsAutoCancelEnabled())
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.h b/chrome/browser/ui/webui/print_preview/print_preview_ui.h
index 5d68c3b..7f32261 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.h
@@ -149,8 +149,7 @@ class PrintPreviewUI : public ConstrainedWebDialogUI {
public:
virtual bool IsAutoCancelEnabled() = 0;
virtual void DidGetPreviewPageCount(int page_count) = 0;
- virtual void DidRenderPreviewPage(
- const content::WebContents& preview_dialog) = 0;
+ virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0;
};
static void SetDelegateForTesting(TestingDelegate* delegate);
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc
index b0fe640..c3845c8 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc
@@ -25,7 +25,6 @@
#include "content/public/test/test_utils.h"
#if defined(OS_WIN)
-#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#endif
@@ -159,8 +158,7 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTest, WindowedNPAPIPluginHidden) {
// Now get the region of the plugin before and after the print preview is
// shown. They should be different.
- HWND hwnd = tab->GetView()->GetNativeView()->GetHost()->
- GetAcceleratedWidget();
+ HWND hwnd = tab->GetNativeView()->GetHost()->GetAcceleratedWidget();
HWND child = NULL;
EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
diff --git a/chrome/browser/ui/webui/set_as_default_browser_ui.cc b/chrome/browser/ui/webui/set_as_default_browser_ui.cc
index dbaa853..6dbcd99 100644
--- a/chrome/browser/ui/webui/set_as_default_browser_ui.cc
+++ b/chrome/browser/ui/webui/set_as_default_browser_ui.cc
@@ -31,7 +31,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "content/public/browser/web_ui_message_handler.h"
@@ -352,7 +351,7 @@ void SetAsDefaultBrowserDialogImpl::OnDialogClosed(
browser_->tab_strip_model()->GetActiveWebContents();
window->Show();
if (contents)
- contents->GetView()->SetInitialFocus();
+ contents->SetInitialFocus();
}
}
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index 492559c..594aff0 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "google_apis/gaia/gaia_auth_fetcher.h"
#include "google_apis/gaia/gaia_constants.h"
@@ -202,7 +201,7 @@ void UserManagerScreenHandler::HandleInitialize(const base::ListValue* args) {
SendUserList();
web_ui()->CallJavascriptFunction("cr.ui.Oobe.showUserManagerScreen");
desktop_type_ = chrome::GetHostDesktopTypeForNativeView(
- web_ui()->GetWebContents()->GetView()->GetNativeView());
+ web_ui()->GetWebContents()->GetNativeView());
}
void UserManagerScreenHandler::HandleAddUser(const base::ListValue* args) {
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 39ab299..5c23911 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -64,7 +64,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/geoposition.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/download_test_observer.h"
diff --git a/chrome/test/base/web_ui_browsertest.cc b/chrome/test/base/web_ui_browsertest.cc
index 36e5557..1e07c09 100644
--- a/chrome/test/base/web_ui_browsertest.cc
+++ b/chrome/test/base/web_ui_browsertest.cc
@@ -277,9 +277,8 @@ class PrintContentBrowserClient : public chrome::ChromeContentBrowserClient {
private:
// ChromeContentBrowserClient implementation:
- virtual content::WebContentsViewPort* OverrideCreateWebContentsView(
- content::WebContents* web_contents,
- content::RenderViewHostDelegateView** view) OVERRIDE {
+ virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate(
+ content::WebContents* web_contents) OVERRIDE {
preview_dialog_ = web_contents;
observer_.reset(new WebUIJsInjectionReadyObserver(
preview_dialog_, browser_test_, preload_test_fixture_,
diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc
index 1f412c5..5c741b4 100644
--- a/components/autofill/content/browser/risk/fingerprint.cc
+++ b/components/autofill/content/browser/risk/fingerprint.cc
@@ -34,7 +34,6 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/geoposition.h"
#include "content/public/common/webplugininfo.h"
#include "gpu/config/gpu_info.h"
@@ -531,7 +530,7 @@ void GetFingerprintInternal(
void GetFingerprint(
uint64 obfuscated_gaia_id,
const gfx::Rect& window_bounds,
- const content::WebContents& web_contents,
+ content::WebContents* web_contents,
const std::string& version,
const std::string& charset,
const std::string& accept_languages,
@@ -539,12 +538,11 @@ void GetFingerprint(
const std::string& app_locale,
const std::string& user_agent,
const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
- gfx::Rect content_bounds;
- web_contents.GetView()->GetContainerBounds(&content_bounds);
+ gfx::Rect content_bounds = web_contents->GetContainerBounds();
blink::WebScreenInfo screen_info;
content::RenderWidgetHostView* host_view =
- web_contents.GetRenderWidgetHostView();
+ web_contents->GetRenderWidgetHostView();
if (host_view)
host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info);
diff --git a/components/autofill/content/browser/risk/fingerprint.h b/components/autofill/content/browser/risk/fingerprint.h
index 9b490c3..6cef2f9 100644
--- a/components/autofill/content/browser/risk/fingerprint.h
+++ b/components/autofill/content/browser/risk/fingerprint.h
@@ -53,7 +53,7 @@ class Fingerprint;
void GetFingerprint(
uint64 obfuscated_gaia_id,
const gfx::Rect& window_bounds,
- const content::WebContents& web_contents,
+ content::WebContents* web_contents,
const std::string& version,
const std::string& charset,
const std::string& accept_languages,
diff --git a/components/web_contents_delegate_android/color_chooser_android.cc b/components/web_contents_delegate_android/color_chooser_android.cc
index a1dcf40..d946fa9 100644
--- a/components/web_contents_delegate_android/color_chooser_android.cc
+++ b/components/web_contents_delegate_android/color_chooser_android.cc
@@ -8,7 +8,6 @@
#include "base/android/jni_string.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/color_suggestion.h"
#include "jni/ColorChooserAndroid_jni.h"
diff --git a/components/web_modal/web_contents_modal_dialog_manager.cc b/components/web_modal/web_contents_modal_dialog_manager.cc
index a182acb..a837bcc 100644
--- a/components/web_modal/web_contents_modal_dialog_manager.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager.cc
@@ -9,7 +9,6 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
using content::WebContents;
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 73d885e..bca737d 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -275,8 +275,9 @@ void ContentViewCoreImpl::InitWebContents() {
this, NOTIFICATION_WEB_CONTENTS_CONNECTED,
Source<WebContents>(web_contents_));
- static_cast<WebContentsViewAndroid*>(web_contents_->GetView())->
- SetContentViewCore(this);
+ static_cast<WebContentsViewAndroid*>(
+ static_cast<WebContentsImpl*>(web_contents_)->GetView())->
+ SetContentViewCore(this);
DCHECK(!web_contents_->GetUserData(kContentViewUserDataKey));
web_contents_->SetUserData(kContentViewUserDataKey,
new ContentViewUserData(this));
@@ -422,13 +423,6 @@ void ContentViewCoreImpl::PauseOrResumeGeolocation(bool should_pause) {
}
}
-void ContentViewCoreImpl::OnTabCrashed() {
- JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
- return;
-}
-
// All positions and sizes are in CSS pixels.
// Note that viewport_width/height is a best effort based.
// ContentViewCore has the actual information about the physical viewport size.
@@ -1656,8 +1650,8 @@ void ContentViewCoreImpl::OnSmartClipDataExtracted(
}
void ContentViewCoreImpl::WebContentsDestroyed(WebContents* web_contents) {
- WebContentsViewAndroid* wcva =
- static_cast<WebContentsViewAndroid*>(web_contents->GetView());
+ WebContentsViewAndroid* wcva = static_cast<WebContentsViewAndroid*>(
+ static_cast<WebContentsImpl*>(web_contents)->GetView());
DCHECK(wcva);
wcva->SetContentViewCore(NULL);
}
diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h
index e1ebb3a..07e2dd1 100644
--- a/content/browser/android/content_view_core_impl.h
+++ b/content/browser/android/content_view_core_impl.h
@@ -239,8 +239,6 @@ class ContentViewCoreImpl : public ContentViewCore,
// Hides a visible popup menu.
void HideSelectPopupMenu();
- void OnTabCrashed();
-
// All sizes and offsets are in CSS pixels as cached by the renderer.
void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset,
float page_scale_factor,
diff --git a/content/browser/android/download_controller_android_impl.cc b/content/browser/android/download_controller_android_impl.cc
index 16864ab..2d04235 100644
--- a/content/browser/android/download_controller_android_impl.cc
+++ b/content/browser/android/download_controller_android_impl.cc
@@ -22,7 +22,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_url_parameters.h"
#include "content/public/browser/global_request_id.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/referrer.h"
#include "jni/DownloadController_jni.h"
#include "net/cookies/cookie_options.h"
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 5e398bf..9480e9d 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -35,7 +35,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/drop_data.h"
#include "content/public/common/media_stream_request.h"
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index 15a232d..b103c7f 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -24,10 +24,10 @@
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/site_instance_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/port/browser/render_view_host_delegate_view.h"
-#include "content/port/browser/web_contents_view_port.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
@@ -283,7 +283,7 @@ void InterstitialPageImpl::Hide() {
if (render_view_host_->GetView() &&
render_view_host_->GetView()->HasFocus() &&
controller_->delegate()->GetRenderViewHost()->GetView()) {
- controller_->delegate()->GetRenderViewHost()->GetView()->Focus();
+ controller_->delegate()->GetRenderViewHost()->Focus();
}
// Delete this and call Shutdown on the RVH asynchronously, as we may have
@@ -576,11 +576,10 @@ RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() {
WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
if (!enabled() || !create_view_)
return NULL;
- WebContentsView* web_contents_view = web_contents()->GetView();
- WebContentsViewPort* web_contents_view_port =
- static_cast<WebContentsViewPort*>(web_contents_view);
+ WebContentsView* wcv =
+ static_cast<WebContentsImpl*>(web_contents())->GetView();
RenderWidgetHostViewBase* view =
- web_contents_view_port->CreateViewForWidget(render_view_host_);
+ wcv->CreateViewForWidget(render_view_host_);
render_view_host_->SetView(view);
render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION);
@@ -592,10 +591,10 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
false);
controller_->delegate()->RenderFrameForInterstitialPageCreated(
frame_tree_.root()->current_frame_host());
- view->SetSize(web_contents_view->GetContainerSize());
+ view->SetSize(web_contents()->GetContainerBounds().size());
// Don't show the interstitial until we have navigated to it.
view->Hide();
- return web_contents_view;
+ return wcv;
}
void InterstitialPageImpl::Proceed() {
@@ -703,7 +702,7 @@ void InterstitialPageImpl::Focus() {
// Focus the native window.
if (!enabled())
return;
- render_view_host_->GetView()->Focus();
+ render_view_host_->Focus();
}
void InterstitialPageImpl::FocusThroughTabTraversal(bool reverse) {
diff --git a/content/browser/frame_host/interstitial_page_impl.h b/content/browser/frame_host/interstitial_page_impl.h
index cc9dc63..8cb1419 100644
--- a/content/browser/frame_host/interstitial_page_impl.h
+++ b/content/browser/frame_host/interstitial_page_impl.h
@@ -27,7 +27,6 @@ class NavigationControllerImpl;
class RenderViewHostImpl;
class RenderWidgetHostView;
class WebContentsView;
-class WebContentsImpl;
enum ResourceRequestAction {
BLOCK,
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index bf4312e..e3847f9 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1070,7 +1070,7 @@ void RenderFrameHostManager::CommitPending() {
delegate_->SetFocusToLocationBar(false);
} else if (focus_render_view &&
render_frame_host_->render_view_host()->GetView()) {
- render_frame_host_->render_view_host()->GetView()->Focus();
+ render_frame_host_->render_view_host()->Focus();
}
// Notify that we've swapped RenderFrameHosts. We do this before shutting down
diff --git a/content/browser/media/webrtc_internals.cc b/content/browser/media/webrtc_internals.cc
index 7a1254c..ccee569 100644
--- a/content/browser/media/webrtc_internals.cc
+++ b/content/browser/media/webrtc_internals.cc
@@ -6,12 +6,12 @@
#include "base/command_line.h"
#include "content/browser/media/webrtc_internals_ui_observer.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
using base::ProcessId;
@@ -232,7 +232,7 @@ void WebRTCInternals::EnableAecDump(content::WebContents* web_contents) {
NULL,
0,
FILE_PATH_LITERAL(""),
- web_contents->GetView()->GetTopLevelNativeWindow(),
+ web_contents->GetTopLevelNativeWindow(),
NULL);
#endif
#endif
diff --git a/content/browser/web_contents/aura/gesture_nav_simple.cc b/content/browser/web_contents/aura/gesture_nav_simple.cc
index 7ae0557..44f16bc 100644
--- a/content/browser/web_contents/aura/gesture_nav_simple.cc
+++ b/content/browser/web_contents/aura/gesture_nav_simple.cc
@@ -8,8 +8,8 @@
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/renderer_host/overscroll_controller.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/overscroll_configuration.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_client.h"
#include "grit/ui_resources.h"
#include "ui/aura/window.h"
@@ -159,7 +159,7 @@ void GestureNavSimple::ApplyEffectsForDelta(float delta_x) {
}
gfx::Rect GestureNavSimple::GetVisibleBounds() const {
- return web_contents_->GetView()->GetNativeView()->bounds();
+ return web_contents_->GetNativeView()->bounds();
}
void GestureNavSimple::OnOverscrollUpdate(float delta_x, float delta_y) {
@@ -199,7 +199,7 @@ void GestureNavSimple::OnOverscrollModeChange(OverscrollMode old_mode,
arrow_->set_delegate(arrow_delegate_.get());
arrow_->SetFillsBoundsOpaquely(false);
- aura::Window* window = web_contents_->GetView()->GetNativeView();
+ aura::Window* window = web_contents_->GetNativeView();
const gfx::Rect& window_bounds = window->bounds();
completion_threshold_ = window_bounds.width() *
GetOverscrollConfig(OVERSCROLL_CONFIG_HORIZ_THRESHOLD_COMPLETE);
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
index 1e24364..829b7dc 100644
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
@@ -6,8 +6,8 @@
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/web_contents/aura/image_window_delegate.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/view_messages.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/test/test_render_view_host.h"
#include "content/test/test_web_contents.h"
diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
index c1641dc..0479984 100644
--- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
+++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
@@ -12,7 +12,6 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/browser/web_contents/web_contents_view_aura.h"
#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
@@ -140,8 +139,7 @@ class TouchEditableImplAuraTest : public ContentBrowserTest {
ASSERT_TRUE(test_server()->Start());
GURL test_url(test_server()->GetURL(url));
NavigateToURL(shell(), test_url);
- aura::Window* content =
- shell()->web_contents()->GetView()->GetContentNativeView();
+ aura::Window* content = shell()->web_contents()->GetContentNativeView();
content->GetHost()->SetBounds(gfx::Rect(800, 600));
}
@@ -176,7 +174,7 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
view_aura->SetTouchEditableForTest(touch_editable);
RenderWidgetHostViewAura* rwhva = static_cast<RenderWidgetHostViewAura*>(
web_contents->GetRenderWidgetHostView());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
gfx::Rect bounds = content->GetBoundsInRootWindow();
@@ -362,7 +360,7 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
view_aura->SetTouchEditableForTest(touch_editable);
RenderWidgetHostViewAura* rwhva = static_cast<RenderWidgetHostViewAura*>(
web_contents->GetRenderWidgetHostView());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
gfx::Rect bounds = content->GetBoundsInRootWindow();
EXPECT_EQ(GetRenderWidgetHostViewAura(touch_editable), rwhva);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5e97aa8..d3a3145 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -74,7 +74,6 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
@@ -96,6 +95,7 @@
#if defined(OS_ANDROID)
#include "content/browser/android/date_time_chooser_android.h"
+#include "content/browser/media/android/browser_media_player_manager.h"
#include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h"
#include "content/browser/web_contents/web_contents_android.h"
#include "content/common/java_bridge_messages.h"
@@ -1025,7 +1025,7 @@ WebContents* WebContentsImpl::Clone() {
// We pass our own opener so that the cloned page can access it if it was
// before.
CreateParams create_params(GetBrowserContext(), GetSiteInstance());
- create_params.initial_size = view_->GetContainerSize();
+ create_params.initial_size = GetContainerBounds().size();
WebContentsImpl* tc = CreateWithOpener(create_params, opener_);
tc->GetController().CopyStateFrom(controller_);
FOR_EACH_OBSERVER(WebContentsObserver,
@@ -1068,30 +1068,24 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
params.browser_context, params.site_instance, params.routing_id,
params.main_frame_routing_id);
- view_.reset(GetContentClient()->browser()->
- OverrideCreateWebContentsView(this, &render_view_host_delegate_view_));
- if (view_) {
- CHECK(render_view_host_delegate_view_);
+ WebContentsViewDelegate* delegate =
+ GetContentClient()->browser()->GetWebContentsViewDelegate(this);
+
+ if (browser_plugin_guest_) {
+ scoped_ptr<WebContentsView> platform_view(CreateWebContentsView(
+ this, delegate, &render_view_host_delegate_view_));
+
+ WebContentsViewGuest* rv = new WebContentsViewGuest(
+ this, browser_plugin_guest_.get(), platform_view.Pass(),
+ render_view_host_delegate_view_);
+ render_view_host_delegate_view_ = rv;
+ view_.reset(rv);
} else {
- WebContentsViewDelegate* delegate =
- GetContentClient()->browser()->GetWebContentsViewDelegate(this);
-
- if (browser_plugin_guest_) {
- scoped_ptr<WebContentsViewPort> platform_view(CreateWebContentsView(
- this, delegate, &render_view_host_delegate_view_));
-
- WebContentsViewGuest* rv = new WebContentsViewGuest(
- this, browser_plugin_guest_.get(), platform_view.Pass(),
- render_view_host_delegate_view_);
- render_view_host_delegate_view_ = rv;
- view_.reset(rv);
- } else {
- // Regular WebContentsView.
- view_.reset(CreateWebContentsView(
- this, delegate, &render_view_host_delegate_view_));
- }
- CHECK(render_view_host_delegate_view_);
+ // Regular WebContentsView.
+ view_.reset(CreateWebContentsView(
+ this, delegate, &render_view_host_delegate_view_));
}
+ CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
gfx::Size initial_size = params.initial_size;
@@ -1428,7 +1422,7 @@ void WebContentsImpl::CreateNewWindow(
create_params.main_frame_routing_id = main_frame_route_id;
if (!is_guest) {
create_params.context = view_->GetNativeView();
- create_params.initial_size = view_->GetContainerSize();
+ create_params.initial_size = GetContainerBounds().size();
} else {
// This makes |new_contents| act as a guest.
// For more info, see comment above class BrowserPluginGuest.
@@ -1448,7 +1442,7 @@ void WebContentsImpl::CreateNewWindow(
// will be shown immediately).
if (!params.opener_suppressed) {
if (!is_guest) {
- WebContentsViewPort* new_view = new_contents->view_.get();
+ WebContentsView* new_view = new_contents->view_.get();
// TODO(brettw): It seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
@@ -1948,6 +1942,48 @@ void WebContentsImpl::ExecuteCustomContextMenuCommand(
focused_frame->GetRoutingID(), context, action));
}
+gfx::NativeView WebContentsImpl::GetNativeView() {
+ return view_->GetNativeView();
+}
+
+gfx::NativeView WebContentsImpl::GetContentNativeView() {
+ return view_->GetContentNativeView();
+}
+
+gfx::NativeWindow WebContentsImpl::GetTopLevelNativeWindow() {
+ return view_->GetTopLevelNativeWindow();
+}
+
+gfx::Rect WebContentsImpl::GetViewBounds() {
+ return view_->GetViewBounds();
+}
+
+gfx::Rect WebContentsImpl::GetContainerBounds() {
+ gfx::Rect rv;
+ view_->GetContainerBounds(&rv);
+ return rv;
+}
+
+DropData* WebContentsImpl::GetDropData() {
+ return view_->GetDropData();
+}
+
+void WebContentsImpl::Focus() {
+ view_->Focus();
+}
+
+void WebContentsImpl::SetInitialFocus() {
+ view_->SetInitialFocus();
+}
+
+void WebContentsImpl::StoreFocus() {
+ view_->StoreFocus();
+}
+
+void WebContentsImpl::RestoreFocus() {
+ view_->RestoreFocus();
+}
+
void WebContentsImpl::FocusThroughTabTraversal(bool reverse) {
if (ShowingInterstitialPage()) {
GetRenderManager()->interstitial_page()->FocusThroughTabTraversal(reverse);
@@ -3266,7 +3302,11 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh,
SetIsLoading(rvh, false, true, NULL);
NotifyDisconnected();
SetIsCrashed(status, error_code);
- GetView()->OnTabCrashed(GetCrashedStatus(), crashed_error_code_);
+
+#if defined(OS_ANDROID)
+ if (GetRenderViewHostImpl()->media_player_manager())
+ GetRenderViewHostImpl()->media_player_manager()->DestroyAllMediaPlayers();
+#endif
FOR_EACH_OBSERVER(WebContentsObserver,
observers_,
@@ -3800,6 +3840,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
}
#if defined(OS_ANDROID)
+
base::android::ScopedJavaLocalRef<jobject>
WebContentsImpl::GetJavaWebContents() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -3818,6 +3859,27 @@ bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {
MSG_ROUTING_NONE,
NULL);
}
+
+#elif defined(OS_MACOSX)
+
+void WebContentsImpl::SetAllowOverlappingViews(bool overlapping) {
+ view_->SetAllowOverlappingViews(overlapping);
+}
+
+bool WebContentsImpl::GetAllowOverlappingViews() {
+ return view_->GetAllowOverlappingViews();
+}
+
+void WebContentsImpl::SetOverlayView(WebContents* overlay,
+ const gfx::Point& offset) {
+ view_->SetOverlayView(static_cast<WebContentsImpl*>(overlay)->GetView(),
+ offset);
+}
+
+void WebContentsImpl::RemoveOverlayView() {
+ view_->RemoveOverlayView();
+}
+
#endif
void WebContentsImpl::OnDialogClosed(int render_process_id,
@@ -3860,7 +3922,7 @@ void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
RenderWidgetHostViewBase* rwh_view = view_->CreateViewForWidget(rvh);
// Can be NULL during tests.
if (rwh_view)
- rwh_view->SetSize(GetView()->GetContainerSize());
+ rwh_view->SetSize(GetContainerBounds().size());
}
bool WebContentsImpl::IsHidden() {
@@ -3908,12 +3970,12 @@ void WebContentsImpl::ClearAllPowerSaveBlockers() {
power_save_blockers_.clear();
}
-gfx::Size WebContentsImpl::GetSizeForNewRenderView() const {
+gfx::Size WebContentsImpl::GetSizeForNewRenderView() {
gfx::Size size;
if (delegate_)
size = delegate_->GetSizeForNewRenderView(this);
if (size.IsEmpty())
- size = view_->GetContainerSize();
+ size = GetContainerBounds().size();
return size;
}
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 0482083..1aa619a 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -63,7 +63,7 @@ class TestWebContents;
class WebContentsDelegate;
class WebContentsImpl;
class WebContentsObserver;
-class WebContentsViewPort;
+class WebContentsView;
class WebContentsViewDelegate;
struct AXEventNotificationDetails;
struct ColorSuggestion;
@@ -74,7 +74,7 @@ struct ResourceRequestDetails;
// Factory function for the implementations that content knows about. Takes
// ownership of |delegate|.
-WebContentsViewPort* CreateWebContentsView(
+WebContentsView* CreateWebContentsView(
WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate,
RenderViewHostDelegateView** render_view_host_delegate_view);
@@ -174,6 +174,8 @@ class CONTENT_EXPORT WebContentsImpl
RenderViewHost* render_view_host,
const ResourceRedirectDetails& details);
+ WebContentsView* GetView() const;
+
// WebContents ------------------------------------------------------
virtual WebContentsDelegate* GetDelegate() OVERRIDE;
virtual void SetDelegate(WebContentsDelegate* delegate) OVERRIDE;
@@ -196,7 +198,6 @@ class CONTENT_EXPORT WebContentsImpl
virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE;
virtual RenderWidgetHostView* GetFullscreenRenderWidgetHostView() const
OVERRIDE;
- virtual WebContentsView* GetView() const OVERRIDE;
virtual WebUI* CreateWebUI(const GURL& url) OVERRIDE;
virtual WebUI* GetWebUI() const OVERRIDE;
virtual WebUI* GetCommittedWebUI() const OVERRIDE;
@@ -254,6 +255,16 @@ class CONTENT_EXPORT WebContentsImpl
const CustomContextMenuContext& context) OVERRIDE;
virtual void ExecuteCustomContextMenuCommand(
int action, const CustomContextMenuContext& context) OVERRIDE;
+ virtual gfx::NativeView GetNativeView() OVERRIDE;
+ virtual gfx::NativeView GetContentNativeView() OVERRIDE;
+ virtual gfx::NativeWindow GetTopLevelNativeWindow() OVERRIDE;
+ virtual gfx::Rect GetContainerBounds() OVERRIDE;
+ virtual gfx::Rect GetViewBounds() OVERRIDE;
+ virtual DropData* GetDropData() OVERRIDE;
+ virtual void Focus() OVERRIDE;
+ virtual void SetInitialFocus() OVERRIDE;
+ virtual void StoreFocus() OVERRIDE;
+ virtual void RestoreFocus() OVERRIDE;
virtual void FocusThroughTabTraversal(bool reverse) OVERRIDE;
virtual bool ShowingInterstitialPage() const OVERRIDE;
virtual InterstitialPage* GetInterstitialPage() const OVERRIDE;
@@ -307,6 +318,12 @@ class CONTENT_EXPORT WebContentsImpl
#if defined(OS_ANDROID)
virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents()
OVERRIDE;
+#elif defined(OS_MACOSX)
+ virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE;
+ virtual bool GetAllowOverlappingViews() OVERRIDE;
+ virtual void SetOverlayView(WebContents* overlay,
+ const gfx::Point& offset) OVERRIDE;
+ virtual void RemoveOverlayView() OVERRIDE;
#endif
// Implementation of PageNavigator.
@@ -841,7 +858,7 @@ class CONTENT_EXPORT WebContentsImpl
void ClearAllPowerSaveBlockers();
// Helper function to invoke WebContentsDelegate::GetSizeForNewRenderView().
- gfx::Size GetSizeForNewRenderView() const;
+ gfx::Size GetSizeForNewRenderView();
void OnFrameRemoved(RenderViewHostImpl* render_view_host,
int frame_routing_id);
@@ -865,7 +882,7 @@ class CONTENT_EXPORT WebContentsImpl
NavigationControllerImpl controller_;
// The corresponding view.
- scoped_ptr<WebContentsViewPort> view_;
+ scoped_ptr<WebContentsView> view_;
// The view of the RVHD. Usually this is our WebContentsView implementation,
// but if an embedder uses a different WebContentsView, they'll need to
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index b414ccd..a8ada8f 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -6,6 +6,7 @@
#include "base/values.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/load_notification_details.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_details.h"
@@ -14,7 +15,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
@@ -40,7 +40,8 @@ void ResizeWebContentsView(Shell* shell, const gfx::Size& size,
if (set_start_page)
NavigateToURL(shell, GURL("about://blank"));
#else
- shell->web_contents()->GetView()->SizeContents(size);
+ static_cast<WebContentsImpl*>(shell->web_contents())->GetView()->
+ SizeContents(size);
#endif // defined(OS_MACOSX)
}
@@ -113,8 +114,8 @@ class RenderViewSizeDelegate : public WebContentsDelegate {
// WebContentsDelegate:
virtual gfx::Size GetSizeForNewRenderView(
- const WebContents* web_contents) const OVERRIDE {
- gfx::Size size(web_contents->GetView()->GetContainerSize());
+ WebContents* web_contents) const OVERRIDE {
+ gfx::Size size(web_contents->GetContainerBounds().size());
size.Enlarge(size_insets_.width(), size_insets_.height());
return size;
}
@@ -284,7 +285,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
// When no size is set, RenderWidgetHostView adopts the size of
// WebContentsView.
NavigateToURL(shell(), embedded_test_server()->GetURL("/title2.html"));
- EXPECT_EQ(shell()->web_contents()->GetView()->GetContainerSize(),
+ EXPECT_EQ(shell()->web_contents()->GetContainerBounds().size(),
shell()->web_contents()->GetRenderWidgetHostView()->GetViewBounds().
size());
@@ -308,7 +309,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
#endif
EXPECT_EQ(exp_wcv_size,
- shell()->web_contents()->GetView()->GetContainerSize());
+ shell()->web_contents()->GetContainerBounds().size());
// If WebContentsView is resized after RenderWidgetHostView is created but
// before pending navigation entry is committed, both RenderWidgetHostView and
@@ -334,7 +335,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
GetViewBounds().size();
EXPECT_EQ(new_size, actual_size);
- EXPECT_EQ(new_size, shell()->web_contents()->GetView()->GetContainerSize());
+ EXPECT_EQ(new_size, shell()->web_contents()->GetContainerBounds().size());
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, OpenURLSubframe) {
diff --git a/content/public/browser/web_contents_view.h b/content/browser/web_contents/web_contents_view.h
index 8405945..b2eb509 100644
--- a/content/public/browser/web_contents_view.h
+++ b/content/browser/web_contents/web_contents_view.h
@@ -2,25 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
-#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
+#ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_
+#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_
#include <string>
#include "base/basictypes.h"
-#include "base/process/kill.h"
+#include "base/strings/string16.h"
#include "content/common/content_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
namespace content {
+class RenderViewHost;
+class RenderWidgetHost;
+class RenderWidgetHostViewBase;
struct DropData;
// The WebContentsView is an interface that is implemented by the platform-
// dependent web contents views. The WebContents uses this interface to talk to
// them.
-class CONTENT_EXPORT WebContentsView {
+class WebContentsView {
public:
virtual ~WebContentsView() {}
@@ -40,17 +43,6 @@ class CONTENT_EXPORT WebContentsView {
// the tab in the screen coordinate system.
virtual void GetContainerBounds(gfx::Rect* out) const = 0;
- // Helper function for GetContainerBounds. Most callers just want to know the
- // size, and this makes it more clear.
- gfx::Size GetContainerSize() const {
- gfx::Rect rc;
- GetContainerBounds(&rc);
- return gfx::Size(rc.width(), rc.height());
- }
-
- // Used to notify the view that a tab has crashed.
- virtual void OnTabCrashed(base::TerminationStatus status, int error_code) = 0;
-
// TODO(brettw) this is a hack. It's used in two places at the time of this
// writing: (1) when render view hosts switch, we need to size the replaced
// one to be correct, since it wouldn't have known about sizes that happened
@@ -81,6 +73,36 @@ class CONTENT_EXPORT WebContentsView {
// Get the bounds of the View, relative to the parent.
virtual gfx::Rect GetViewBounds() const = 0;
+ virtual void CreateView(
+ const gfx::Size& initial_size, gfx::NativeView context) = 0;
+
+ // Sets up the View that holds the rendered web page, receives messages for
+ // it and contains page plugins. The host view should be sized to the current
+ // size of the WebContents.
+ virtual RenderWidgetHostViewBase* CreateViewForWidget(
+ RenderWidgetHost* render_widget_host) = 0;
+
+ // Creates a new View that holds a popup and receives messages for it.
+ virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
+ RenderWidgetHost* render_widget_host) = 0;
+
+ // Sets the page title for the native widgets corresponding to the view. This
+ // is not strictly necessary and isn't expected to be displayed anywhere, but
+ // can aid certain debugging tools such as Spy++ on Windows where you are
+ // trying to find a specific window.
+ virtual void SetPageTitle(const base::string16& title) = 0;
+
+ // Invoked when the WebContents is notified that the RenderView has been
+ // fully created.
+ virtual void RenderViewCreated(RenderViewHost* host) = 0;
+
+ // Invoked when the WebContents is notified that the RenderView has been
+ // swapped in.
+ virtual void RenderViewSwappedIn(RenderViewHost* host) = 0;
+
+ // Invoked to enable/disable overscroll gesture navigation.
+ virtual void SetOverscrollControllerEnabled(bool enabled) = 0;
+
#if defined(OS_MACOSX)
// The web contents view assumes that its view will never be overlapped by
// another view (either partially or fully). This allows it to perform
@@ -99,9 +121,17 @@ class CONTENT_EXPORT WebContentsView {
// Removes the previously set overlay view.
virtual void RemoveOverlayView() = 0;
+
+ // If we close the tab while a UI control is in an event-tracking
+ // loop, the control may message freed objects and crash.
+ // WebContents::Close() calls IsEventTracking(), and if it returns
+ // true CloseTabAfterEventTracking() is called and the close is not
+ // completed.
+ virtual bool IsEventTracking() const = 0;
+ virtual void CloseTabAfterEventTracking() = 0;
#endif
};
} // namespace content
-#endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
+#endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc
index 2e9eb2e..3378595 100644
--- a/content/browser/web_contents/web_contents_view_android.cc
+++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -7,7 +7,6 @@
#include "base/logging.h"
#include "content/browser/android/content_view_core_impl.h"
#include "content/browser/frame_host/interstitial_page_impl.h"
-#include "content/browser/media/android/browser_media_player_manager.h"
#include "content/browser/renderer_host/render_widget_host_view_android.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
@@ -15,7 +14,7 @@
#include "content/public/browser/web_contents_delegate.h"
namespace content {
-WebContentsViewPort* CreateWebContentsView(
+WebContentsView* CreateWebContentsView(
WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate,
RenderViewHostDelegateView** render_view_host_delegate_view) {
@@ -76,16 +75,6 @@ void WebContentsViewAndroid::SetPageTitle(const base::string16& title) {
content_view_core_->SetTitle(title);
}
-void WebContentsViewAndroid::OnTabCrashed(base::TerminationStatus status,
- int error_code) {
- RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>(
- web_contents_->GetRenderViewHost());
- if (rvh->media_player_manager())
- rvh->media_player_manager()->DestroyAllMediaPlayers();
- if (content_view_core_)
- content_view_core_->OnTabCrashed();
-}
-
void WebContentsViewAndroid::SizeContents(const gfx::Size& size) {
// TODO(klobag): Do we need to do anything else?
RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_android.h
index 621da26..697dfa4 100644
--- a/content/browser/web_contents/web_contents_view_android.h
+++ b/content/browser/web_contents/web_contents_view_android.h
@@ -6,18 +6,18 @@
#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
#include "base/memory/scoped_ptr.h"
-#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/port/browser/render_view_host_delegate_view.h"
-#include "content/port/browser/web_contents_view_port.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/common/context_menu_params.h"
#include "ui/gfx/rect_f.h"
namespace content {
class ContentViewCoreImpl;
+class WebContentsImpl;
// Android-specific implementation of the WebContentsView.
-class WebContentsViewAndroid : public WebContentsViewPort,
+class WebContentsViewAndroid : public WebContentsView,
public RenderViewHostDelegateView {
public:
WebContentsViewAndroid(WebContentsImpl* web_contents,
@@ -34,8 +34,6 @@ class WebContentsViewAndroid : public WebContentsViewPort,
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE;
- virtual void OnTabCrashed(base::TerminationStatus status,
- int error_code) OVERRIDE;
virtual void SizeContents(const gfx::Size& size) OVERRIDE;
virtual void Focus() OVERRIDE;
virtual void SetInitialFocus() OVERRIDE;
@@ -43,8 +41,6 @@ class WebContentsViewAndroid : public WebContentsViewPort,
virtual void RestoreFocus() OVERRIDE;
virtual DropData* GetDropData() const OVERRIDE;
virtual gfx::Rect GetViewBounds() const OVERRIDE;
-
- // WebContentsViewPort implementation ----------------------------------------
virtual void CreateView(
const gfx::Size& initial_size, gfx::NativeView context) OVERRIDE;
virtual RenderWidgetHostViewBase* CreateViewForWidget(
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 0de1e76..968f902 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -70,7 +70,7 @@
#include "ui/wm/public/drag_drop_delegate.h"
namespace content {
-WebContentsViewPort* CreateWebContentsView(
+WebContentsView* CreateWebContentsView(
WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate,
RenderViewHostDelegateView** render_view_host_delegate_view) {
@@ -159,7 +159,7 @@ class OverscrollWindowDelegate : public ImageWindowDelegate {
web_contents_window()->delegate()->OnGestureEvent(event);
}
- WebContents* web_contents_;
+ WebContentsImpl* web_contents_;
// The window is displayed both during the gesture, and after the gesture
// while the navigation is in progress. During the gesture, it is necessary to
@@ -979,10 +979,6 @@ void WebContentsViewAura::GetContainerBounds(gfx::Rect *out) const {
*out = window_->GetBoundsInScreen();
}
-void WebContentsViewAura::OnTabCrashed(base::TerminationStatus status,
- int error_code) {
-}
-
void WebContentsViewAura::SizeContents(const gfx::Size& size) {
gfx::Rect bounds = window_->bounds();
if (bounds.size() != size) {
@@ -1035,7 +1031,7 @@ gfx::Rect WebContentsViewAura::GetViewBounds() const {
}
////////////////////////////////////////////////////////////////////////////////
-// WebContentsViewAura, WebContentsViewPort implementation:
+// WebContentsViewAura, WebContentsView implementation:
void WebContentsViewAura::CreateView(
const gfx::Size& initial_size, gfx::NativeView context) {
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h
index 934b3b5..a4532e5 100644
--- a/content/browser/web_contents/web_contents_view_aura.h
+++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -10,9 +10,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_export.h"
#include "content/port/browser/render_view_host_delegate_view.h"
-#include "content/port/browser/web_contents_view_port.h"
#include "ui/aura/window_delegate.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/wm/public/drag_drop_delegate.h"
@@ -35,10 +35,10 @@ class WebContentsViewDelegate;
class WebContentsImpl;
class WebDragDestDelegate;
-class CONTENT_EXPORT WebContentsViewAura
- : public WebContentsViewPort,
+class WebContentsViewAura
+ : public WebContentsView,
public RenderViewHostDelegateView,
- NON_EXPORTED_BASE(public OverscrollControllerDelegate),
+ public OverscrollControllerDelegate,
public ui::ImplicitAnimationObserver,
public aura::WindowDelegate,
public aura::client::DragDropDelegate {
@@ -46,9 +46,10 @@ class CONTENT_EXPORT WebContentsViewAura
WebContentsViewAura(WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate);
- void SetupOverlayWindowForTesting();
+ CONTENT_EXPORT void SetupOverlayWindowForTesting();
- void SetTouchEditableForTest(TouchEditableImplAura* touch_editable);
+ CONTENT_EXPORT void SetTouchEditableForTest(
+ TouchEditableImplAura* touch_editable);
private:
class WindowObserver;
@@ -105,8 +106,6 @@ class CONTENT_EXPORT WebContentsViewAura
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
virtual void GetContainerBounds(gfx::Rect *out) const OVERRIDE;
- virtual void OnTabCrashed(base::TerminationStatus status,
- int error_code) OVERRIDE;
virtual void SizeContents(const gfx::Size& size) OVERRIDE;
virtual void Focus() OVERRIDE;
virtual void SetInitialFocus() OVERRIDE;
@@ -114,8 +113,6 @@ class CONTENT_EXPORT WebContentsViewAura
virtual void RestoreFocus() OVERRIDE;
virtual DropData* GetDropData() const OVERRIDE;
virtual gfx::Rect GetViewBounds() const OVERRIDE;
-
- // Overridden from WebContentsViewPort:
virtual void CreateView(
const gfx::Size& initial_size, gfx::NativeView context) OVERRIDE;
virtual RenderWidgetHostViewBase* CreateViewForWidget(
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index adfebd1..92f275da 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -16,9 +16,9 @@
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/frame_host/navigation_entry_screenshot_manager.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
@@ -182,7 +182,7 @@ class WebContentsViewAuraTest : public ContentBrowserTest {
EXPECT_TRUE(controller.CanGoBack());
EXPECT_FALSE(controller.CanGoForward());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
const int kScrollDurationMs = 20;
@@ -319,7 +319,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
web_contents->GetController().GoBack();
EXPECT_EQ(1, GetCurrentIndex());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
ui::EventProcessor* dispatcher = content->GetHost()->event_processor();
gfx::Rect bounds = content->GetBoundsInRootWindow();
@@ -442,7 +442,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_OverscrollScreenshot) {
// index 3 to index 2, and index 3 should have a screenshot.
base::string16 expected_title = base::ASCIIToUTF16("Title: #2");
content::TitleWatcher title_watcher(web_contents, expected_title);
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
generator.GestureScrollSequence(
@@ -582,7 +582,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ExecuteSyncJSFunction(web_contents->GetMainFrame(), "navigate_next()");
EXPECT_EQ(1, GetCurrentIndex());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
generator.GestureScrollSequence(
@@ -591,7 +591,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
base::TimeDelta::FromMilliseconds(20),
1);
- window->AddChild(shell()->web_contents()->GetView()->GetContentNativeView());
+ window->AddChild(shell()->web_contents()->GetContentNativeView());
}
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
@@ -604,7 +604,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ExecuteSyncJSFunction(web_contents->GetMainFrame(), "navigate_next()");
EXPECT_EQ(1, GetCurrentIndex());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
generator.GestureScrollSequence(
@@ -613,7 +613,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
base::TimeDelta::FromMilliseconds(20),
1);
- delete web_contents->GetView()->GetContentNativeView();
+ delete web_contents->GetContentNativeView();
}
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
@@ -644,7 +644,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
EXPECT_TRUE(controller.CanGoBack());
EXPECT_TRUE(controller.CanGoForward());
- aura::Window* content = web_contents->GetView()->GetContentNativeView();
+ aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
aura::test::EventGenerator generator(content->GetRootWindow(), content);
diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc
index e1417e3..9ebb060 100644
--- a/content/browser/web_contents/web_contents_view_guest.cc
+++ b/content/browser/web_contents/web_contents_view_guest.cc
@@ -34,7 +34,7 @@ namespace content {
WebContentsViewGuest::WebContentsViewGuest(
WebContentsImpl* web_contents,
BrowserPluginGuest* guest,
- scoped_ptr<WebContentsViewPort> platform_view,
+ scoped_ptr<WebContentsView> platform_view,
RenderViewHostDelegateView* platform_view_delegate_view)
: web_contents_(web_contents),
guest_(guest),
@@ -57,7 +57,7 @@ gfx::NativeView WebContentsViewGuest::GetContentNativeView() const {
}
gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
- return guest_->embedder_web_contents()->GetView()->GetTopLevelNativeWindow();
+ return guest_->embedder_web_contents()->GetTopLevelNativeWindow();
}
void WebContentsViewGuest::OnGuestInitialized(WebContentsView* parent_view) {
@@ -204,10 +204,6 @@ void WebContentsViewGuest::RestoreFocus() {
platform_view_->RestoreFocus();
}
-void WebContentsViewGuest::OnTabCrashed(base::TerminationStatus status,
- int error_code) {
-}
-
void WebContentsViewGuest::Focus() {
platform_view_->Focus();
}
diff --git a/content/browser/web_contents/web_contents_view_guest.h b/content/browser/web_contents/web_contents_view_guest.h
index f11e491..086b37e 100644
--- a/content/browser/web_contents/web_contents_view_guest.h
+++ b/content/browser/web_contents/web_contents_view_guest.h
@@ -8,10 +8,10 @@
#include <vector>
#include "base/memory/scoped_ptr.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_export.h"
#include "content/common/drag_event_source_info.h"
#include "content/port/browser/render_view_host_delegate_view.h"
-#include "content/port/browser/web_contents_view_port.h"
namespace content {
@@ -19,9 +19,8 @@ class WebContents;
class WebContentsImpl;
class BrowserPluginGuest;
-class CONTENT_EXPORT WebContentsViewGuest
- : public WebContentsViewPort,
- public RenderViewHostDelegateView {
+class WebContentsViewGuest : public WebContentsView,
+ public RenderViewHostDelegateView {
public:
// The corresponding WebContentsImpl is passed in the constructor, and manages
// our lifetime. This doesn't need to be the case, but is this way currently
@@ -30,7 +29,7 @@ class CONTENT_EXPORT WebContentsViewGuest
// |platform_view|.
WebContentsViewGuest(WebContentsImpl* web_contents,
BrowserPluginGuest* guest,
- scoped_ptr<WebContentsViewPort> platform_view,
+ scoped_ptr<WebContentsView> platform_view,
RenderViewHostDelegateView* platform_view_delegate_view);
virtual ~WebContentsViewGuest();
@@ -44,13 +43,10 @@ class CONTENT_EXPORT WebContentsViewGuest
const ContextMenuParams& params) const;
// WebContentsView implementation --------------------------------------------
-
virtual gfx::NativeView GetNativeView() const OVERRIDE;
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE;
- virtual void OnTabCrashed(base::TerminationStatus status,
- int error_code) OVERRIDE;
virtual void SizeContents(const gfx::Size& size) OVERRIDE;
virtual void Focus() OVERRIDE;
virtual void SetInitialFocus() OVERRIDE;
@@ -58,15 +54,6 @@ class CONTENT_EXPORT WebContentsViewGuest
virtual void RestoreFocus() OVERRIDE;
virtual DropData* GetDropData() const OVERRIDE;
virtual gfx::Rect GetViewBounds() const OVERRIDE;
-#if defined(OS_MACOSX)
- virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE;
- virtual bool GetAllowOverlappingViews() const OVERRIDE;
- virtual void SetOverlayView(WebContentsView* overlay,
- const gfx::Point& offset) OVERRIDE;
- virtual void RemoveOverlayView() OVERRIDE;
-#endif
-
- // WebContentsViewPort implementation ----------------------------------------
virtual void CreateView(const gfx::Size& initial_size,
gfx::NativeView context) OVERRIDE;
virtual RenderWidgetHostViewBase* CreateViewForWidget(
@@ -78,6 +65,11 @@ class CONTENT_EXPORT WebContentsViewGuest
virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE;
virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE;
#if defined(OS_MACOSX)
+ virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE;
+ virtual bool GetAllowOverlappingViews() const OVERRIDE;
+ virtual void SetOverlayView(WebContentsView* overlay,
+ const gfx::Point& offset) OVERRIDE;
+ virtual void RemoveOverlayView() OVERRIDE;
virtual bool IsEventTracking() const OVERRIDE;
virtual void CloseTabAfterEventTracking() OVERRIDE;
#endif
@@ -100,7 +92,7 @@ class CONTENT_EXPORT WebContentsViewGuest
BrowserPluginGuest* guest_;
// The platform dependent view backing this WebContentsView.
// Calls to this WebContentsViewGuest are forwarded to |platform_view_|.
- scoped_ptr<WebContentsViewPort> platform_view_;
+ scoped_ptr<WebContentsView> platform_view_;
gfx::Size size_;
// Delegate view for guest's platform view.
diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h
index c531c6a..08fbc4e 100644
--- a/content/browser/web_contents/web_contents_view_mac.h
+++ b/content/browser/web_contents/web_contents_view_mac.h
@@ -12,10 +12,10 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_export.h"
#include "content/common/drag_event_source_info.h"
#include "content/port/browser/render_view_host_delegate_view.h"
-#include "content/port/browser/web_contents_view_port.h"
#include "ui/base/cocoa/base_view.h"
#include "ui/gfx/size.h"
@@ -55,7 +55,7 @@ namespace content {
// Mac-specific implementation of the WebContentsView. It owns an NSView that
// contains all of the contents of the tab and associated child views.
-class WebContentsViewMac : public WebContentsViewPort,
+class WebContentsViewMac : public WebContentsView,
public RenderViewHostDelegateView {
public:
// The corresponding WebContentsImpl is passed in the constructor, and manages
@@ -70,8 +70,6 @@ class WebContentsViewMac : public WebContentsViewPort,
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE;
- virtual void OnTabCrashed(base::TerminationStatus status,
- int error_code) OVERRIDE;
virtual void SizeContents(const gfx::Size& size) OVERRIDE;
virtual void Focus() OVERRIDE;
virtual void SetInitialFocus() OVERRIDE;
@@ -84,8 +82,6 @@ class WebContentsViewMac : public WebContentsViewPort,
virtual void SetOverlayView(WebContentsView* overlay,
const gfx::Point& offset) OVERRIDE;
virtual void RemoveOverlayView() OVERRIDE;
-
- // WebContentsViewPort implementation ----------------------------------------
virtual void CreateView(
const gfx::Size& initial_size, gfx::NativeView context) OVERRIDE;
virtual RenderWidgetHostViewBase* CreateViewForWidget(
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index a1a6e1f..39e579b 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -68,7 +68,7 @@ COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery);
@end
namespace content {
-WebContentsViewPort* CreateWebContentsView(
+WebContentsView* CreateWebContentsView(
WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate,
RenderViewHostDelegateView** render_view_host_delegate_view) {
@@ -152,10 +152,6 @@ void WebContentsViewMac::StartDragging(
offset:offset];
}
-void WebContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */,
- int /* error_code */) {
-}
-
void WebContentsViewMac::SizeContents(const gfx::Size& size) {
// TODO(brettw | japhet) This is a hack and should be removed.
// See web_contents_view.h.
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 8641919..445bbeb 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -11,12 +11,12 @@
#include "content/browser/renderer_host/dip_util.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "content/public/common/bindings_policy.h"
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index 99fc3f0..c1e052e 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -42,7 +42,6 @@
'port/browser/location_provider.h',
'port/browser/render_view_host_delegate_view.h',
'port/browser/vibration_provider.h',
- 'port/browser/web_contents_view_port.h',
'public/browser/access_token_store.h',
'public/browser/android/compositor.h',
'public/browser/android/compositor_client.h',
@@ -207,7 +206,6 @@
'public/browser/web_contents_observer.cc',
'public/browser/web_contents_observer.h',
'public/browser/web_contents_user_data.h',
- 'public/browser/web_contents_view.h',
'public/browser/web_contents_view_delegate.h',
'public/browser/web_drag_dest_delegate.h',
'public/browser/web_ui.h',
@@ -1313,6 +1311,7 @@
'browser/web_contents/web_contents_android.h',
'browser/web_contents/web_contents_impl.cc',
'browser/web_contents/web_contents_impl.h',
+ 'browser/web_contents/web_contents_view.h',
'browser/web_contents/web_contents_view_android.cc',
'browser/web_contents/web_contents_view_android.h',
'browser/web_contents/web_contents_view_aura.cc',
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index 5d6fdd3..9aed0d6 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -202,8 +202,6 @@
'test/test_render_view_host_factory.h',
'test/test_web_contents.cc',
'test/test_web_contents.h',
- 'test/test_web_contents_view.cc',
- 'test/test_web_contents_view.h',
'test/web_gesture_curve_mock.cc',
'test/web_gesture_curve_mock.h',
'test/weburl_loader_mock.cc',
diff --git a/content/port/browser/web_contents_view_port.h b/content/port/browser/web_contents_view_port.h
deleted file mode 100644
index 60632ae..0000000
--- a/content/port/browser/web_contents_view_port.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PORT_BROWSER_WEB_CONTENTS_VIEW_PORT_H_
-#define CONTENT_PORT_BROWSER_WEB_CONTENTS_VIEW_PORT_H_
-
-#include "content/public/browser/web_contents_view.h"
-
-namespace content {
-class RenderViewHost;
-class RenderWidgetHost;
-class RenderWidgetHostViewBase;
-
-// This is the larger WebContentsView interface exposed only within content/ and
-// to embedders looking to port to new platforms.
-class CONTENT_EXPORT WebContentsViewPort : public WebContentsView {
- public:
- virtual ~WebContentsViewPort() {}
-
- virtual void CreateView(
- const gfx::Size& initial_size, gfx::NativeView context) = 0;
-
- // Sets up the View that holds the rendered web page, receives messages for
- // it and contains page plugins. The host view should be sized to the current
- // size of the WebContents.
- virtual RenderWidgetHostViewBase* CreateViewForWidget(
- RenderWidgetHost* render_widget_host) = 0;
-
- // Creates a new View that holds a popup and receives messages for it.
- virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
- RenderWidgetHost* render_widget_host) = 0;
-
- // Sets the page title for the native widgets corresponding to the view. This
- // is not strictly necessary and isn't expected to be displayed anywhere, but
- // can aid certain debugging tools such as Spy++ on Windows where you are
- // trying to find a specific window.
- virtual void SetPageTitle(const base::string16& title) = 0;
-
- // Invoked when the WebContents is notified that the RenderView has been
- // fully created.
- virtual void RenderViewCreated(RenderViewHost* host) = 0;
-
- // Invoked when the WebContents is notified that the RenderView has been
- // swapped in.
- virtual void RenderViewSwappedIn(RenderViewHost* host) = 0;
-
- // Invoked to enable/disable overscroll gesture navigation.
- virtual void SetOverscrollControllerEnabled(bool enabled) = 0;
-
-#if defined(OS_MACOSX)
- // If we close the tab while a UI control is in an event-tracking
- // loop, the control may message freed objects and crash.
- // WebContents::Close() calls IsEventTracking(), and if it returns
- // true CloseTabAfterEventTracking() is called and the close is not
- // completed.
- virtual bool IsEventTracking() const = 0;
- virtual void CloseTabAfterEventTracking() = 0;
-#endif
-};
-
-} // namespace content
-
-#endif // CONTENT_PORT_BROWSER_WEB_CONTENTS_VIEW_PORT_H_
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index ba80b8f..fb8279b 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -15,12 +15,6 @@ BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts(
return NULL;
}
-WebContentsViewPort* ContentBrowserClient::OverrideCreateWebContentsView(
- WebContents* web_contents,
- RenderViewHostDelegateView** render_view_host_delegate_view) {
- return NULL;
-}
-
WebContentsViewDelegate* ContentBrowserClient::GetWebContentsViewDelegate(
WebContents* web_contents) {
return NULL;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index ac40ae2..5f0473b 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -95,14 +95,12 @@ class QuotaPermissionContext;
class RenderFrameHost;
class RenderProcessHost;
class RenderViewHost;
-class RenderViewHostDelegateView;
class ResourceContext;
class SiteInstance;
class SpeechRecognitionManagerDelegate;
class VibrationProvider;
class WebContents;
class WebContentsViewDelegate;
-class WebContentsViewPort;
struct MainFunctionParams;
struct Referrer;
struct ShowDesktopNotificationHostMsgParams;
@@ -135,14 +133,6 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual BrowserMainParts* CreateBrowserMainParts(
const MainFunctionParams& parameters);
- // Allows an embedder to return their own WebContentsViewPort implementation.
- // Return NULL to let the default one for the platform be created. Otherwise
- // |render_view_host_delegate_view| also needs to be provided, and it is
- // owned by the embedder.
- virtual WebContentsViewPort* OverrideCreateWebContentsView(
- WebContents* web_contents,
- RenderViewHostDelegateView** render_view_host_delegate_view);
-
// If content creates the WebContentsView implementation, it will ask the
// embedder to return an (optional) delegate to customize it. The view will
// own the delegate.
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 0e0ed9b..fd31c1a 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -23,7 +23,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/gfx/size.h"
+#include "ui/gfx/rect.h"
#if defined(OS_ANDROID)
#include "base/android/scoped_java_ref.h"
@@ -37,11 +37,6 @@ namespace blink {
struct WebFindOptions;
}
-namespace gfx {
-class Rect;
-class Size;
-}
-
namespace net {
struct LoadStateWithParam;
}
@@ -57,8 +52,8 @@ class RenderViewHost;
class RenderWidgetHostView;
class SiteInstance;
class WebContentsDelegate;
-class WebContentsView;
struct CustomContextMenuContext;
+struct DropData;
struct RendererPreferences;
// WebContents is the core class in content/. A WebContents renders web content
@@ -68,7 +63,7 @@ struct RendererPreferences;
// scoped_ptr<content::WebContents> web_contents(
// content::WebContents::Create(
// content::WebContents::CreateParams(browser_context)));
-// gfx::NativeView view = web_contents->GetView()->GetNativeView();
+// gfx::NativeView view = web_contents->GetNativeView();
// // |view| is an HWND, NSView*, GtkWidget*, etc.; insert it into the view
// // hierarchy wherever it needs to go.
//
@@ -210,9 +205,6 @@ class WebContents : public PageNavigator,
// NULL.
virtual RenderWidgetHostView* GetFullscreenRenderWidgetHostView() const = 0;
- // The WebContentsView will never change and is guaranteed non-NULL.
- virtual WebContentsView* GetView() const = 0;
-
// Create a WebUI page for the given url. In most cases, this doesn't need to
// be called by embedders since content will create its own WebUI objects as
// necessary. However if the embedder wants to create its own WebUI object and
@@ -372,6 +364,42 @@ class WebContents : public PageNavigator,
// Views and focus -----------------------------------------------------------
+ // Returns the native widget that contains the contents of the tab.
+ virtual gfx::NativeView GetNativeView() = 0;
+
+ // Returns the native widget with the main content of the tab (i.e. the main
+ // render view host, though there may be many popups in the tab as children of
+ // the container).
+ virtual gfx::NativeView GetContentNativeView() = 0;
+
+ // Returns the outermost native view. This will be used as the parent for
+ // dialog boxes.
+ virtual gfx::NativeWindow GetTopLevelNativeWindow() = 0;
+
+ // Computes the rectangle for the native widget that contains the contents of
+ // the tab in the screen coordinate system.
+ virtual gfx::Rect GetContainerBounds() = 0;
+
+ // Get the bounds of the View, relative to the parent.
+ virtual gfx::Rect GetViewBounds() = 0;
+
+ // Returns the current drop data, if any.
+ virtual DropData* GetDropData() = 0;
+
+ // Sets focus to the native widget for this tab.
+ virtual void Focus() = 0;
+
+ // Sets focus to the appropriate element when the WebContents is shown the
+ // first time.
+ virtual void SetInitialFocus() = 0;
+
+ // Stores the currently focused view.
+ virtual void StoreFocus() = 0;
+
+ // Restores focus to the last focus view. If StoreFocus has not yet been
+ // invoked, SetInitialFocus is invoked.
+ virtual void RestoreFocus() = 0;
+
// Focuses the first (last if |reverse| is true) element in the page.
// Invoked when this tab is getting the focus through tab traversal (|reverse|
// is true when using Shift-Tab).
@@ -545,6 +573,24 @@ class WebContents : public PageNavigator,
CONTENT_EXPORT static WebContents* FromJavaWebContents(
jobject jweb_contents_android);
virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0;
+#elif defined(OS_MACOSX)
+ // The web contents view assumes that its view will never be overlapped by
+ // another view (either partially or fully). This allows it to perform
+ // optimizations. If the view is in a view hierarchy where it might be
+ // overlapped by another view, notify the view by calling this with |true|.
+ virtual void SetAllowOverlappingViews(bool overlapping) = 0;
+
+ // Returns true if overlapping views are allowed, false otherwise.
+ virtual bool GetAllowOverlappingViews() = 0;
+
+ // To draw two overlapping web contents view, the underlaying one should
+ // know about the overlaying one. Caller must ensure that |overlay| exists
+ // until |RemoveOverlayView| is called.
+ virtual void SetOverlayView(WebContents* overlay,
+ const gfx::Point& offset) = 0;
+
+ // Removes the previously set overlay view.
+ virtual void RemoveOverlayView() = 0;
#endif // OS_ANDROID
private:
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 5346c2a..9a26e0f 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -196,7 +196,7 @@ void WebContentsDelegate::Detach(WebContents* web_contents) {
}
gfx::Size WebContentsDelegate::GetSizeForNewRenderView(
- const WebContents* web_contents) const {
+ WebContents* web_contents) const {
return gfx::Size();
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index d22d7c7..0edb3bd 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -447,8 +447,7 @@ class CONTENT_EXPORT WebContentsDelegate {
// This is optional for implementations of WebContentsDelegate; if the
// delegate doesn't provide a size, the current WebContentsView's size will be
// used.
- virtual gfx::Size GetSizeForNewRenderView(
- const WebContents* web_contents) const;
+ virtual gfx::Size GetSizeForNewRenderView(WebContents* web_contents) const;
// Notification that validation of a form displayed by the |web_contents|
// has failed. There can only be one message per |web_contents| at a time.
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index d81f391..21f48a8 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -14,6 +14,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/values.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/dom_operation_notification_details.h"
#include "content/public/browser/notification_service.h"
@@ -23,7 +24,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/test/test_utils.h"
#include "grit/webui_resources.h"
#include "net/base/filename_util.h"
@@ -221,8 +221,8 @@ void CrashTab(WebContents* web_contents) {
void SimulateMouseClick(WebContents* web_contents,
int modifiers,
blink::WebMouseEvent::Button button) {
- int x = web_contents->GetView()->GetContainerSize().width() / 2;
- int y = web_contents->GetView()->GetContainerSize().height() / 2;
+ int x = web_contents->GetContainerBounds().width() / 2;
+ int y = web_contents->GetContainerBounds().height() / 2;
SimulateMouseClickAt(web_contents, modifiers, button, gfx::Point(x, y));
}
@@ -237,8 +237,7 @@ void SimulateMouseClickAt(WebContents* web_contents,
mouse_event.y = point.y();
mouse_event.modifiers = modifiers;
// Mac needs globalX/globalY for events to plugins.
- gfx::Rect offset;
- web_contents->GetView()->GetContainerBounds(&offset);
+ gfx::Rect offset = web_contents->GetContainerBounds();
mouse_event.globalX = point.x() + offset.x();
mouse_event.globalY = point.y() + offset.y();
mouse_event.clickCount = 1;
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index e55fb85..9fbd5cf 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -18,7 +18,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/renderer_preferences.h"
#include "content/shell/browser/notify_done_forwarder.h"
#include "content/shell/browser/shell_browser_main_parts.h"
@@ -176,7 +175,7 @@ void Shell::LoadURLForFrame(const GURL& url, const std::string& frame_name) {
PAGE_TRANSITION_TYPED | PAGE_TRANSITION_FROM_ADDRESS_BAR);
params.frame_name = frame_name;
web_contents_->GetController().LoadURLWithParams(params);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
void Shell::LoadDataWithBaseURL(const GURL& url, const std::string& data,
@@ -188,7 +187,7 @@ void Shell::LoadDataWithBaseURL(const GURL& url, const std::string& data,
params.virtual_url_for_data_url = url;
params.override_user_agent = NavigationController::UA_OVERRIDE_FALSE;
web_contents_->GetController().LoadURLWithParams(params);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
void Shell::AddNewContents(WebContents* source,
@@ -204,17 +203,17 @@ void Shell::AddNewContents(WebContents* source,
void Shell::GoBackOrForward(int offset) {
web_contents_->GetController().GoToOffset(offset);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
void Shell::Reload() {
web_contents_->GetController().Reload(false);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
void Shell::Stop() {
web_contents_->Stop();
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
}
void Shell::UpdateNavigationControls(bool to_different_document) {
@@ -252,7 +251,7 @@ void Shell::CloseDevTools() {
gfx::NativeView Shell::GetContentView() {
if (!web_contents_)
return NULL;
- return web_contents_->GetView()->GetNativeView();
+ return web_contents_->GetNativeView();
}
WebContents* Shell::OpenURLFromTab(WebContents* source,
diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc
index ccfa1f6..33ee197 100644
--- a/content/shell/browser/shell_aura.cc
+++ b/content/shell/browser/shell_aura.cc
@@ -5,7 +5,6 @@
#include "content/shell/browser/shell.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/shell/browser/shell_platform_data_aura.h"
#include "ui/aura/env.h"
#include "ui/aura/test/test_screen.h"
@@ -50,7 +49,7 @@ void Shell::PlatformCreateWindow(int width, int height) {
void Shell::PlatformSetContents() {
CHECK(platform_);
- aura::Window* content = web_contents_->GetView()->GetNativeView();
+ aura::Window* content = web_contents_->GetNativeView();
aura::Window* parent = platform_->host()->window();
if (parent->Contains(content))
return;
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc
index a25df91..6d0e1f0 100644
--- a/content/shell/browser/shell_devtools_frontend.cc
+++ b/content/shell/browser/shell_devtools_frontend.cc
@@ -13,7 +13,6 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_client.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
@@ -90,7 +89,7 @@ void ShellDevToolsFrontend::Activate() {
}
void ShellDevToolsFrontend::Focus() {
- web_contents()->GetView()->Focus();
+ web_contents()->Focus();
}
void ShellDevToolsFrontend::InspectElementAt(int x, int y) {
diff --git a/content/shell/browser/shell_download_manager_delegate.cc b/content/shell/browser/shell_download_manager_delegate.cc
index 45f86f3..9f37d82 100644
--- a/content/shell/browser/shell_download_manager_delegate.cc
+++ b/content/shell/browser/shell_download_manager_delegate.cc
@@ -19,7 +19,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/shell/browser/webkit_test_controller.h"
#include "content/shell/common/shell_switches.h"
#include "net/base/filename_util.h"
@@ -171,7 +170,7 @@ void ShellDownloadManagerDelegate::ChooseDownloadPath(
OPENFILENAME save_as;
ZeroMemory(&save_as, sizeof(save_as));
save_as.lStructSize = sizeof(OPENFILENAME);
- save_as.hwndOwner = item->GetWebContents()->GetView()->GetNativeView()->
+ save_as.hwndOwner = item->GetWebContents()->GetNativeView()->
GetHost()->GetAcceleratedWidget();
save_as.lpstrFile = file_name;
save_as.nMaxFile = arraysize(file_name);
diff --git a/content/shell/browser/shell_javascript_dialog_manager.cc b/content/shell/browser/shell_javascript_dialog_manager.cc
index ef284e2..ae08633 100644
--- a/content/shell/browser/shell_javascript_dialog_manager.cc
+++ b/content/shell/browser/shell_javascript_dialog_manager.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/shell/browser/shell_javascript_dialog.h"
#include "content/shell/browser/webkit_test_controller.h"
#include "content/shell/common/shell_switches.h"
@@ -55,8 +54,7 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog(
base::string16 new_message_text = net::FormatUrl(origin_url, accept_lang) +
base::ASCIIToUTF16("\n\n") +
message_text;
- gfx::NativeWindow parent_window =
- web_contents->GetView()->GetTopLevelNativeWindow();
+ gfx::NativeWindow parent_window = web_contents->GetTopLevelNativeWindow();
dialog_.reset(new ShellJavaScriptDialog(this,
parent_window,
@@ -99,8 +97,7 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog(
message_text +
base::ASCIIToUTF16("\n\nIs it OK to leave/reload this page?");
- gfx::NativeWindow parent_window =
- web_contents->GetView()->GetTopLevelNativeWindow();
+ gfx::NativeWindow parent_window = web_contents->GetTopLevelNativeWindow();
dialog_.reset(new ShellJavaScriptDialog(this,
parent_window,
diff --git a/content/shell/browser/shell_mac.mm b/content/shell/browser/shell_mac.mm
index a51c852..f332064 100644
--- a/content/shell/browser/shell_mac.mm
+++ b/content/shell/browser/shell_mac.mm
@@ -12,7 +12,6 @@
#include "base/strings/sys_string_conversions.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/shell/app/resource.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
#include "url/gurl.h"
@@ -243,7 +242,7 @@ void Shell::PlatformCreateWindow(int width, int height) {
}
void Shell::PlatformSetContents() {
- NSView* web_view = web_contents_->GetView()->GetNativeView();
+ NSView* web_view = web_contents_->GetNativeView();
[web_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
if (headless_) {
@@ -267,7 +266,7 @@ void Shell::SizeTo(const gfx::Size& content_size) {
[window().contentView setFrame:frame];
return;
}
- NSView* web_view = web_contents_->GetView()->GetNativeView();
+ NSView* web_view = web_contents_->GetNativeView();
NSRect frame = NSMakeRect(0, 0, content_size.width(), content_size.height());
[web_view setFrame:frame];
}
diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc
index 6bc61b1..fda7fbc 100644
--- a/content/shell/browser/shell_views.cc
+++ b/content/shell/browser/shell_views.cc
@@ -8,7 +8,6 @@
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "content/shell/browser/shell_platform_data_aura.h"
#include "ui/aura/client/screen_position_client.h"
@@ -138,7 +137,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView,
web_view_ = new views::WebView(web_contents->GetBrowserContext());
web_view_->SetWebContents(web_contents);
web_view_->SetPreferredSize(size);
- web_contents->GetView()->Focus();
+ web_contents->Focus();
contents_view_->AddChildView(web_view_);
Layout();
@@ -174,7 +173,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView,
// Convert from content coordinates to window coordinates.
// This code copied from chrome_web_contents_view_delegate_views.cc
aura::Window* web_contents_window =
- shell_->web_contents()->GetView()->GetNativeView();
+ shell_->web_contents()->GetNativeView();
aura::Window* root_window = web_contents_window->GetRootWindow();
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(root_window);
@@ -514,7 +513,7 @@ void Shell::PlatformCreateWindow(int width, int height) {
void Shell::PlatformSetContents() {
if (headless_) {
CHECK(platform_);
- aura::Window* content = web_contents_->GetView()->GetNativeView();
+ aura::Window* content = web_contents_->GetNativeView();
aura::Window* parent = platform_->host()->window();
if (!parent->Contains(content)) {
parent->AddChild(content);
diff --git a/content/shell/browser/shell_web_contents_view_delegate_android.cc b/content/shell/browser/shell_web_contents_view_delegate_android.cc
index fb4a3dc..bd2d186 100644
--- a/content/shell/browser/shell_web_contents_view_delegate_android.cc
+++ b/content/shell/browser/shell_web_contents_view_delegate_android.cc
@@ -7,7 +7,6 @@
#include "base/command_line.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "content/shell/browser/shell_web_contents_view_delegate_creator.h"
diff --git a/content/shell/browser/shell_web_contents_view_delegate_mac.mm b/content/shell/browser/shell_web_contents_view_delegate_mac.mm
index cd825d5..375112f 100644
--- a/content/shell/browser/shell_web_contents_view_delegate_mac.mm
+++ b/content/shell/browser/shell_web_contents_view_delegate_mac.mm
@@ -12,7 +12,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
@@ -202,7 +201,7 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
YES,
delegate);
- NSView* parent_view = web_contents_->GetView()->GetContentNativeView();
+ NSView* parent_view = web_contents_->GetContentNativeView();
NSEvent* currentEvent = [NSApp currentEvent];
NSWindow* window = [parent_view window];
NSPoint position = [window mouseLocationOutsideOfEventStream];
@@ -248,15 +247,15 @@ void ShellWebContentsViewDelegate::ActionPerformed(int tag) {
}
case ShellContextMenuItemBackTag:
web_contents_->GetController().GoToOffset(-1);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
break;
case ShellContextMenuItemForwardTag:
web_contents_->GetController().GoToOffset(1);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
break;
case ShellContextMenuItemReloadTag: {
web_contents_->GetController().Reload(false);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
break;
}
case ShellContextMenuItemInspectTag: {
diff --git a/content/shell/browser/shell_web_contents_view_delegate_win.cc b/content/shell/browser/shell_web_contents_view_delegate_win.cc
index 81d9b0d..9eb834d 100644
--- a/content/shell/browser/shell_web_contents_view_delegate_win.cc
+++ b/content/shell/browser/shell_web_contents_view_delegate_win.cc
@@ -10,7 +10,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
@@ -175,14 +174,14 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
#else
gfx::Point screen_point(params.x, params.y);
POINT point = screen_point.ToPOINT();
- ClientToScreen(web_contents_->GetView()->GetNativeView(), &point);
+ ClientToScreen(web_contents_->GetNativeView(), &point);
int selection =
TrackPopupMenu(sub_menu,
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
point.x, point.y,
0,
- web_contents_->GetView()->GetContentNativeView(),
+ web_contents_->GetContentNativeView(),
NULL);
MenuItemSelected(selection);
@@ -216,15 +215,15 @@ void ShellWebContentsViewDelegate::MenuItemSelected(int selection) {
}
case ShellContextMenuItemBackId:
web_contents_->GetController().GoToOffset(-1);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
break;
case ShellContextMenuItemForwardId:
web_contents_->GetController().GoToOffset(1);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
break;
case ShellContextMenuItemReloadId:
web_contents_->GetController().Reload(false);
- web_contents_->GetView()->Focus();
+ web_contents_->Focus();
break;
case ShellContextMenuItemInspectId: {
ShellDevToolsFrontend::Show(web_contents_);
diff --git a/content/shell/browser/webkit_test_controller.cc b/content/shell/browser/webkit_test_controller.cc
index d16986b..3256b20 100644
--- a/content/shell/browser/webkit_test_controller.cc
+++ b/content/shell/browser/webkit_test_controller.cc
@@ -24,7 +24,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/shell/browser/shell.h"
@@ -277,7 +276,7 @@ bool WebKitTestController::PrepareForLayoutTest(
PAGE_TRANSITION_TYPED | PAGE_TRANSITION_FROM_ADDRESS_BAR);
params.should_clear_history_list = true;
main_window_->web_contents()->GetController().LoadURLWithParams(params);
- main_window_->web_contents()->GetView()->Focus();
+ main_window_->web_contents()->Focus();
}
main_window_->web_contents()->GetRenderViewHost()->SetActive(true);
main_window_->web_contents()->GetRenderViewHost()->Focus();
diff --git a/content/test/test_content_browser_client.cc b/content/test/test_content_browser_client.cc
index 7b9d368..c917f25 100644
--- a/content/test/test_content_browser_client.cc
+++ b/content/test/test_content_browser_client.cc
@@ -4,11 +4,8 @@
#include "content/test/test_content_browser_client.h"
-#include <string>
-
#include "base/files/file_path.h"
#include "base/logging.h"
-#include "content/test/test_web_contents_view.h"
namespace content {
@@ -18,18 +15,6 @@ TestContentBrowserClient::TestContentBrowserClient() {
TestContentBrowserClient::~TestContentBrowserClient() {
}
-WebContentsViewPort* TestContentBrowserClient::OverrideCreateWebContentsView(
- WebContents* web_contents,
- RenderViewHostDelegateView** render_view_host_delegate_view) {
-#if defined(OS_IOS)
- return NULL;
-#else
- TestWebContentsView* rv = new TestWebContentsView;
- *render_view_host_delegate_view = rv;
- return rv;
-#endif
-}
-
base::FilePath TestContentBrowserClient::GetDefaultDownloadDirectory() {
if (!download_dir_.IsValid()) {
bool result = download_dir_.CreateUniqueTempDir();
diff --git a/content/test/test_content_browser_client.h b/content/test/test_content_browser_client.h
index f0d58bb..b4ff3f9 100644
--- a/content/test/test_content_browser_client.h
+++ b/content/test/test_content_browser_client.h
@@ -19,10 +19,6 @@ class TestContentBrowserClient : public ContentBrowserClient {
public:
TestContentBrowserClient();
virtual ~TestContentBrowserClient();
-
- virtual WebContentsViewPort* OverrideCreateWebContentsView(
- WebContents* web_contents,
- RenderViewHostDelegateView** render_view_host_delegate_view) OVERRIDE;
virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE;
private:
diff --git a/content/test/test_web_contents_view.cc b/content/test/test_web_contents_view.cc
deleted file mode 100644
index b7d663b..0000000
--- a/content/test/test_web_contents_view.cc
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/test/test_web_contents_view.h"
-
-namespace content {
-
-TestWebContentsView::TestWebContentsView() {
-}
-
-TestWebContentsView::~TestWebContentsView() {
-}
-
-void TestWebContentsView::StartDragging(
- const DropData& drop_data,
- blink::WebDragOperationsMask allowed_ops,
- const gfx::ImageSkia& image,
- const gfx::Vector2d& image_offset,
- const DragEventSourceInfo& event_info) {
-}
-
-void TestWebContentsView::UpdateDragCursor(blink::WebDragOperation operation) {
-}
-
-void TestWebContentsView::GotFocus() {
-}
-
-void TestWebContentsView::TakeFocus(bool reverse) {
-}
-
-gfx::NativeView TestWebContentsView::GetNativeView() const {
- return gfx::NativeView();
-}
-
-gfx::NativeView TestWebContentsView::GetContentNativeView() const {
- return gfx::NativeView();
-}
-
-gfx::NativeWindow TestWebContentsView::GetTopLevelNativeWindow() const {
- return gfx::NativeWindow();
-}
-
-void TestWebContentsView::GetContainerBounds(gfx::Rect *out) const {
-}
-
-void TestWebContentsView::OnTabCrashed(base::TerminationStatus status,
- int error_code) {
-}
-
-void TestWebContentsView::SizeContents(const gfx::Size& size) {
-}
-
-void TestWebContentsView::Focus() {
-}
-
-void TestWebContentsView::SetInitialFocus() {
-}
-
-void TestWebContentsView::StoreFocus() {
-}
-
-void TestWebContentsView::RestoreFocus() {
-}
-
-DropData* TestWebContentsView::GetDropData() const {
- return NULL;
-}
-
-gfx::Rect TestWebContentsView::GetViewBounds() const {
- return gfx::Rect();
-}
-
-#if defined(OS_MACOSX)
-void TestWebContentsView::SetAllowOverlappingViews(bool overlapping) {
-}
-
-bool TestWebContentsView::GetAllowOverlappingViews() const {
- return false;
-}
-
-void TestWebContentsView::SetOverlayView(
- WebContentsView* overlay, const gfx::Point& offset) {
-}
-
-void TestWebContentsView::RemoveOverlayView() {
-}
-#endif
-
-void TestWebContentsView::CreateView(const gfx::Size& initial_size,
- gfx::NativeView context) {
-}
-
-RenderWidgetHostViewBase* TestWebContentsView::CreateViewForWidget(
- RenderWidgetHost* render_widget_host) {
- return NULL;
-}
-
-RenderWidgetHostViewBase* TestWebContentsView::CreateViewForPopupWidget(
- RenderWidgetHost* render_widget_host) {
- return NULL;
-}
-
-void TestWebContentsView::SetPageTitle(const base::string16& title) {
-}
-
-void TestWebContentsView::RenderViewCreated(RenderViewHost* host) {
-}
-
-void TestWebContentsView::RenderViewSwappedIn(RenderViewHost* host) {
-}
-
-void TestWebContentsView::SetOverscrollControllerEnabled(bool enabled) {
-}
-
-#if defined(OS_MACOSX)
-bool TestWebContentsView::IsEventTracking() const {
- return false;
-}
-
-void TestWebContentsView::CloseTabAfterEventTracking() {
-}
-#endif
-
-} // namespace content
diff --git a/content/test/test_web_contents_view.h b/content/test/test_web_contents_view.h
deleted file mode 100644
index 36a7117..0000000
--- a/content/test/test_web_contents_view.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_
-#define CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_
-
-#include "base/compiler_specific.h"
-#include "content/port/browser/render_view_host_delegate_view.h"
-#include "content/port/browser/web_contents_view_port.h"
-
-namespace content {
-
-class TestWebContentsView : public WebContentsViewPort,
- public RenderViewHostDelegateView {
- public:
- TestWebContentsView();
- virtual ~TestWebContentsView();
-
- // RenderViewHostDelegateView:
- virtual void StartDragging(const DropData& drop_data,
- blink::WebDragOperationsMask allowed_ops,
- const gfx::ImageSkia& image,
- const gfx::Vector2d& image_offset,
- const DragEventSourceInfo& event_info) OVERRIDE;
- virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE;
- virtual void GotFocus() OVERRIDE;
- virtual void TakeFocus(bool reverse) OVERRIDE;
-
- // WebContentsView:
- virtual gfx::NativeView GetNativeView() const OVERRIDE;
- virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
- virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
- virtual void GetContainerBounds(gfx::Rect *out) const OVERRIDE;
- virtual void OnTabCrashed(base::TerminationStatus status,
- int error_code) OVERRIDE;
- virtual void SizeContents(const gfx::Size& size) OVERRIDE;
- virtual void Focus() OVERRIDE;
- virtual void SetInitialFocus() OVERRIDE;
- virtual void StoreFocus() OVERRIDE;
- virtual void RestoreFocus() OVERRIDE;
- virtual DropData* GetDropData() const OVERRIDE;
- virtual gfx::Rect GetViewBounds() const OVERRIDE;
-#if defined(OS_MACOSX)
- virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE;
- virtual bool GetAllowOverlappingViews() const OVERRIDE;
- virtual void SetOverlayView(WebContentsView* overlay,
- const gfx::Point& offset) OVERRIDE;
- virtual void RemoveOverlayView() OVERRIDE;
-#endif
-
- // WebContentsViewPort:
- virtual void CreateView(const gfx::Size& initial_size,
- gfx::NativeView context) OVERRIDE;
- virtual RenderWidgetHostViewBase* CreateViewForWidget(
- RenderWidgetHost* render_widget_host) OVERRIDE;
- virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
- RenderWidgetHost* render_widget_host) OVERRIDE;
- virtual void SetPageTitle(const base::string16& title) OVERRIDE;
- virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE;
- virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE;
- virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE;
-#if defined(OS_MACOSX)
- virtual bool IsEventTracking() const OVERRIDE;
- virtual void CloseTabAfterEventTracking() OVERRIDE;
-#endif
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestWebContentsView);
-};
-
-} // namespace content
-
-#endif // CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index 100b3f1..4a0dd4f 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -11,7 +11,6 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/common/bindings_policy.h"
#include "ui/aura/layout_manager.h"
@@ -122,7 +121,7 @@ aura::Window* KeyboardControllerProxy::GetKeyboardWindow() {
LoadContents(GetVirtualKeyboardUrl());
}
- return keyboard_contents_->GetView()->GetNativeView();
+ return keyboard_contents_->GetNativeView();
}
bool KeyboardControllerProxy::HasKeyboardWindow() const {
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index 8da7e22..5794c56 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -10,7 +10,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ipc/ipc_message.h"
#include "ui/accessibility/ax_enums.h"
#include "ui/accessibility/ax_view_state.h"
@@ -182,7 +181,7 @@ void WebView::OnFocus() {
if (current_fs_view)
current_fs_view->Focus();
} else {
- web_contents()->GetView()->Focus();
+ web_contents()->Focus();
}
}
@@ -262,7 +261,7 @@ void WebView::AttachWebContents() {
const gfx::NativeView view_to_attach = is_embedding_fullscreen_widget_ ?
web_contents()->GetFullscreenRenderWidgetHostView()->GetNativeView() :
- web_contents()->GetView()->GetNativeView();
+ web_contents()->GetNativeView();
OnBoundsChanged(bounds());
if (holder_->native_view() == view_to_attach)
return;
diff --git a/ui/views/examples/webview_example.cc b/ui/views/examples/webview_example.cc
index 5a2d89d..feae6b9 100644
--- a/ui/views/examples/webview_example.cc
+++ b/ui/views/examples/webview_example.cc
@@ -6,7 +6,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/layout/fill_layout.h"
@@ -28,7 +27,7 @@ void WebViewExample::CreateExampleView(View* container) {
container->AddChildView(webview_);
webview_->LoadInitialURL(GURL("http://www.google.com/"));
- webview_->web_contents()->GetView()->Focus();
+ webview_->web_contents()->Focus();
}
} // namespace examples