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

Unified Diff: ui/aura/root_window.h

Issue 8926004: Revert 114095 - Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.h
===================================================================
--- ui/aura/root_window.h (revision 114098)
+++ ui/aura/root_window.h (working copy)
@@ -57,6 +57,7 @@
gfx::Point last_mouse_location() const { return last_mouse_location_; }
gfx::NativeCursor last_cursor() const { return last_cursor_; }
StackingClient* stacking_client() { return stacking_client_.get(); }
+ Window* active_window() { return active_window_; }
Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
Window* capture_window() { return capture_window_; }
ScreenAura* screen() { return screen_; }
@@ -94,6 +95,20 @@
// Called when the native screen's resolution changes.
void OnNativeScreenResized(const gfx::Size& size);
+ // Sets the active window to |window| and the focused window to |to_focus|.
+ // If |to_focus| is NULL, |window| is focused. Does nothing if |window| is
+ // NULL.
+ void SetActiveWindow(Window* window, Window* to_focus);
+
+ // Activates the topmost window. Does nothing if the topmost window is already
+ // active.
+ void ActivateTopmostWindow();
+
+ // Deactivates |window| and activates the topmost window. Does nothing if
+ // |window| is not a topmost window, or there are no other suitable windows to
+ // activate.
+ void Deactivate(Window* window);
+
// Invoked when |window| is initialized.
void WindowInitialized(Window* window);
@@ -107,8 +122,8 @@
MessageLoop::Dispatcher* GetDispatcher();
// Add/remove observer.
- void AddRootWindowObserver(RootWindowObserver* observer);
- void RemoveRootWindowObserver(RootWindowObserver* observer);
+ void AddObserver(RootWindowObserver* observer);
+ void RemoveObserver(RootWindowObserver* observer);
// Are any mouse buttons currently down?
bool IsMouseButtonDown() const;
@@ -193,6 +208,8 @@
// Used to schedule painting.
base::WeakPtrFactory<RootWindow> schedule_paint_factory_;
+ Window* active_window_;
+
// Last location seen in a mouse event.
gfx::Point last_mouse_location_;
@@ -202,6 +219,10 @@
// Last cursor set. Used for testing.
gfx::NativeCursor last_cursor_;
+ // Are we in the process of being destroyed? Used to avoid processing during
+ // destruction.
+ bool in_destructor_;
+
ObserverList<RootWindowObserver> observers_;
ScreenAura* screen_;
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698