| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "ui/aura/aura_export.h" | 14 #include "ui/aura/aura_export.h" |
| 15 #include "ui/aura/cursor.h" | 15 #include "ui/aura/cursor.h" |
| 16 #include "ui/aura/focus_manager.h" | 16 #include "ui/aura/focus_manager.h" |
| 17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
| 18 #include "ui/base/events.h" | 18 #include "ui/base/events.h" |
| 19 #include "ui/gfx/compositor/compositor.h" | 19 #include "ui/gfx/compositor/compositor.h" |
| 20 #include "ui/gfx/compositor/layer_animation_observer.h" | 20 #include "ui/gfx/compositor/layer_animation_observer.h" |
| 21 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
| 22 #include "ui/gfx/point.h" | 22 #include "ui/gfx/point.h" |
| 23 | 23 |
| 24 namespace gfx { | 24 namespace gfx { |
| 25 class Size; | 25 class Size; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace ui { | 28 namespace ui { |
| 29 class InputMethod; |
| 29 class LayerAnimationSequence; | 30 class LayerAnimationSequence; |
| 30 class Transform; | 31 class Transform; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace aura { | 34 namespace aura { |
| 34 | 35 |
| 36 namespace test { |
| 37 class DesktopHostIMETest; |
| 38 } // namespace test |
| 39 |
| 35 class DesktopHost; | 40 class DesktopHost; |
| 36 class DesktopObserver; | 41 class DesktopObserver; |
| 37 class KeyEvent; | 42 class KeyEvent; |
| 38 class MouseEvent; | 43 class MouseEvent; |
| 39 class ScreenAura; | 44 class ScreenAura; |
| 40 class StackingClient; | 45 class StackingClient; |
| 41 class TouchEvent; | 46 class TouchEvent; |
| 42 | 47 |
| 43 // Desktop is responsible for hosting a set of windows. | 48 // Desktop is responsible for hosting a set of windows. |
| 44 class AURA_EXPORT Desktop : public ui::CompositorDelegate, | 49 class AURA_EXPORT Desktop : public ui::CompositorDelegate, |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 143 |
| 139 // Sets capture to the specified window. | 144 // Sets capture to the specified window. |
| 140 void SetCapture(Window* window); | 145 void SetCapture(Window* window); |
| 141 | 146 |
| 142 // If |window| has mouse capture, the current capture window is set to NULL. | 147 // If |window| has mouse capture, the current capture window is set to NULL. |
| 143 void ReleaseCapture(Window* window); | 148 void ReleaseCapture(Window* window); |
| 144 | 149 |
| 145 // Overridden from Window: | 150 // Overridden from Window: |
| 146 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; | 151 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; |
| 147 | 152 |
| 153 // Gets the input method for the desktop. |
| 154 ui::InputMethod* GetInputMethod(); |
| 155 |
| 148 #if !defined(NDEBUG) | 156 #if !defined(NDEBUG) |
| 149 // Toggles the host's full screen state. | 157 // Toggles the host's full screen state. |
| 150 void ToggleFullScreen(); | 158 void ToggleFullScreen(); |
| 151 #endif | 159 #endif |
| 152 | 160 |
| 153 private: | 161 private: |
| 162 friend class aura::test::DesktopHostIMETest; // need to access |host_|. |
| 163 |
| 154 Desktop(); | 164 Desktop(); |
| 155 virtual ~Desktop(); | 165 virtual ~Desktop(); |
| 156 | 166 |
| 157 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 167 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
| 158 // sending exited and entered events as its value changes. | 168 // sending exited and entered events as its value changes. |
| 159 void HandleMouseMoved(const MouseEvent& event, Window* target); | 169 void HandleMouseMoved(const MouseEvent& event, Window* target); |
| 160 | 170 |
| 161 bool ProcessMouseEvent(Window* target, MouseEvent* event); | 171 bool ProcessMouseEvent(Window* target, MouseEvent* event); |
| 162 bool ProcessKeyEvent(Window* target, KeyEvent* event); | 172 bool ProcessKeyEvent(Window* target, KeyEvent* event); |
| 163 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); | 173 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 Window* mouse_moved_handler_; | 244 Window* mouse_moved_handler_; |
| 235 Window* focused_window_; | 245 Window* focused_window_; |
| 236 Window* touch_event_handler_; | 246 Window* touch_event_handler_; |
| 237 | 247 |
| 238 DISALLOW_COPY_AND_ASSIGN(Desktop); | 248 DISALLOW_COPY_AND_ASSIGN(Desktop); |
| 239 }; | 249 }; |
| 240 | 250 |
| 241 } // namespace aura | 251 } // namespace aura |
| 242 | 252 |
| 243 #endif // UI_AURA_DESKTOP_H_ | 253 #endif // UI_AURA_DESKTOP_H_ |
| OLD | NEW |