| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 | 62 |
| 63 void WebContentsViewAndroid::NotifyGeometryChange(int player_id, | 63 void WebContentsViewAndroid::NotifyGeometryChange(int player_id, |
| 64 const gfx::RectF& rect) { | 64 const gfx::RectF& rect) { |
| 65 if (content_view_core_) | 65 if (content_view_core_) |
| 66 content_view_core_->NotifyGeometryChange(player_id, rect); | 66 content_view_core_->NotifyGeometryChange(player_id, rect); |
| 67 } | 67 } |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { | 70 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { |
| 71 return content_view_core_; | 71 return content_view_core_->GetViewAndroid(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { | 74 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { |
| 75 return content_view_core_; | 75 return content_view_core_->GetViewAndroid(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { | 78 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { |
| 79 return content_view_core_->GetWindowAndroid(); | 79 return content_view_core_->GetWindowAndroid(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void WebContentsViewAndroid::GetContainerBounds(gfx::Rect* out) const { | 82 void WebContentsViewAndroid::GetContainerBounds(gfx::Rect* out) const { |
| 83 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 83 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
| 84 if (rwhv) | 84 if (rwhv) |
| 85 *out = rwhv->GetViewBounds(); | 85 *out = rwhv->GetViewBounds(); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // This is called when we the renderer asks us to take focus back (i.e., it has | 224 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 225 // iterated past the last focusable element on the page). | 225 // iterated past the last focusable element on the page). |
| 226 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 226 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
| 227 if (web_contents_->GetDelegate() && | 227 if (web_contents_->GetDelegate() && |
| 228 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 228 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
| 229 return; | 229 return; |
| 230 web_contents_->GetRenderWidgetHostView()->Focus(); | 230 web_contents_->GetRenderWidgetHostView()->Focus(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace content | 233 } // namespace content |
| OLD | NEW |