OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/web_contents/web_contents_view_android.h" | 5 #include "content/browser/web_contents/web_contents_view_android.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/android/content_view_core_impl.h" | 8 #include "content/browser/android/content_view_core_impl.h" |
9 #include "content/browser/android/media_player_manager_android.h" | 9 #include "content/browser/android/media_player_manager_android.h" |
10 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 10 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 // |native_view_|, this has no effect without also instructing the | 73 // |native_view_|, this has no effect without also instructing the |
74 // native view (i.e. ContentView) how to obtain a reference to this widget in | 74 // native view (i.e. ContentView) how to obtain a reference to this widget in |
75 // order to paint it. See ContentView::GetRenderWidgetHostViewAndroid for an | 75 // order to paint it. See ContentView::GetRenderWidgetHostViewAndroid for an |
76 // example of how this is achieved for InterstitialPages. | 76 // example of how this is achieved for InterstitialPages. |
77 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(render_widget_host); | 77 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(render_widget_host); |
78 RenderWidgetHostView* view = new RenderWidgetHostViewAndroid( | 78 RenderWidgetHostView* view = new RenderWidgetHostViewAndroid( |
79 rwhi, content_view_core_); | 79 rwhi, content_view_core_); |
80 return view; | 80 return view; |
81 } | 81 } |
82 | 82 |
83 RenderWidgetHostView* WebContentsViewAndroid::CreateViewForPopupWidget( | |
84 RenderWidgetHost* render_widget_host) { | |
85 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); | |
Avi (use Gerrit)
2013/01/08 16:46:47
In this and other platform files, why doesn't
ret
rosca
2013/01/08 19:34:29
RenderWidgetHostView[Port]::CreateViewForWidget is
Avi (use Gerrit)
2013/01/08 20:51:15
OK, gotcha.
| |
86 } | |
87 | |
83 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { | 88 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { |
84 return content_view_core_; | 89 return content_view_core_; |
85 } | 90 } |
86 | 91 |
87 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { | 92 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { |
88 return content_view_core_; | 93 return content_view_core_; |
89 } | 94 } |
90 | 95 |
91 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { | 96 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { |
92 return content_view_core_->GetWindowAndroid(); | 97 return content_view_core_->GetWindowAndroid(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 // This is called when we the renderer asks us to take focus back (i.e., it has | 214 // This is called when we the renderer asks us to take focus back (i.e., it has |
210 // iterated past the last focusable element on the page). | 215 // iterated past the last focusable element on the page). |
211 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 216 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
212 if (web_contents_->GetDelegate() && | 217 if (web_contents_->GetDelegate() && |
213 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 218 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
214 return; | 219 return; |
215 web_contents_->GetRenderWidgetHostView()->Focus(); | 220 web_contents_->GetRenderWidgetHostView()->Focus(); |
216 } | 221 } |
217 | 222 |
218 } // namespace content | 223 } // namespace content |
OLD | NEW |