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

Unified Diff: chromecast/browser/android/cast_web_contents_activity.h

Issue 2570623003: [Chromecast] Turn CastContentWindow into an abstract interface. (Closed)
Patch Set: Fix browser test Created 3 years, 11 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: chromecast/browser/android/cast_web_contents_activity.h
diff --git a/chromecast/browser/android/cast_web_contents_activity.h b/chromecast/browser/android/cast_web_contents_activity.h
new file mode 100644
index 0000000000000000000000000000000000000000..c5a7e3b9a68d045c5342b37f71a2eebd159e7ac3
--- /dev/null
+++ b/chromecast/browser/android/cast_web_contents_activity.h
@@ -0,0 +1,45 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_BROWSER_ANDROID_CAST_WEB_CONTENTS_ACTIVITY_H_
+#define CHROMECAST_BROWSER_ANDROID_CAST_WEB_CONTENTS_ACTIVITY_H_
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
+#include "base/supports_user_data.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace chromecast {
+namespace shell {
+
+// Helper class to get members of the CastWebContentsActivity displaying a
+// given web_contents. This class is lazily created through the Get function and
+// will manage its own lifetime via SupportsUserData.
+class CastWebContentsActivity : base::SupportsUserData::Data {
+ public:
+ static bool RegisterJni(JNIEnv* env);
+ static CastWebContentsActivity* Get(content::WebContents* web_contents);
+
+ base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewEmbedder();
+ void SetContentVideoViewEmbedder(
+ const base::android::JavaRef<jobject>& content_video_view_embedder);
+
+ private:
+ explicit CastWebContentsActivity(content::WebContents* web_contents);
+ ~CastWebContentsActivity() override;
+
+ base::android::ScopedJavaGlobalRef<jobject> content_video_view_embedder_;
+
+ DISALLOW_COPY_AND_ASSIGN(CastWebContentsActivity);
+};
+
+} // namespace shell
+} // namespace chromecast
+
+#endif // CHROMECAST_BROWSER_ANDROID_CAST_WEB_CONTENTS_ACTIVITY_H_
« no previous file with comments | « chromecast/browser/android/cast_metrics_helper_android.cc ('k') | chromecast/browser/android/cast_web_contents_activity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698