| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "ui/aura/client/focus_change_observer.h" | 9 #include "ui/aura/client/focus_change_observer.h" |
| 10 #include "ui/aura/window_delegate.h" | 10 #include "ui/aura/window_delegate.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Called by our DesktopWindowTreeHost after it has deleted native resources; | 72 // Called by our DesktopWindowTreeHost after it has deleted native resources; |
| 73 // this is the signal that we should start our shutdown. | 73 // this is the signal that we should start our shutdown. |
| 74 virtual void OnHostClosed(); | 74 virtual void OnHostClosed(); |
| 75 | 75 |
| 76 // TODO(beng): remove this method and replace with an implementation of | 76 // TODO(beng): remove this method and replace with an implementation of |
| 77 // WindowDestroying() that takes the window being destroyed. | 77 // WindowDestroying() that takes the window being destroyed. |
| 78 // Called from ~DesktopWindowTreeHost. This takes the WindowEventDispatcher | 78 // Called from ~DesktopWindowTreeHost. This takes the WindowEventDispatcher |
| 79 // as by the time we get here |dispatcher_| is NULL. | 79 // as by the time we get here |dispatcher_| is NULL. |
| 80 virtual void OnDesktopWindowTreeHostDestroyed(aura::WindowTreeHost* host); | 80 virtual void OnDesktopWindowTreeHostDestroyed(aura::WindowTreeHost* host); |
| 81 | 81 |
| 82 wm::InputMethodEventFilter* input_method_event_filter() { | |
| 83 return input_method_event_filter_.get(); | |
| 84 } | |
| 85 wm::CompoundEventFilter* root_window_event_filter() { | 82 wm::CompoundEventFilter* root_window_event_filter() { |
| 86 return root_window_event_filter_.get(); | 83 return root_window_event_filter_.get(); |
| 87 } | 84 } |
| 88 aura::WindowTreeHost* host() { | 85 aura::WindowTreeHost* host() { |
| 89 return host_.get(); | 86 return host_.get(); |
| 90 } | 87 } |
| 91 | 88 |
| 92 // Ensures that the correct window is activated/deactivated based on whether | 89 // Ensures that the correct window is activated/deactivated based on whether |
| 93 // we are being activated/deactivated. | 90 // we are being activated/deactivated. |
| 94 void HandleActivationChanged(bool active); | 91 void HandleActivationChanged(bool active); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Overridden from aura::WindowTreeHostObserver: | 229 // Overridden from aura::WindowTreeHostObserver: |
| 233 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; | 230 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; |
| 234 void OnHostResized(const aura::WindowTreeHost* host) override; | 231 void OnHostResized(const aura::WindowTreeHost* host) override; |
| 235 void OnHostMoved(const aura::WindowTreeHost* host, | 232 void OnHostMoved(const aura::WindowTreeHost* host, |
| 236 const gfx::Point& new_origin) override; | 233 const gfx::Point& new_origin) override; |
| 237 | 234 |
| 238 private: | 235 private: |
| 239 friend class FocusManagerEventHandler; | 236 friend class FocusManagerEventHandler; |
| 240 friend class RootWindowDestructionObserver; | 237 friend class RootWindowDestructionObserver; |
| 241 | 238 |
| 242 // Installs the input method filter. | |
| 243 void InstallInputMethodEventFilter(); | |
| 244 | |
| 245 // To save a clear on platforms where the window is never transparent, the | 239 // To save a clear on platforms where the window is never transparent, the |
| 246 // window is only set as transparent when the glass frame is in use. | 240 // window is only set as transparent when the glass frame is in use. |
| 247 void UpdateWindowTransparency(); | 241 void UpdateWindowTransparency(); |
| 248 | 242 |
| 249 void RootWindowDestroyed(); | 243 void RootWindowDestroyed(); |
| 250 | 244 |
| 251 scoped_ptr<aura::WindowTreeHost> host_; | 245 scoped_ptr<aura::WindowTreeHost> host_; |
| 252 DesktopWindowTreeHost* desktop_window_tree_host_; | 246 DesktopWindowTreeHost* desktop_window_tree_host_; |
| 253 | 247 |
| 254 // See class documentation for Widget in widget.h for a note about ownership. | 248 // See class documentation for Widget in widget.h for a note about ownership. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 270 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; | 264 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; |
| 271 scoped_ptr<aura::client::ScreenPositionClient> position_client_; | 265 scoped_ptr<aura::client::ScreenPositionClient> position_client_; |
| 272 scoped_ptr<aura::client::DragDropClient> drag_drop_client_; | 266 scoped_ptr<aura::client::DragDropClient> drag_drop_client_; |
| 273 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; | 267 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; |
| 274 scoped_ptr<DesktopEventClient> event_client_; | 268 scoped_ptr<DesktopEventClient> event_client_; |
| 275 scoped_ptr<FocusManagerEventHandler> focus_manager_event_handler_; | 269 scoped_ptr<FocusManagerEventHandler> focus_manager_event_handler_; |
| 276 | 270 |
| 277 // Toplevel event filter which dispatches to other event filters. | 271 // Toplevel event filter which dispatches to other event filters. |
| 278 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; | 272 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; |
| 279 | 273 |
| 280 scoped_ptr<wm::InputMethodEventFilter> input_method_event_filter_; | |
| 281 | |
| 282 scoped_ptr<DropHelper> drop_helper_; | 274 scoped_ptr<DropHelper> drop_helper_; |
| 283 int last_drop_operation_; | 275 int last_drop_operation_; |
| 284 | 276 |
| 285 scoped_ptr<corewm::TooltipController> tooltip_controller_; | 277 scoped_ptr<corewm::TooltipController> tooltip_controller_; |
| 286 scoped_ptr<TooltipManagerAura> tooltip_manager_; | 278 scoped_ptr<TooltipManagerAura> tooltip_manager_; |
| 287 | 279 |
| 288 scoped_ptr<wm::VisibilityController> visibility_controller_; | 280 scoped_ptr<wm::VisibilityController> visibility_controller_; |
| 289 | 281 |
| 290 scoped_ptr<wm::WindowModalityController> | 282 scoped_ptr<wm::WindowModalityController> |
| 291 window_modality_controller_; | 283 window_modality_controller_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 315 // The following factory is used for calls to close the NativeWidgetAura | 307 // The following factory is used for calls to close the NativeWidgetAura |
| 316 // instance. | 308 // instance. |
| 317 base::WeakPtrFactory<DesktopNativeWidgetAura> close_widget_factory_; | 309 base::WeakPtrFactory<DesktopNativeWidgetAura> close_widget_factory_; |
| 318 | 310 |
| 319 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); | 311 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); |
| 320 }; | 312 }; |
| 321 | 313 |
| 322 } // namespace views | 314 } // namespace views |
| 323 | 315 |
| 324 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ | 316 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |