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

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

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Rob's comments 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_APP_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_ 6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/surfaces/surface_manager.h"
9 #include "components/view_manager/connection_manager_delegate.h" 10 #include "components/view_manager/connection_manager_delegate.h"
10 #include "components/view_manager/gles2/gpu_impl.h" 11 #include "components/view_manager/gles2/gpu_impl.h"
12 #include "components/view_manager/public/interfaces/surfaces.mojom.h"
11 #include "components/view_manager/public/interfaces/view_manager.mojom.h" 13 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
12 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h" 14 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h"
15 #include "components/view_manager/surfaces/surfaces_state.h"
13 #include "mojo/application/public/cpp/app_lifetime_helper.h" 16 #include "mojo/application/public/cpp/app_lifetime_helper.h"
14 #include "mojo/application/public/cpp/application_delegate.h" 17 #include "mojo/application/public/cpp/application_delegate.h"
15 #include "mojo/application/public/cpp/interface_factory.h" 18 #include "mojo/application/public/cpp/interface_factory.h"
16 #include "mojo/common/tracing_impl.h" 19 #include "mojo/common/tracing_impl.h"
17 20
18 namespace mojo { 21 namespace mojo {
19 class ApplicationImpl; 22 class ApplicationImpl;
20 } 23 }
21 24
25 namespace surfaces {
26 class DisplayImpl;
27 class SurfacesImpl;
28 class SurfacesScheduler;
29 }
30
22 namespace ui { 31 namespace ui {
23 class PlatformEventSource; 32 class PlatformEventSource;
24 } 33 }
25 34
26 namespace view_manager { 35 namespace view_manager {
27 36
28 class ConnectionManager; 37 class ConnectionManager;
29 38
30 class ViewManagerApp : public mojo::ApplicationDelegate, 39 class ViewManagerApp : public mojo::ApplicationDelegate,
31 public ConnectionManagerDelegate, 40 public ConnectionManagerDelegate,
41 public mojo::InterfaceFactory<mojo::Surface>,
32 public mojo::InterfaceFactory<mojo::ViewManagerRoot>, 42 public mojo::InterfaceFactory<mojo::ViewManagerRoot>,
33 public mojo::InterfaceFactory<mojo::Gpu> { 43 public mojo::InterfaceFactory<mojo::Gpu> {
34 public: 44 public:
35 ViewManagerApp(); 45 ViewManagerApp();
36 ~ViewManagerApp() override; 46 ~ViewManagerApp() override;
37 47
38 private: 48 private:
39 // ApplicationDelegate: 49 // ApplicationDelegate:
40 void Initialize(mojo::ApplicationImpl* app) override; 50 void Initialize(mojo::ApplicationImpl* app) override;
41 bool ConfigureIncomingConnection( 51 bool ConfigureIncomingConnection(
(...skipping 15 matching lines...) Expand all
57 mojo::ViewManagerClientPtr view_manager_client) override; 67 mojo::ViewManagerClientPtr view_manager_client) override;
58 68
59 // mojo::InterfaceFactory<mojo::ViewManagerRoot>: 69 // mojo::InterfaceFactory<mojo::ViewManagerRoot>:
60 void Create(mojo::ApplicationConnection* connection, 70 void Create(mojo::ApplicationConnection* connection,
61 mojo::InterfaceRequest<mojo::ViewManagerRoot> request) override; 71 mojo::InterfaceRequest<mojo::ViewManagerRoot> request) override;
62 72
63 // mojo::InterfaceFactory<mojo::Gpu> implementation. 73 // mojo::InterfaceFactory<mojo::Gpu> implementation.
64 void Create(mojo::ApplicationConnection* connection, 74 void Create(mojo::ApplicationConnection* connection,
65 mojo::InterfaceRequest<mojo::Gpu> request) override; 75 mojo::InterfaceRequest<mojo::Gpu> request) override;
66 76
77 // InterfaceFactory<Surface> implementation.
78 void Create(mojo::ApplicationConnection* connection,
79 mojo::InterfaceRequest<mojo::Surface> request) override;
80
81 // ViewManager
67 mojo::ApplicationImpl* app_impl_; 82 mojo::ApplicationImpl* app_impl_;
68 scoped_ptr<ConnectionManager> connection_manager_; 83 scoped_ptr<ConnectionManager> connection_manager_;
69 mojo::TracingImpl tracing_; 84 mojo::TracingImpl tracing_;
70 scoped_refptr<gles2::GpuState> gpu_state_; 85 scoped_refptr<gles2::GpuState> gpu_state_;
71 scoped_ptr<ui::PlatformEventSource> event_source_; 86 scoped_ptr<ui::PlatformEventSource> event_source_;
72 bool is_headless_; 87 bool is_headless_;
73 88
89 // Surfaces
90 scoped_refptr<surfaces::SurfacesState> surfaces_state_;
91
74 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp); 92 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
75 }; 93 };
76 94
77 } // namespace view_manager 95 } // namespace view_manager
78 96
79 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_ 97 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698