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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // Overridden from aura::WindowTreeHostObserver: | 231 // Overridden from aura::WindowTreeHostObserver: |
235 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; | 232 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; |
236 void OnHostResized(const aura::WindowTreeHost* host) override; | 233 void OnHostResized(const aura::WindowTreeHost* host) override; |
237 void OnHostMoved(const aura::WindowTreeHost* host, | 234 void OnHostMoved(const aura::WindowTreeHost* host, |
238 const gfx::Point& new_origin) override; | 235 const gfx::Point& new_origin) override; |
239 | 236 |
240 private: | 237 private: |
241 friend class FocusManagerEventHandler; | 238 friend class FocusManagerEventHandler; |
242 friend class RootWindowDestructionObserver; | 239 friend class RootWindowDestructionObserver; |
243 | 240 |
244 // Installs the input method filter. | |
245 void InstallInputMethodEventFilter(); | |
246 | |
247 // To save a clear on platforms where the window is never transparent, the | 241 // To save a clear on platforms where the window is never transparent, the |
248 // window is only set as transparent when the glass frame is in use. | 242 // window is only set as transparent when the glass frame is in use. |
249 void UpdateWindowTransparency(); | 243 void UpdateWindowTransparency(); |
250 | 244 |
251 void RootWindowDestroyed(); | 245 void RootWindowDestroyed(); |
252 | 246 |
253 scoped_ptr<aura::WindowTreeHost> host_; | 247 scoped_ptr<aura::WindowTreeHost> host_; |
254 DesktopWindowTreeHost* desktop_window_tree_host_; | 248 DesktopWindowTreeHost* desktop_window_tree_host_; |
255 | 249 |
256 // See class documentation for Widget in widget.h for a note about ownership. | 250 // See class documentation for Widget in widget.h for a note about ownership. |
(...skipping 15 matching lines...) Expand all Loading... |
272 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; | 266 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; |
273 scoped_ptr<aura::client::ScreenPositionClient> position_client_; | 267 scoped_ptr<aura::client::ScreenPositionClient> position_client_; |
274 scoped_ptr<aura::client::DragDropClient> drag_drop_client_; | 268 scoped_ptr<aura::client::DragDropClient> drag_drop_client_; |
275 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; | 269 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; |
276 scoped_ptr<DesktopEventClient> event_client_; | 270 scoped_ptr<DesktopEventClient> event_client_; |
277 scoped_ptr<FocusManagerEventHandler> focus_manager_event_handler_; | 271 scoped_ptr<FocusManagerEventHandler> focus_manager_event_handler_; |
278 | 272 |
279 // Toplevel event filter which dispatches to other event filters. | 273 // Toplevel event filter which dispatches to other event filters. |
280 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; | 274 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; |
281 | 275 |
282 scoped_ptr<wm::InputMethodEventFilter> input_method_event_filter_; | |
283 | |
284 scoped_ptr<DropHelper> drop_helper_; | 276 scoped_ptr<DropHelper> drop_helper_; |
285 int last_drop_operation_; | 277 int last_drop_operation_; |
286 | 278 |
287 scoped_ptr<corewm::TooltipController> tooltip_controller_; | 279 scoped_ptr<corewm::TooltipController> tooltip_controller_; |
288 scoped_ptr<TooltipManagerAura> tooltip_manager_; | 280 scoped_ptr<TooltipManagerAura> tooltip_manager_; |
289 | 281 |
290 scoped_ptr<wm::VisibilityController> visibility_controller_; | 282 scoped_ptr<wm::VisibilityController> visibility_controller_; |
291 | 283 |
292 scoped_ptr<wm::WindowModalityController> | 284 scoped_ptr<wm::WindowModalityController> |
293 window_modality_controller_; | 285 window_modality_controller_; |
(...skipping 23 matching lines...) Expand all Loading... |
317 // The following factory is used for calls to close the NativeWidgetAura | 309 // The following factory is used for calls to close the NativeWidgetAura |
318 // instance. | 310 // instance. |
319 base::WeakPtrFactory<DesktopNativeWidgetAura> close_widget_factory_; | 311 base::WeakPtrFactory<DesktopNativeWidgetAura> close_widget_factory_; |
320 | 312 |
321 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); | 313 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); |
322 }; | 314 }; |
323 | 315 |
324 } // namespace views | 316 } // namespace views |
325 | 317 |
326 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ | 318 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ |
OLD | NEW |