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

Side by Side Diff: components/view_manager/view_manager_root_impl.h

Issue 1314953002: Rename ViewManagerService,ViewManagerClient -> ViewTree,ViewTreeClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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 COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_IMPL_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_IMPL_H_
6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_IMPL_H_ 6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "components/view_manager/display_manager.h" 9 #include "components/view_manager/display_manager.h"
10 #include "components/view_manager/public/cpp/types.h" 10 #include "components/view_manager/public/cpp/types.h"
11 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h" 11 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h"
12 #include "components/view_manager/server_view.h" 12 #include "components/view_manager/server_view.h"
13 13
14 namespace cc { 14 namespace cc {
15 class SurfaceManager; 15 class SurfaceManager;
16 } 16 }
17 17
18 namespace surfaces { 18 namespace surfaces {
19 class SurfacesScheduler; 19 class SurfacesScheduler;
20 } 20 }
21 21
22 namespace view_manager { 22 namespace view_manager {
23 23
24 class ConnectionManager; 24 class ConnectionManager;
25 class ViewManagerRootDelegate; 25 class ViewManagerRootDelegate;
26 class ViewManagerServiceImpl; 26 class ViewTreeImpl;
27 27
28 // ViewManagerRootImpl is an implementation of the ViewManagerRoot interface. 28 // ViewManagerRootImpl is an implementation of the ViewManagerRoot interface.
29 // It serves as a top level root view for a window. Its lifetime is managed by 29 // It serves as a top level root view for a window. Its lifetime is managed by
30 // ConnectionManager. If the connection to the client breaks or if the user 30 // ConnectionManager. If the connection to the client breaks or if the user
31 // closes the associated window, then this object and related state will be 31 // closes the associated window, then this object and related state will be
32 // deleted. 32 // deleted.
33 class ViewManagerRootImpl : public DisplayManagerDelegate, 33 class ViewManagerRootImpl : public DisplayManagerDelegate,
34 public mojo::ViewManagerRoot { 34 public mojo::ViewManagerRoot {
35 public: 35 public:
36 // TODO(fsamuel): All these parameters are just plumbing for creating 36 // TODO(fsamuel): All these parameters are just plumbing for creating
37 // DisplayManagers. We should probably just store these common parameters 37 // DisplayManagers. We should probably just store these common parameters
38 // in the DisplayManagerFactory and pass them along on DisplayManager::Create. 38 // in the DisplayManagerFactory and pass them along on DisplayManager::Create.
39 ViewManagerRootImpl( 39 ViewManagerRootImpl(
40 ConnectionManager* connection_manager, 40 ConnectionManager* connection_manager,
41 bool is_headless, 41 bool is_headless,
42 mojo::ApplicationImpl* app_impl, 42 mojo::ApplicationImpl* app_impl,
43 const scoped_refptr<gles2::GpuState>& gpu_state, 43 const scoped_refptr<gles2::GpuState>& gpu_state,
44 const scoped_refptr<surfaces::SurfacesState>& surfaces_state); 44 const scoped_refptr<surfaces::SurfacesState>& surfaces_state);
45 ~ViewManagerRootImpl() override; 45 ~ViewManagerRootImpl() override;
46 46
47 // Initializes state that depends on the existence of a ViewManagerRootImpl. 47 // Initializes state that depends on the existence of a ViewManagerRootImpl.
48 void Init(ViewManagerRootDelegate* delegate); 48 void Init(ViewManagerRootDelegate* delegate);
49 49
50 ViewManagerServiceImpl* GetViewManagerService(); 50 ViewTreeImpl* GetViewTree();
51 51
52 mojo::ViewManagerRootClient* client() const { return client_.get(); } 52 mojo::ViewManagerRootClient* client() const { return client_.get(); }
53 53
54 // Returns whether |view| is a descendant of this root but not itself a 54 // Returns whether |view| is a descendant of this root but not itself a
55 // root view. 55 // root view.
56 bool IsViewAttachedToRoot(const ServerView* view) const; 56 bool IsViewAttachedToRoot(const ServerView* view) const;
57 57
58 // Schedules a paint for the specified region in the coordinates of |view| if 58 // Schedules a paint for the specified region in the coordinates of |view| if
59 // the |view| is in this viewport. Returns whether |view| is in the viewport. 59 // the |view| is in this viewport. Returns whether |view| is in the viewport.
60 bool SchedulePaintIfInViewport(const ServerView* view, 60 bool SchedulePaintIfInViewport(const ServerView* view,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 mojo::ViewManagerRootClientPtr client_; 94 mojo::ViewManagerRootClientPtr client_;
95 scoped_ptr<ServerView> root_; 95 scoped_ptr<ServerView> root_;
96 scoped_ptr<DisplayManager> display_manager_; 96 scoped_ptr<DisplayManager> display_manager_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(ViewManagerRootImpl); 98 DISALLOW_COPY_AND_ASSIGN(ViewManagerRootImpl);
99 }; 99 };
100 100
101 } // namespace view_manager 101 } // namespace view_manager
102 102
103 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_IMPL_H_ 103 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_IMPL_H_
OLDNEW
« no previous file with comments | « components/view_manager/view_manager_root_delegate.h ('k') | components/view_manager/view_manager_root_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698