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

Side by Side Diff: content/browser/web_contents/web_contents_android.h

Issue 1385543003: Have RenderWidgetHostViewAndroid own sync compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/supports_user_data.h" 15 #include "base/supports_user_data.h"
16 #include "content/browser/frame_host/navigation_controller_android.h" 16 #include "content/browser/frame_host/navigation_controller_android.h"
17 #include "content/browser/renderer_host/render_widget_host_view_android.h" 17 #include "content/browser/renderer_host/render_widget_host_view_android.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 19
20 namespace content { 20 namespace content {
21 21
22 class SynchronousCompositorClient;
22 class WebContents; 23 class WebContents;
23 24
24 // Android wrapper around WebContents that provides safer passage from java and 25 // Android wrapper around WebContents that provides safer passage from java and
25 // back to native and provides java with a means of communicating with its 26 // back to native and provides java with a means of communicating with its
26 // native counterpart. 27 // native counterpart.
27 class CONTENT_EXPORT WebContentsAndroid 28 class CONTENT_EXPORT WebContentsAndroid
28 : public base::SupportsUserData::Data { 29 : public base::SupportsUserData::Data {
29 public: 30 public:
30 static bool Register(JNIEnv* env); 31 static bool Register(JNIEnv* env);
31 32
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 jfloat y_offset, 114 jfloat y_offset,
114 jfloat x_scroll); 115 jfloat x_scroll);
115 116
116 void ResumeMediaSession(JNIEnv* env, jobject obj); 117 void ResumeMediaSession(JNIEnv* env, jobject obj);
117 void SuspendMediaSession(JNIEnv* env, jobject obj); 118 void SuspendMediaSession(JNIEnv* env, jobject obj);
118 void StopMediaSession(JNIEnv* env, jobject obj); 119 void StopMediaSession(JNIEnv* env, jobject obj);
119 120
120 base::android::ScopedJavaLocalRef<jstring> GetEncoding(JNIEnv* env, 121 base::android::ScopedJavaLocalRef<jstring> GetEncoding(JNIEnv* env,
121 jobject obj) const; 122 jobject obj) const;
122 123
124 void set_synchronous_compositor_client(SynchronousCompositorClient* client) {
125 synchronous_compositor_client_ = client;
126 }
127 SynchronousCompositorClient* synchronous_compositor_client() const {
128 return synchronous_compositor_client_;
129 }
130
123 private: 131 private:
124 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); 132 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid();
125 133
126 WebContents* web_contents_; 134 WebContents* web_contents_;
127 NavigationControllerAndroid navigation_controller_; 135 NavigationControllerAndroid navigation_controller_;
128 base::android::ScopedJavaGlobalRef<jobject> obj_; 136 base::android::ScopedJavaGlobalRef<jobject> obj_;
137 SynchronousCompositorClient* synchronous_compositor_client_;
129 138
130 base::WeakPtrFactory<WebContentsAndroid> weak_factory_; 139 base::WeakPtrFactory<WebContentsAndroid> weak_factory_;
131 140
132 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid); 141 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid);
133 }; 142 };
134 143
135 } // namespace content 144 } // namespace content
136 145
137 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ 146 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | content/browser/web_contents/web_contents_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698