Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: ui/aura/desktop.h

Issue 8635014: DefaultDispatcher for MessagePumpX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DeleteInstanceForTesting->DeleteInstance Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/message_pump_x.cc ('k') | ui/aura/desktop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 28 matching lines...) Expand all
39 class ScreenAura; 39 class ScreenAura;
40 class StackingClient; 40 class StackingClient;
41 class TouchEvent; 41 class TouchEvent;
42 42
43 // Desktop is responsible for hosting a set of windows. 43 // Desktop is responsible for hosting a set of windows.
44 class AURA_EXPORT Desktop : public ui::CompositorDelegate, 44 class AURA_EXPORT Desktop : public ui::CompositorDelegate,
45 public Window, 45 public Window,
46 public internal::FocusManager, 46 public internal::FocusManager,
47 public ui::LayerAnimationObserver { 47 public ui::LayerAnimationObserver {
48 public: 48 public:
49 Desktop();
50 virtual ~Desktop();
51
52 static Desktop* GetInstance(); 49 static Desktop* GetInstance();
53 static void DeleteInstanceForTesting(); 50 static void DeleteInstance();
54 51
55 static void set_use_fullscreen_host_window(bool use_fullscreen) { 52 static void set_use_fullscreen_host_window(bool use_fullscreen) {
56 use_fullscreen_host_window_ = use_fullscreen; 53 use_fullscreen_host_window_ = use_fullscreen;
57 } 54 }
58 55
59 ui::Compositor* compositor() { return compositor_.get(); } 56 ui::Compositor* compositor() { return compositor_.get(); }
60 gfx::Point last_mouse_location() const { return last_mouse_location_; } 57 gfx::Point last_mouse_location() const { return last_mouse_location_; }
61 gfx::NativeCursor last_cursor() const { return last_cursor_; } 58 gfx::NativeCursor last_cursor() const { return last_cursor_; }
62 StackingClient* stacking_client() { return stacking_client_.get(); } 59 StackingClient* stacking_client() { return stacking_client_.get(); }
63 Window* active_window() { return active_window_; } 60 Window* active_window() { return active_window_; }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 141
145 // Overridden from Window: 142 // Overridden from Window:
146 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; 143 virtual void SetTransform(const ui::Transform& transform) OVERRIDE;
147 144
148 #if !defined(NDEBUG) 145 #if !defined(NDEBUG)
149 // Toggles the host's full screen state. 146 // Toggles the host's full screen state.
150 void ToggleFullScreen(); 147 void ToggleFullScreen();
151 #endif 148 #endif
152 149
153 private: 150 private:
151 Desktop();
152 virtual ~Desktop();
153
154 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, 154 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|,
155 // sending exited and entered events as its value changes. 155 // sending exited and entered events as its value changes.
156 void HandleMouseMoved(const MouseEvent& event, Window* target); 156 void HandleMouseMoved(const MouseEvent& event, Window* target);
157 157
158 bool ProcessMouseEvent(Window* target, MouseEvent* event); 158 bool ProcessMouseEvent(Window* target, MouseEvent* event);
159 bool ProcessKeyEvent(Window* target, KeyEvent* event); 159 bool ProcessKeyEvent(Window* target, KeyEvent* event);
160 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); 160 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event);
161 161
162 // Overridden from ui::CompositorDelegate 162 // Overridden from ui::CompositorDelegate
163 virtual void ScheduleDraw(); 163 virtual void ScheduleDraw();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 Window* mouse_moved_handler_; 231 Window* mouse_moved_handler_;
232 Window* focused_window_; 232 Window* focused_window_;
233 Window* touch_event_handler_; 233 Window* touch_event_handler_;
234 234
235 DISALLOW_COPY_AND_ASSIGN(Desktop); 235 DISALLOW_COPY_AND_ASSIGN(Desktop);
236 }; 236 };
237 237
238 } // namespace aura 238 } // namespace aura
239 239
240 #endif // UI_AURA_DESKTOP_H_ 240 #endif // UI_AURA_DESKTOP_H_
OLDNEW
« no previous file with comments | « base/message_pump_x.cc ('k') | ui/aura/desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698