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

Side by Side Diff: ui/views/corewm/focus_controller.h

Issue 14222019: Trying to activate a window in a workspace other than the current is ignored while a system modal d… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: focus controller unittest Created 7 years, 8 months 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
OLDNEW
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_COREWM_FOCUS_CONTROLLER_H_ 5 #ifndef UI_VIEWS_COREWM_FOCUS_CONTROLLER_H_
6 #define UI_VIEWS_COREWM_FOCUS_CONTROLLER_H_ 6 #define UI_VIEWS_COREWM_FOCUS_CONTROLLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/scoped_observer.h" 9 #include "base/scoped_observer.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // Overridden from aura::WindowObserver: 78 // Overridden from aura::WindowObserver:
79 virtual void OnWindowVisibilityChanged(aura::Window* window, 79 virtual void OnWindowVisibilityChanged(aura::Window* window,
80 bool visible) OVERRIDE; 80 bool visible) OVERRIDE;
81 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 81 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
82 virtual void OnWindowHierarchyChanging( 82 virtual void OnWindowHierarchyChanging(
83 const HierarchyChangeParams& params) OVERRIDE; 83 const HierarchyChangeParams& params) OVERRIDE;
84 virtual void OnWindowHierarchyChanged( 84 virtual void OnWindowHierarchyChanged(
85 const HierarchyChangeParams& params) OVERRIDE; 85 const HierarchyChangeParams& params) OVERRIDE;
86 86
87 // Internal implementations that set the focused/active windows, fire events 87 // Internal implementations that set the focused/active windows, fire events
sky 2013/04/24 14:14:53 Now that you've added a comment for 87 it no longe
sschmitz 2013/04/24 15:42:04 Done.
88 // etc. These functions must be called with valid focusable/activatable 88 // etc. These functions must be called with valid focusable/activatable
89 // windows. 89 // windows.
90 void SetFocusedWindow(aura::Window* window); 90 void SetFocusedWindow(aura::Window* window);
91 void SetActiveWindow(aura::Window* window); 91 // |requested window| refers to the window that was passed in to an external
92 // request (e.g. FocusWindow or ActivateWindow). It may be NULL, e.g. if
93 // SetActiveWindow was not called by an external request. |active_window|
94 // refers to the actual window to be activated, which may be different.
95 void SetActiveWindow(aura::Window* requested_window,
96 aura::Window* active_window);
92 97
93 // Called when a window's disposition changed such that it and its hierarchy 98 // Called when a window's disposition changed such that it and its hierarchy
94 // are no longer focusable/activatable. |next| is a valid window that is used 99 // are no longer focusable/activatable. |next| is a valid window that is used
95 // as a starting point for finding a window to focus next based on rules. 100 // as a starting point for finding a window to focus next based on rules.
96 void WindowLostFocusFromDispositionChange(aura::Window* window, 101 void WindowLostFocusFromDispositionChange(aura::Window* window,
97 aura::Window* next); 102 aura::Window* next);
98 103
99 // Called when an attempt is made to focus or activate a window via an input 104 // Called when an attempt is made to focus or activate a window via an input
100 // event targeted at that window. Rules determine the best focusable window 105 // event targeted at that window. Rules determine the best focusable window
101 // for the input window. 106 // for the input window.
(...skipping 12 matching lines...) Expand all
114 119
115 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 120 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
116 121
117 DISALLOW_COPY_AND_ASSIGN(FocusController); 122 DISALLOW_COPY_AND_ASSIGN(FocusController);
118 }; 123 };
119 124
120 } // namespace corewm 125 } // namespace corewm
121 } // namespace views 126 } // namespace views
122 127
123 #endif // UI_VIEWS_COREWM_FOCUS_CONTROLLER_H_ 128 #endif // UI_VIEWS_COREWM_FOCUS_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698