Chromium Code Reviews| 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 SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ | 5 #ifndef SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| 6 #define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ | 6 #define SERVICES_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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 typedef std::set<WindowManagerImpl*> Connections; | 102 typedef std::set<WindowManagerImpl*> Connections; |
| 103 typedef std::set<mojo::Id> RegisteredViewIdSet; | 103 typedef std::set<mojo::Id> RegisteredViewIdSet; |
| 104 | 104 |
| 105 struct PendingEmbed; | 105 struct PendingEmbed; |
| 106 class WindowManagerInternalImpl; | 106 class WindowManagerInternalImpl; |
| 107 | 107 |
| 108 mojo::ViewManager* view_manager() { | 108 mojo::ViewManager* view_manager() { |
| 109 return root_ ? root_->view_manager() : nullptr; | 109 return root_ ? root_->view_manager() : nullptr; |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool SetCapture(mojo::View* view); | |
|
msw
2015/02/25 22:29:30
nit: consider "SetCaptureImpl" here, etc. below, t
sky
2015/02/25 23:20:27
Done.
| |
| 113 bool FocusWindow(mojo::View* view); | |
| 114 bool ActivateWindow(mojo::View* view); | |
| 115 | |
| 112 // Creates an ViewTarget for every view in the hierarchy beneath |view|, | 116 // Creates an ViewTarget for every view in the hierarchy beneath |view|, |
| 113 // and adds to the registry so that it can be retrieved later via | 117 // and adds to the registry so that it can be retrieved later via |
| 114 // GetViewTargetForViewId(). | 118 // GetViewTargetForViewId(). |
| 115 // TODO(beng): perhaps View should have a property bag. | 119 // TODO(beng): perhaps View should have a property bag. |
| 116 void RegisterSubtree(mojo::View* view); | 120 void RegisterSubtree(mojo::View* view); |
| 117 | 121 |
| 118 // Recursively invokes Unregister() for |view| and all its descendants. | 122 // Recursively invokes Unregister() for |view| and all its descendants. |
| 119 void UnregisterSubtree(mojo::View* view); | 123 void UnregisterSubtree(mojo::View* view); |
| 120 | 124 |
| 121 // Deletes the ViewTarget associated with the hierarchy beneath |id|, | 125 // Deletes the ViewTarget associated with the hierarchy beneath |id|, |
| 122 // and removes from the registry. | 126 // and removes from the registry. |
| 123 void Unregister(mojo::View* view); | 127 void Unregister(mojo::View* view); |
| 124 | 128 |
| 125 // Overridden from ViewManagerDelegate: | 129 // Overridden from ViewManagerDelegate: |
| 126 void OnEmbed(mojo::View* root, | 130 void OnEmbed(mojo::View* root, |
| 127 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 131 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 128 mojo::ServiceProviderPtr exposed_services) override; | 132 mojo::ServiceProviderPtr exposed_services) override; |
| 129 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override; | 133 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override; |
| 134 void OnPerformAction(mojo::View* view, const std::string& action) override; | |
| 130 | 135 |
| 131 // Overridden from ViewObserver: | 136 // Overridden from ViewObserver: |
| 132 void OnTreeChanged(const ViewObserver::TreeChangeParams& params) override; | 137 void OnTreeChanged(const ViewObserver::TreeChangeParams& params) override; |
| 133 void OnViewDestroying(mojo::View* view) override; | 138 void OnViewDestroying(mojo::View* view) override; |
| 134 | 139 |
| 135 // Overridden from ui::EventHandler: | 140 // Overridden from ui::EventHandler: |
| 136 void OnEvent(ui::Event* event) override; | 141 void OnEvent(ui::Event* event) override; |
| 137 | 142 |
| 138 // Overridden from mojo::FocusControllerObserver: | 143 // Overridden from mojo::FocusControllerObserver: |
| 139 void OnFocused(mojo::View* gained_focus) override; | 144 void OnFocused(mojo::View* gained_focus) override; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 scoped_ptr<ViewEventDispatcher> view_event_dispatcher_; | 195 scoped_ptr<ViewEventDispatcher> view_event_dispatcher_; |
| 191 | 196 |
| 192 scoped_ptr<mojo::Binding<WindowManagerInternal>> wm_internal_binding_; | 197 scoped_ptr<mojo::Binding<WindowManagerInternal>> wm_internal_binding_; |
| 193 | 198 |
| 194 DISALLOW_COPY_AND_ASSIGN(WindowManagerApp); | 199 DISALLOW_COPY_AND_ASSIGN(WindowManagerApp); |
| 195 }; | 200 }; |
| 196 | 201 |
| 197 } // namespace window_manager | 202 } // namespace window_manager |
| 198 | 203 |
| 199 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ | 204 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| OLD | NEW |