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

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: 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 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_delegate.h"
16 #include "components/view_manager/surfaces/surfaces_state.h"
13 #include "mojo/application/public/cpp/app_lifetime_helper.h" 17 #include "mojo/application/public/cpp/app_lifetime_helper.h"
14 #include "mojo/application/public/cpp/application_delegate.h" 18 #include "mojo/application/public/cpp/application_delegate.h"
15 #include "mojo/application/public/cpp/interface_factory.h" 19 #include "mojo/application/public/cpp/interface_factory.h"
16 #include "mojo/common/tracing_impl.h" 20 #include "mojo/common/tracing_impl.h"
17 21
18 namespace mojo { 22 namespace mojo {
19 class ApplicationImpl; 23 class ApplicationImpl;
20 } 24 }
21 25
26 namespace surfaces {
27 class DisplayImpl;
28 class SurfacesImpl;
29 class SurfacesScheduler;
30 }
31
22 namespace ui { 32 namespace ui {
23 class PlatformEventSource; 33 class PlatformEventSource;
24 } 34 }
25 35
26 namespace view_manager { 36 namespace view_manager {
27 37
28 class ConnectionManager; 38 class ConnectionManager;
29 39
30 class ViewManagerApp : public mojo::ApplicationDelegate, 40 class ViewManagerApp : public mojo::ApplicationDelegate,
31 public ConnectionManagerDelegate, 41 public ConnectionManagerDelegate,
42 public mojo::InterfaceFactory<mojo::Surface>,
32 public mojo::InterfaceFactory<mojo::ViewManagerRoot>, 43 public mojo::InterfaceFactory<mojo::ViewManagerRoot>,
33 public mojo::InterfaceFactory<mojo::Gpu> { 44 public mojo::InterfaceFactory<mojo::Gpu>,
45 public surfaces::SurfacesDelegate {
34 public: 46 public:
35 ViewManagerApp(); 47 ViewManagerApp();
36 ~ViewManagerApp() override; 48 ~ViewManagerApp() override;
37 49
38 private: 50 private:
39 // ApplicationDelegate: 51 // ApplicationDelegate:
40 void Initialize(mojo::ApplicationImpl* app) override; 52 void Initialize(mojo::ApplicationImpl* app) override;
41 bool ConfigureIncomingConnection( 53 bool ConfigureIncomingConnection(
42 mojo::ApplicationConnection* connection) override; 54 mojo::ApplicationConnection* connection) override;
43 55
(...skipping 13 matching lines...) Expand all
57 mojo::ViewManagerClientPtr view_manager_client) override; 69 mojo::ViewManagerClientPtr view_manager_client) override;
58 70
59 // mojo::InterfaceFactory<mojo::ViewManagerRoot>: 71 // mojo::InterfaceFactory<mojo::ViewManagerRoot>:
60 void Create(mojo::ApplicationConnection* connection, 72 void Create(mojo::ApplicationConnection* connection,
61 mojo::InterfaceRequest<mojo::ViewManagerRoot> request) override; 73 mojo::InterfaceRequest<mojo::ViewManagerRoot> request) override;
62 74
63 // mojo::InterfaceFactory<mojo::Gpu> implementation. 75 // mojo::InterfaceFactory<mojo::Gpu> implementation.
64 void Create(mojo::ApplicationConnection* connection, 76 void Create(mojo::ApplicationConnection* connection,
65 mojo::InterfaceRequest<mojo::Gpu> request) override; 77 mojo::InterfaceRequest<mojo::Gpu> request) override;
66 78
79 // InterfaceFactory<Surface> implementation.
80 void Create(mojo::ApplicationConnection* connection,
81 mojo::InterfaceRequest<mojo::Surface> request) override;
82
83 // SurfacesDelegat implementation.
84 void OnSurfaceConnectionClosed(surfaces::SurfacesImpl* surface) override;
85
86 // ViewManager
67 mojo::ApplicationImpl* app_impl_; 87 mojo::ApplicationImpl* app_impl_;
68 scoped_ptr<ConnectionManager> connection_manager_; 88 scoped_ptr<ConnectionManager> connection_manager_;
69 mojo::TracingImpl tracing_; 89 mojo::TracingImpl tracing_;
70 scoped_refptr<gles2::GpuState> gpu_state_; 90 scoped_refptr<gles2::GpuState> gpu_state_;
71 scoped_ptr<ui::PlatformEventSource> event_source_; 91 scoped_ptr<ui::PlatformEventSource> event_source_;
72 bool is_headless_; 92 bool is_headless_;
73 93
94 // Surfaces
95 std::set<surfaces::SurfacesImpl*> surfaces_;
96 scoped_refptr<surfaces::SurfacesState> surfaces_state_;
97
74 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp); 98 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
75 }; 99 };
76 100
77 } // namespace view_manager 101 } // namespace view_manager
78 102
79 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_ 103 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
OLDNEW
« no previous file with comments | « components/view_manager/surfaces/top_level_display_client.cc ('k') | components/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698