| OLD | NEW |
| 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_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ | 5 #ifndef COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| 6 #define COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ | 6 #define COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // of this object. They may implement the associated ViewManager/WindowManager | 38 // of this object. They may implement the associated ViewManager/WindowManager |
| 39 // delegate interfaces exposed by the view manager, this object provides the | 39 // delegate interfaces exposed by the view manager, this object provides the |
| 40 // canonical implementation of said interfaces but will call out to the wrapped | 40 // canonical implementation of said interfaces but will call out to the wrapped |
| 41 // instances. | 41 // instances. |
| 42 class WindowManagerApp | 42 class WindowManagerApp |
| 43 : public mojo::ApplicationDelegate, | 43 : public mojo::ApplicationDelegate, |
| 44 public mojo::ViewManagerDelegate, | 44 public mojo::ViewManagerDelegate, |
| 45 public mojo::ViewObserver, | 45 public mojo::ViewObserver, |
| 46 public mojo::InterfaceFactory<mojo::WindowManager>, | 46 public mojo::InterfaceFactory<mojo::WindowManager>, |
| 47 public mojo::InterfaceFactory<mojo::WindowManagerInternal>, | 47 public mojo::InterfaceFactory<mojo::WindowManagerInternal>, |
| 48 public mojo::WindowManagerInternal { | 48 public mojo::WindowManagerInternal, |
| 49 public mojo::ErrorHandler { |
| 49 public: | 50 public: |
| 50 WindowManagerApp(ViewManagerDelegate* view_manager_delegate, | 51 WindowManagerApp(ViewManagerDelegate* view_manager_delegate, |
| 51 WindowManagerDelegate* window_manager_delegate); | 52 WindowManagerDelegate* window_manager_delegate); |
| 52 ~WindowManagerApp() override; | 53 ~WindowManagerApp() override; |
| 53 | 54 |
| 54 // Register/deregister new connections to the window manager service. | 55 // Register/deregister new connections to the window manager service. |
| 55 void AddConnection(WindowManagerImpl* connection); | 56 void AddConnection(WindowManagerImpl* connection); |
| 56 void RemoveConnection(WindowManagerImpl* connection); | 57 void RemoveConnection(WindowManagerImpl* connection); |
| 57 | 58 |
| 58 void DispatchInputEventToViewDEPRECATED(mojo::View* view, | 59 void DispatchInputEventToViewDEPRECATED(mojo::View* view, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 107 |
| 107 // InterfaceFactory<WindowManager>: | 108 // InterfaceFactory<WindowManager>: |
| 108 void Create(mojo::ApplicationConnection* connection, | 109 void Create(mojo::ApplicationConnection* connection, |
| 109 mojo::InterfaceRequest<mojo::WindowManager> request) override; | 110 mojo::InterfaceRequest<mojo::WindowManager> request) override; |
| 110 | 111 |
| 111 // WindowManagerInternal: | 112 // WindowManagerInternal: |
| 112 void SetViewManagerClient( | 113 void SetViewManagerClient( |
| 113 mojo::ScopedMessagePipeHandle view_manager_client_request) override; | 114 mojo::ScopedMessagePipeHandle view_manager_client_request) override; |
| 114 void OnAccelerator(mojo::EventPtr event) override; | 115 void OnAccelerator(mojo::EventPtr event) override; |
| 115 | 116 |
| 117 // ErrorHandler: |
| 118 void OnConnectionError() override; |
| 119 |
| 116 mojo::Shell* shell_; | 120 mojo::Shell* shell_; |
| 117 | 121 |
| 118 ViewManagerDelegate* wrapped_view_manager_delegate_; | 122 ViewManagerDelegate* wrapped_view_manager_delegate_; |
| 119 WindowManagerDelegate* window_manager_delegate_; | 123 WindowManagerDelegate* window_manager_delegate_; |
| 120 | 124 |
| 121 mojo::ViewManagerServicePtr view_manager_service_; | 125 mojo::ViewManagerServicePtr view_manager_service_; |
| 122 scoped_ptr<mojo::ViewManagerClientFactory> view_manager_client_factory_; | 126 scoped_ptr<mojo::ViewManagerClientFactory> view_manager_client_factory_; |
| 123 | 127 |
| 124 mojo::View* root_; | 128 mojo::View* root_; |
| 125 | 129 |
| 126 Connections connections_; | 130 Connections connections_; |
| 127 | 131 |
| 128 mojo::WindowManagerInternalClientPtr window_manager_client_; | 132 mojo::WindowManagerInternalClientPtr window_manager_client_; |
| 129 | 133 |
| 130 ScopedVector<PendingEmbed> pending_embeds_; | 134 ScopedVector<PendingEmbed> pending_embeds_; |
| 131 | 135 |
| 132 scoped_ptr<mojo::ViewManagerClient> view_manager_client_; | 136 scoped_ptr<mojo::ViewManagerClient> view_manager_client_; |
| 133 | 137 |
| 134 scoped_ptr<mojo::Binding<WindowManagerInternal>> wm_internal_binding_; | 138 scoped_ptr<mojo::Binding<WindowManagerInternal>> wm_internal_binding_; |
| 135 | 139 |
| 136 DISALLOW_COPY_AND_ASSIGN(WindowManagerApp); | 140 DISALLOW_COPY_AND_ASSIGN(WindowManagerApp); |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace window_manager | 143 } // namespace window_manager |
| 140 | 144 |
| 141 #endif // COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ | 145 #endif // COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| OLD | NEW |