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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_TAB_BACKGROUND_CONTENT_VIEW_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_TAB_BACKGROUND_CONTENT_VIEW_HELPER_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h"
10 #include "base/android/scoped_java_ref.h"
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "cc/layers/layer.h"
14
15 namespace content {
16 class WebContents;
17 }
18
19 namespace chrome {
20 namespace android {
21 class ChromeWebContentsDelegateAndroid;
22 }
23 }
24
25 class BackgroundContentViewHelper {
26 public:
27 static BackgroundContentViewHelper* FromJavaObject(JNIEnv* env,
28 jobject jobj);
29 static bool Register(JNIEnv* env);
30
31 BackgroundContentViewHelper();
32 virtual ~BackgroundContentViewHelper();
33
34 void Destroy(JNIEnv* env, jobject jobj);
35 void SetWebContents(JNIEnv* env,
36 jobject jobj,
37 jobject jcontent_view_core,
38 jobject jweb_contents_delegate);
39 void DestroyWebContents(JNIEnv* env, jobject jobj);
40 void ReleaseWebContents(JNIEnv* env, jobject jobj);
41 void MergeHistoryFrom(JNIEnv* env, jobject jobj, jobject jweb_contents);
42 // Calls 'unload' handler and destroys the web_contents passed in.
43 void UnloadAndDeleteWebContents(JNIEnv* env,
44 jobject jobj,
45 jobject jweb_contents);
46 int GetSwapTimeoutMs(JNIEnv* env, jobject obj);
47 int GetNumFramesNeededForSwap(JNIEnv* env, jobject obj);
48
49 private:
50 scoped_refptr<cc::Layer> GetContentLayer();
51
52 scoped_ptr<content::WebContents> web_contents_;
53 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid>
54 web_contents_delegate_;
55
56 DISALLOW_COPY_AND_ASSIGN(BackgroundContentViewHelper);
57 };
58
59 #endif // CHROME_BROWSER_ANDROID_TAB_BACKGROUND_CONTENT_VIEW_HELPER_H_
OLDNEW
« 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