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

Unified Diff: chrome/browser/android/tab/background_content_view_helper.h

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 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: chrome/browser/android/tab/background_content_view_helper.h
diff --git a/chrome/browser/android/tab/background_content_view_helper.h b/chrome/browser/android/tab/background_content_view_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..8cd92a56756db11f884bc5fecd10165a8ce165d1
--- /dev/null
+++ b/chrome/browser/android/tab/background_content_view_helper.h
@@ -0,0 +1,59 @@
+// Copyright 2015 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 CHROME_BROWSER_ANDROID_TAB_BACKGROUND_CONTENT_VIEW_HELPER_H_
+#define CHROME_BROWSER_ANDROID_TAB_BACKGROUND_CONTENT_VIEW_HELPER_H_
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_weak_ref.h"
+#include "base/android/scoped_java_ref.h"
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/layers/layer.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace chrome {
+namespace android {
+class ChromeWebContentsDelegateAndroid;
+}
+}
+
+class BackgroundContentViewHelper {
+ public:
+ static BackgroundContentViewHelper* FromJavaObject(JNIEnv* env,
+ jobject jobj);
+ static bool Register(JNIEnv* env);
+
+ BackgroundContentViewHelper();
+ virtual ~BackgroundContentViewHelper();
+
+ void Destroy(JNIEnv* env, jobject jobj);
+ void SetWebContents(JNIEnv* env,
+ jobject jobj,
+ jobject jcontent_view_core,
+ jobject jweb_contents_delegate);
+ void DestroyWebContents(JNIEnv* env, jobject jobj);
+ void ReleaseWebContents(JNIEnv* env, jobject jobj);
+ void MergeHistoryFrom(JNIEnv* env, jobject jobj, jobject jweb_contents);
+ // Calls 'unload' handler and destroys the web_contents passed in.
+ void UnloadAndDeleteWebContents(JNIEnv* env,
+ jobject jobj,
+ jobject jweb_contents);
+ int GetSwapTimeoutMs(JNIEnv* env, jobject obj);
+ int GetNumFramesNeededForSwap(JNIEnv* env, jobject obj);
+
+ private:
+ scoped_refptr<cc::Layer> GetContentLayer();
+
+ scoped_ptr<content::WebContents> web_contents_;
+ scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid>
+ web_contents_delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(BackgroundContentViewHelper);
+};
+
+#endif // CHROME_BROWSER_ANDROID_TAB_BACKGROUND_CONTENT_VIEW_HELPER_H_
« no previous file with comments | « chrome/browser/android/staging_jni_registrar.cc ('k') | chrome/browser/android/tab/background_content_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698