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

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 26753005: Adding compositor callbacks to RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumb compositor provider through instead of compositor Created 7 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/gfx/rect_f.h" 25 #include "ui/gfx/rect_f.h"
26 #include "url/gurl.h" 26 #include "url/gurl.h"
27 27
28 namespace ui { 28 namespace ui {
29 class ViewAndroid; 29 class ViewAndroid;
30 class WindowAndroid; 30 class WindowAndroid;
31 } 31 }
32 32
33 namespace content { 33 namespace content {
34 class RenderWidgetHostViewAndroid; 34 class RenderWidgetHostViewAndroid;
35 class CompositorProvider;
35 struct MenuItem; 36 struct MenuItem;
36 37
37 // TODO(jrg): this is a shell. Upstream the rest. 38 // TODO(jrg): this is a shell. Upstream the rest.
38 class ContentViewCoreImpl : public ContentViewCore, 39 class ContentViewCoreImpl : public ContentViewCore,
39 public NotificationObserver, 40 public NotificationObserver,
40 public WebContentsObserver { 41 public WebContentsObserver {
41 public: 42 public:
42 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); 43 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents);
43 ContentViewCoreImpl(JNIEnv* env, 44 ContentViewCoreImpl(JNIEnv* env,
44 jobject obj, 45 jobject obj,
45 bool hardware_accelerated, 46 bool hardware_accelerated,
46 WebContents* web_contents, 47 WebContents* web_contents,
47 ui::ViewAndroid* view_android, 48 ui::ViewAndroid* view_android,
48 ui::WindowAndroid* window_android); 49 ui::WindowAndroid* window_android,
50 CompositorProvider* compositor_provider);
49 51
50 // ContentViewCore implementation. 52 // ContentViewCore implementation.
51 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; 53 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE;
52 virtual WebContents* GetWebContents() const OVERRIDE; 54 virtual WebContents* GetWebContents() const OVERRIDE;
53 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE; 55 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE;
54 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE; 56 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE;
55 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; 57 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE;
56 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; 58 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE;
57 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; 59 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE;
58 virtual void ShowPastePopup(int x, int y) OVERRIDE; 60 virtual void ShowPastePopup(int x, int y) OVERRIDE;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // like AutofillPopup. 382 // like AutofillPopup.
381 ui::ViewAndroid* view_android_; 383 ui::ViewAndroid* view_android_;
382 384
383 // The owning window that has a hold of main application activity. 385 // The owning window that has a hold of main application activity.
384 ui::WindowAndroid* window_android_; 386 ui::WindowAndroid* window_android_;
385 387
386 // The cache of device's current orientation set from Java side, this value 388 // The cache of device's current orientation set from Java side, this value
387 // will be sent to Renderer once it is ready. 389 // will be sent to Renderer once it is ready.
388 int device_orientation_; 390 int device_orientation_;
389 391
392 // ContentViewCore does not own the compositor provider.
393 CompositorProvider* compositor_provider_;
394
390 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 395 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
391 }; 396 };
392 397
393 bool RegisterContentViewCore(JNIEnv* env); 398 bool RegisterContentViewCore(JNIEnv* env);
394 399
395 } // namespace content 400 } // namespace content
396 401
397 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 402 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698