Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 132233042: Enable the embedded L1/EME support in WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added ExternalVideoSurfaceDelegate.java. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/media/android/browser_media_player_manager.h" 10 #include "content/browser/media/android/browser_media_player_manager.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(VIDEO_HOLE) 57 #if defined(VIDEO_HOLE)
58 void WebContentsViewAndroid::NotifyExternalSurface( 58 void WebContentsViewAndroid::RequestExternalVideoSurface(int player_id) {
59 int player_id, bool is_request, const gfx::RectF& rect) {
60 if (content_view_core_) 59 if (content_view_core_)
61 content_view_core_->NotifyExternalSurface(player_id, is_request, rect); 60 content_view_core_->RequestExternalVideoSurface(player_id);
61 }
Ted C 2014/02/14 18:32:52 still missing blank lines between the methods.
ycheo (away) 2014/02/18 08:35:56 Removed.
62 void WebContentsViewAndroid::ReleaseExternalVideoSurface(int player_id) {
63 if (content_view_core_)
64 content_view_core_->ReleaseExternalVideoSurface(player_id);
65 }
66 void WebContentsViewAndroid::NotifyExternalVideoSurfacePositionChanged(
67 int player_id, const gfx::RectF& rect) {
68 if (content_view_core_) {
69 content_view_core_->NotifyExternalVideoSurfacePositionChanged(player_id,
70 rect);
71 }
62 } 72 }
63 #endif // defined(VIDEO_HOLE) 73 #endif // defined(VIDEO_HOLE)
64 74
65 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { 75 gfx::NativeView WebContentsViewAndroid::GetNativeView() const {
66 return content_view_core_ ? content_view_core_->GetViewAndroid() : NULL; 76 return content_view_core_ ? content_view_core_->GetViewAndroid() : NULL;
67 } 77 }
68 78
69 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { 79 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const {
70 return content_view_core_ ? content_view_core_->GetViewAndroid() : NULL; 80 return content_view_core_ ? content_view_core_->GetViewAndroid() : NULL;
71 } 81 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // This is called when we the renderer asks us to take focus back (i.e., it has 228 // This is called when we the renderer asks us to take focus back (i.e., it has
219 // iterated past the last focusable element on the page). 229 // iterated past the last focusable element on the page).
220 void WebContentsViewAndroid::TakeFocus(bool reverse) { 230 void WebContentsViewAndroid::TakeFocus(bool reverse) {
221 if (web_contents_->GetDelegate() && 231 if (web_contents_->GetDelegate() &&
222 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) 232 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse))
223 return; 233 return;
224 web_contents_->GetRenderWidgetHostView()->Focus(); 234 web_contents_->GetRenderWidgetHostView()->Focus();
225 } 235 }
226 236
227 } // namespace content 237 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698