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

Unified Diff: webkit/media/android/webmediaplayer_android.h

Issue 13688004: Location/size change notification when external rendering is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ifdef guards Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/android/webmediaplayer_android.h
diff --git a/webkit/media/android/webmediaplayer_android.h b/webkit/media/android/webmediaplayer_android.h
index a0fb5bbaf78d3fd29ddf8f12c0f68367161cf033..9c1e10dad89a39af24256a158a5773c026016d6e 100644
--- a/webkit/media/android/webmediaplayer_android.h
+++ b/webkit/media/android/webmediaplayer_android.h
@@ -16,6 +16,7 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
+#include "ui/gfx/rect_f.h"
#include "webkit/media/android/stream_texture_factory_android.h"
namespace webkit {
@@ -132,6 +133,13 @@ class WebMediaPlayerAndroid
// Detach the player from its manager.
void Detach();
+#if defined(GOOGLE_TV)
+ // Retrieve geometry of the media player (i.e. location and size of the video
+ // frame) if changed. Returns true only if the geometry has been changed since
+ // the last call.
+ bool GetGeometryChange(gfx::RectF* rect);
+#endif
+
protected:
// Construct a WebMediaPlayerAndroid object with reference to the
// client, manager and stream texture factory.
@@ -182,8 +190,10 @@ class WebMediaPlayerAndroid
WebMediaPlayerManagerAndroid* manager() const { return manager_; }
+#if defined(GOOGLE_TV)
// Request external surface for out-of-band composition.
virtual void RequestExternalSurface() = 0;
+#endif
private:
void ReallocateVideoFrame();
@@ -258,6 +268,12 @@ class WebMediaPlayerAndroid
scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
+#if defined(GOOGLE_TV)
+ // A rectangle represents the geometry of video frame, when computed last
+ // time.
+ gfx::RectF last_computed_rect_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698