| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 if (web_contents_->ShowingInterstitialPage()) { | 47 if (web_contents_->ShowingInterstitialPage()) { |
| 48 rwhv = static_cast<RenderWidgetHostViewAndroid*>( | 48 rwhv = static_cast<RenderWidgetHostViewAndroid*>( |
| 49 static_cast<InterstitialPageImpl*>( | 49 static_cast<InterstitialPageImpl*>( |
| 50 web_contents_->GetInterstitialPage())-> | 50 web_contents_->GetInterstitialPage())-> |
| 51 GetRenderViewHost()->GetView()); | 51 GetRenderViewHost()->GetView()); |
| 52 if (rwhv) | 52 if (rwhv) |
| 53 rwhv->SetContentViewCore(content_view_core_); | 53 rwhv->SetContentViewCore(content_view_core_); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 #if defined(GOOGLE_TV) |
| 57 void WebContentsViewAndroid::RequestExternalVideoSurface(int player_id) { | 58 void WebContentsViewAndroid::RequestExternalVideoSurface(int player_id) { |
| 58 if (content_view_core_) | 59 if (content_view_core_) |
| 59 content_view_core_->RequestExternalVideoSurface(player_id); | 60 content_view_core_->RequestExternalVideoSurface(player_id); |
| 60 } | 61 } |
| 61 | 62 |
| 63 void WebContentsViewAndroid::NotifyGeometryChange(int player_id, |
| 64 const gfx::RectF& rect) { |
| 65 if (content_view_core_) |
| 66 content_view_core_->NotifyGeometryChange(player_id, rect); |
| 67 } |
| 68 #endif |
| 69 |
| 62 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { | 70 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { |
| 63 return content_view_core_; | 71 return content_view_core_; |
| 64 } | 72 } |
| 65 | 73 |
| 66 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { | 74 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { |
| 67 return content_view_core_; | 75 return content_view_core_; |
| 68 } | 76 } |
| 69 | 77 |
| 70 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { | 78 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { |
| 71 return content_view_core_->GetWindowAndroid(); | 79 return content_view_core_->GetWindowAndroid(); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // 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 |
| 217 // iterated past the last focusable element on the page). | 225 // iterated past the last focusable element on the page). |
| 218 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 226 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
| 219 if (web_contents_->GetDelegate() && | 227 if (web_contents_->GetDelegate() && |
| 220 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 228 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
| 221 return; | 229 return; |
| 222 web_contents_->GetRenderWidgetHostView()->Focus(); | 230 web_contents_->GetRenderWidgetHostView()->Focus(); |
| 223 } | 231 } |
| 224 | 232 |
| 225 } // namespace content | 233 } // namespace content |
| OLD | NEW |