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

Side by Side Diff: content/public/browser/android/compositor.h

Issue 2688113002: Make ViewRoot the top of the ViewAndroid tree (Closed)
Patch Set: - 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "cc/resources/ui_resource_bitmap.h" 9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ui/android/resources/ui_resource_provider.h" 11 #include "ui/android/resources/ui_resource_provider.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
boliu 2017/02/13 22:58:08 still need this?
Jinsuk Kim 2017/02/14 05:09:59 Removed and included <jni.h> that was included ind
15 15
16 namespace cc { 16 namespace cc {
17 class Layer; 17 class Layer;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 class ResourceManager; 21 class ResourceManager;
22 class UIResourceProvider; 22 class UIResourceProvider;
23 class ViewRoot;
23 } 24 }
24 25
25 namespace content { 26 namespace content {
26 class CompositorClient; 27 class CompositorClient;
27 28
28 // An interface to the browser-side compositor. 29 // An interface to the browser-side compositor.
29 class CONTENT_EXPORT Compositor { 30 class CONTENT_EXPORT Compositor {
30 public: 31 public:
31 virtual ~Compositor() {} 32 virtual ~Compositor() {}
32 33
33 // Performs the global initialization needed before any compositor 34 // Performs the global initialization needed before any compositor
34 // instance can be used. This should be called only once. 35 // instance can be used. This should be called only once.
35 static void Initialize(); 36 static void Initialize();
36 37
37 // Creates and returns a compositor instance. |root_window| needs to outlive 38 // Creates and returns a compositor instance. |view_root| needs to outlive
38 // the compositor as it manages callbacks on the compositor. 39 // the compositor as it manages callbacks on the compositor.
39 static Compositor* Create(CompositorClient* client, 40 static Compositor* Create(CompositorClient* client, ui::ViewRoot* view_root);
40 gfx::NativeWindow root_window);
41 41
42 // Attaches the layer tree. 42 // Attaches the layer tree.
43 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0; 43 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0;
44 44
45 // Set the output surface bounds. 45 // Set the output surface bounds.
46 virtual void SetWindowBounds(const gfx::Size& size) = 0; 46 virtual void SetWindowBounds(const gfx::Size& size) = 0;
47 47
48 // Set the output surface which the compositor renders into. 48 // Set the output surface which the compositor renders into.
49 virtual void SetSurface(jobject surface) = 0; 49 virtual void SetSurface(jobject surface) = 0;
50 50
(...skipping 10 matching lines...) Expand all
61 // Returns the resource manager associated with the compositor. 61 // Returns the resource manager associated with the compositor.
62 virtual ui::ResourceManager& GetResourceManager() = 0; 62 virtual ui::ResourceManager& GetResourceManager() = 0;
63 63
64 protected: 64 protected:
65 Compositor() {} 65 Compositor() {}
66 }; 66 };
67 67
68 } // namespace content 68 } // namespace content
69 69
70 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 70 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698