Index: ui/views/controls/webview/webview.cc |
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc |
index 0edd781be8915c1f335ffda9875a75cc0aa16e3c..54a74ad6a86f8d102e17d0e2aa8fd136b4081381 100644 |
--- a/ui/views/controls/webview/webview.cc |
+++ b/ui/views/controls/webview/webview.cc |
@@ -13,6 +13,7 @@ |
#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/base/accessibility/accessibility_types.h" |
#include "ui/base/accessibility/accessible_view_state.h" |
@@ -121,7 +122,7 @@ bool WebView::IsFocusable() const { |
void WebView::OnFocus() { |
if (web_contents_) |
- web_contents_->Focus(); |
+ web_contents_->GetView()->Focus(); |
} |
void WebView::AboutToRequestFocusFromTabTraversal(bool reverse) { |
@@ -187,19 +188,19 @@ void WebView::AttachWebContents() { |
// Prevents attachment if the WebView isn't already in a Widget, or it's |
// already attached. |
if (!GetWidget() || !web_contents_ || |
- wcv_holder_->native_view() == web_contents_->GetNativeView()) { |
+ wcv_holder_->native_view() == web_contents_->GetView()->GetNativeView()) { |
return; |
} |
if (web_contents_) { |
- wcv_holder_->Attach(web_contents_->GetNativeView()); |
+ wcv_holder_->Attach(web_contents_->GetView()->GetNativeView()); |
// The WebContentsView will not be focused automatically when it is |
// attached, so we need to pass on focus to it if the FocusManager thinks |
// the WebView is focused. Note that not every Widget has a focus manager. |
FocusManager* focus_manager = GetFocusManager(); |
if (focus_manager && focus_manager->GetFocusedView() == this) |
- web_contents_->Focus(); |
+ web_contents_->GetView()->Focus(); |
registrar_.Add( |
this, |
@@ -224,7 +225,7 @@ void WebView::DetachWebContents() { |
// |
// Moving this out of here would also mean we wouldn't be potentially |
// calling member functions on a half-destroyed WebContents. |
- ShowWindow(web_contents_->GetNativeView(), SW_HIDE); |
+ ShowWindow(web_contents_->GetView()->GetNativeView(), SW_HIDE); |
#endif |
} |
registrar_.RemoveAll(); |
@@ -233,7 +234,7 @@ void WebView::DetachWebContents() { |
void WebView::RenderViewHostChanged(content::RenderViewHost* old_host, |
content::RenderViewHost* new_host) { |
if (GetFocusManager()->GetFocusedView() == this) |
- web_contents_->Focus(); |
+ web_contents_->GetView()->Focus(); |
} |
void WebView::WebContentsDestroyed(content::WebContents* web_contents) { |