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

Side by Side Diff: chrome/browser/android/compositor/compositor_view.h

Issue 2688113002: Make ViewRoot the top of the ViewAndroid tree (Closed)
Patch Set: comments Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "cc/layers/layer_collections.h" 14 #include "cc/layers/layer_collections.h"
15 #include "cc/resources/ui_resource_client.h" 15 #include "cc/resources/ui_resource_client.h"
16 #include "content/public/browser/android/compositor_client.h" 16 #include "content/public/browser/android/compositor_client.h"
17 #include "content/public/browser/browser_child_process_observer.h" 17 #include "content/public/browser/browser_child_process_observer.h"
18 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
19 19
20 namespace cc { 20 namespace cc {
21 class Layer; 21 class Layer;
22 class SolidColorLayer; 22 class SolidColorLayer;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 class Compositor; 26 class Compositor;
27 } 27 }
28 28
29 namespace ui { 29 namespace ui {
30 class WindowAndroid;
31 class ResourceManager; 30 class ResourceManager;
32 class UIResourceProvider; 31 class UIResourceProvider;
32 class ViewRoot;
33 } 33 }
34 34
35 namespace android { 35 namespace android {
36 36
37 class SceneLayer; 37 class SceneLayer;
38 class TabContentManager; 38 class TabContentManager;
39 39
40 class CompositorView : public content::CompositorClient, 40 class CompositorView : public content::CompositorClient,
41 public content::BrowserChildProcessObserver { 41 public content::BrowserChildProcessObserver {
42 public: 42 public:
43 CompositorView(JNIEnv* env, 43 CompositorView(JNIEnv* env,
44 jobject obj, 44 jobject obj,
45 jboolean low_mem_device, 45 jboolean low_mem_device,
46 ui::WindowAndroid* window_android, 46 ui::ViewRoot* view_root,
47 TabContentManager* tab_content_manager); 47 TabContentManager* tab_content_manager);
48 48
49 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& object); 49 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& object);
50 50
51 ui::ResourceManager* GetResourceManager(); 51 ui::ResourceManager* GetResourceManager();
52 base::android::ScopedJavaLocalRef<jobject> GetResourceManager( 52 base::android::ScopedJavaLocalRef<jobject> GetResourceManager(
53 JNIEnv* env, 53 JNIEnv* env,
54 const base::android::JavaParamRef<jobject>& jobj); 54 const base::android::JavaParamRef<jobject>& jobj);
55 void SetNeedsComposite(JNIEnv* env, 55 void SetNeedsComposite(JNIEnv* env,
56 const base::android::JavaParamRef<jobject>& object); 56 const base::android::JavaParamRef<jobject>& object);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 base::WeakPtrFactory<CompositorView> weak_factory_; 108 base::WeakPtrFactory<CompositorView> weak_factory_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(CompositorView); 110 DISALLOW_COPY_AND_ASSIGN(CompositorView);
111 }; 111 };
112 112
113 bool RegisterCompositorView(JNIEnv* env); 113 bool RegisterCompositorView(JNIEnv* env);
114 114
115 } // namespace android 115 } // namespace android
116 116
117 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ 117 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698