OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AURA_DESKTOP_H_ | 5 #ifndef UI_AURA_DESKTOP_H_ |
6 #define UI_AURA_DESKTOP_H_ | 6 #define UI_AURA_DESKTOP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Handles a key event. Returns true if handled. | 89 // Handles a key event. Returns true if handled. |
90 bool DispatchKeyEvent(KeyEvent* event); | 90 bool DispatchKeyEvent(KeyEvent* event); |
91 | 91 |
92 // Handles a touch event. Returns true if handled. | 92 // Handles a touch event. Returns true if handled. |
93 bool DispatchTouchEvent(TouchEvent* event); | 93 bool DispatchTouchEvent(TouchEvent* event); |
94 | 94 |
95 // Called when the host changes size. | 95 // Called when the host changes size. |
96 void OnHostResized(const gfx::Size& size); | 96 void OnHostResized(const gfx::Size& size); |
97 | 97 |
98 // Sets the active window to |window| and the focused window to |to_focus|. | 98 // Sets the active window to |window| and the focused window to |to_focus|. |
99 // If |to_focus| is NULL, |window| is focused. | 99 // If |to_focus| is NULL, |window| is focused. Does nothing if |window| is |
100 // |window| can be NULL. | 100 // NULL. |
101 void SetActiveWindow(Window* window, Window* to_focus); | 101 void SetActiveWindow(Window* window, Window* to_focus); |
102 | 102 |
103 // Activates the topmost window. Does nothing if the topmost window is already | 103 // Activates the topmost window. Does nothing if the topmost window is already |
104 // active. | 104 // active. |
105 void ActivateTopmostWindow(); | 105 void ActivateTopmostWindow(); |
106 | 106 |
107 // Deactivates |window| and activates the topmost window. Does nothing if | 107 // Deactivates |window| and activates the topmost window. Does nothing if |
108 // |window| is not a topmost window, or there are no other suitable windows to | 108 // |window| is not a topmost window, or there are no other suitable windows to |
109 // activate. | 109 // activate. |
110 void Deactivate(Window* window); | 110 void Deactivate(Window* window); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 Window* mouse_moved_handler_; | 217 Window* mouse_moved_handler_; |
218 Window* focused_window_; | 218 Window* focused_window_; |
219 Window* touch_event_handler_; | 219 Window* touch_event_handler_; |
220 | 220 |
221 DISALLOW_COPY_AND_ASSIGN(Desktop); | 221 DISALLOW_COPY_AND_ASSIGN(Desktop); |
222 }; | 222 }; |
223 | 223 |
224 } // namespace aura | 224 } // namespace aura |
225 | 225 |
226 #endif // UI_AURA_DESKTOP_H_ | 226 #endif // UI_AURA_DESKTOP_H_ |
OLD | NEW |