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

Side by Side Diff: mojo/services/view_manager/view_manager_app.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_VIEW_MANAGER_VIEW_MANAGER_APP_H_
6 #define SERVICES_VIEW_MANAGER_VIEW_MANAGER_APP_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/common/tracing_impl.h"
10 #include "mojo/public/cpp/application/application_delegate.h"
11 #include "mojo/public/cpp/application/interface_factory.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13 #include "mojo/public/cpp/bindings/error_handler.h"
14 #include "mojo/services/view_manager/connection_manager_delegate.h"
15 #include "third_party/mojo_services/src/view_manager/public/interfaces/view_mana ger.mojom.h"
16 #include "third_party/mojo_services/src/window_manager/public/interfaces/window_ manager_internal.mojom.h"
17
18 namespace mojo {
19 class ApplicationImpl;
20 }
21
22 namespace view_manager {
23
24 class ConnectionManager;
25
26 class ViewManagerApp
27 : public mojo::ApplicationDelegate,
28 public ConnectionManagerDelegate,
29 public mojo::ErrorHandler,
30 public mojo::InterfaceFactory<mojo::ViewManagerService>,
31 public mojo::InterfaceFactory<mojo::WindowManagerInternalClient> {
32 public:
33 ViewManagerApp();
34 ~ViewManagerApp() override;
35
36 private:
37 // ApplicationDelegate:
38 void Initialize(mojo::ApplicationImpl* app) override;
39 bool ConfigureIncomingConnection(
40 mojo::ApplicationConnection* connection) override;
41
42 // ConnectionManagerDelegate:
43 void OnLostConnectionToWindowManager() override;
44 ClientConnection* CreateClientConnectionForEmbedAtView(
45 ConnectionManager* connection_manager,
46 mojo::InterfaceRequest<mojo::ViewManagerService> service_request,
47 mojo::ConnectionSpecificId creator_id,
48 const std::string& creator_url,
49 const std::string& url,
50 const ViewId& root_id) override;
51 ClientConnection* CreateClientConnectionForEmbedAtView(
52 ConnectionManager* connection_manager,
53 mojo::InterfaceRequest<mojo::ViewManagerService> service_request,
54 mojo::ConnectionSpecificId creator_id,
55 const std::string& creator_url,
56 const ViewId& root_id,
57 mojo::ViewManagerClientPtr view_manager_client) override;
58
59 // mojo::InterfaceFactory<mojo::ViewManagerService>:
60 void Create(
61 mojo::ApplicationConnection* connection,
62 mojo::InterfaceRequest<mojo::ViewManagerService> request) override;
63
64 // mojo::InterfaceFactory<mojo::WindowManagerInternalClient>:
65 void Create(mojo::ApplicationConnection* connection,
66 mojo::InterfaceRequest<mojo::WindowManagerInternalClient> request)
67 override;
68
69 // ErrorHandler (for |wm_internal_| and |wm_internal_client_binding_|).
70 void OnConnectionError() override;
71
72 mojo::ApplicationImpl* app_impl_;
73 mojo::ApplicationConnection* wm_app_connection_;
74 scoped_ptr<mojo::Binding<mojo::WindowManagerInternalClient>>
75 wm_internal_client_binding_;
76 mojo::InterfaceRequest<mojo::ViewManagerClient> wm_internal_client_request_;
77 mojo::WindowManagerInternalPtr wm_internal_;
78 scoped_ptr<ConnectionManager> connection_manager_;
79 mojo::TracingImpl tracing_;
80
81 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
82 };
83
84 } // namespace view_manager
85
86 #endif // SERVICES_VIEW_MANAGER_VIEW_MANAGER_APP_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_coordinate_conversions_unittest.cc ('k') | mojo/services/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698