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

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

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed bot issues (I hope) Created 5 years, 4 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 {
15 class SurfaceManager;
16 }
17
18 namespace surfaces {
19 class SurfacesScheduler;
20 }
21
14 namespace view_manager { 22 namespace view_manager {
15 23
16 class ConnectionManager; 24 class ConnectionManager;
17 class ViewManagerRootDelegate; 25 class ViewManagerRootDelegate;
18 class ViewManagerServiceImpl; 26 class ViewManagerServiceImpl;
19 27
20 // ViewManagerRootImpl is an implementation of the ViewManagerRoot interface. 28 // ViewManagerRootImpl is an implementation of the ViewManagerRoot interface.
21 // 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
22 // 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
23 // 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
24 // deleted. 32 // deleted.
25 class ViewManagerRootImpl : public DisplayManagerDelegate, 33 class ViewManagerRootImpl : public DisplayManagerDelegate,
26 public mojo::ViewManagerRoot { 34 public mojo::ViewManagerRoot {
27 public: 35 public:
28 // TODO(fsamuel): All these parameters are just plumbing for creating 36 // TODO(fsamuel): All these parameters are just plumbing for creating
29 // DisplayManagers. We should probably just store these common parameters 37 // DisplayManagers. We should probably just store these common parameters
30 // in the DisplayManagerFactory and pass them along on DisplayManager::Create. 38 // in the DisplayManagerFactory and pass them along on DisplayManager::Create.
31 ViewManagerRootImpl(ConnectionManager* connection_manager, 39 ViewManagerRootImpl(
32 bool is_headless, 40 ConnectionManager* connection_manager,
33 mojo::ApplicationImpl* app_impl, 41 bool is_headless,
34 const scoped_refptr<gles2::GpuState>& gpu_state); 42 mojo::ApplicationImpl* app_impl,
43 const scoped_refptr<gles2::GpuState>& gpu_state,
44 const scoped_refptr<surfaces::SurfacesState>& surfaces_state);
35 ~ViewManagerRootImpl() override; 45 ~ViewManagerRootImpl() override;
36 46
37 // Initializes state that depends on the existence of a ViewManagerRootImpl. 47 // Initializes state that depends on the existence of a ViewManagerRootImpl.
38 void Init(ViewManagerRootDelegate* delegate); 48 void Init(ViewManagerRootDelegate* delegate);
39 49
40 ViewManagerServiceImpl* GetViewManagerService(); 50 ViewManagerServiceImpl* GetViewManagerService();
41 51
42 mojo::ViewManagerRootClient* client() const { return client_.get(); } 52 mojo::ViewManagerRootClient* client() const { return client_.get(); }
43 53
44 // 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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 mojo::ViewManagerRootClientPtr client_; 94 mojo::ViewManagerRootClientPtr client_;
85 scoped_ptr<ServerView> root_; 95 scoped_ptr<ServerView> root_;
86 scoped_ptr<DisplayManager> display_manager_; 96 scoped_ptr<DisplayManager> display_manager_;
87 97
88 DISALLOW_COPY_AND_ASSIGN(ViewManagerRootImpl); 98 DISALLOW_COPY_AND_ASSIGN(ViewManagerRootImpl);
89 }; 99 };
90 100
91 } // namespace view_manager 101 } // namespace view_manager
92 102
93 #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_app.cc ('k') | components/view_manager/view_manager_root_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698