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/frame_host/interstitial_page_impl.h" | 9 #include "content/browser/frame_host/interstitial_page_impl.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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 return gfx::Rect(content_view_core_->GetViewSize()); | 114 return gfx::Rect(content_view_core_->GetViewSize()); |
115 | 115 |
116 return gfx::Rect(); | 116 return gfx::Rect(); |
117 } | 117 } |
118 | 118 |
119 void WebContentsViewAndroid::CreateView( | 119 void WebContentsViewAndroid::CreateView( |
120 const gfx::Size& initial_size, gfx::NativeView context) { | 120 const gfx::Size& initial_size, gfx::NativeView context) { |
121 } | 121 } |
122 | 122 |
123 RenderWidgetHostViewBase* WebContentsViewAndroid::CreateViewForWidget( | 123 RenderWidgetHostViewBase* WebContentsViewAndroid::CreateViewForWidget( |
124 RenderWidgetHost* render_widget_host) { | 124 RenderWidgetHost* render_widget_host, bool is_guest_view_hack) { |
125 if (render_widget_host->GetView()) { | 125 if (render_widget_host->GetView()) { |
126 // During testing, the view will already be set up in most cases to the | 126 // During testing, the view will already be set up in most cases to the |
127 // test view, so we don't want to clobber it with a real one. To verify that | 127 // test view, so we don't want to clobber it with a real one. To verify that |
128 // this actually is happening (and somebody isn't accidentally creating the | 128 // this actually is happening (and somebody isn't accidentally creating the |
129 // view twice), we check for the RVH Factory, which will be set when we're | 129 // view twice), we check for the RVH Factory, which will be set when we're |
130 // making special ones (which go along with the special views). | 130 // making special ones (which go along with the special views). |
131 DCHECK(RenderViewHostFactory::has_factory()); | 131 DCHECK(RenderViewHostFactory::has_factory()); |
132 return static_cast<RenderWidgetHostViewBase*>( | 132 return static_cast<RenderWidgetHostViewBase*>( |
133 render_widget_host->GetView()); | 133 render_widget_host->GetView()); |
134 } | 134 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // This is called when we the renderer asks us to take focus back (i.e., it has | 206 // This is called when we the renderer asks us to take focus back (i.e., it has |
207 // iterated past the last focusable element on the page). | 207 // iterated past the last focusable element on the page). |
208 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 208 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
209 if (web_contents_->GetDelegate() && | 209 if (web_contents_->GetDelegate() && |
210 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 210 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
211 return; | 211 return; |
212 web_contents_->GetRenderWidgetHostView()->Focus(); | 212 web_contents_->GetRenderWidgetHostView()->Focus(); |
213 } | 213 } |
214 | 214 |
215 } // namespace content | 215 } // namespace content |
OLD | NEW |