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

Unified Diff: ash/wm/window_util.cc

Issue 9689047: Added notion of currently active app / browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove default args from State Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/window_util.cc
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index f7d7aaeffb5cae0538a8bfbc2f350ee814bad0f2..fbced529377c77dddfa458c33292ffff2728df6d 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -22,17 +22,21 @@ DEFINE_WINDOW_PROPERTY_KEY(bool, kOpenWindowSplitKey, false);
namespace wm {
void ActivateWindow(aura::Window* window) {
- aura::client::GetActivationClient(Shell::GetRootWindow())->ActivateWindow(
+ DCHECK(window->GetRootWindow());
+ aura::client::GetActivationClient(window->GetRootWindow())->ActivateWindow(
window);
}
void DeactivateWindow(aura::Window* window) {
- aura::client::GetActivationClient(Shell::GetRootWindow())->DeactivateWindow(
+ DCHECK(window->GetRootWindow());
+ aura::client::GetActivationClient(window->GetRootWindow())->DeactivateWindow(
window);
}
bool IsActiveWindow(aura::Window* window) {
- return GetActiveWindow() == window;
+ DCHECK(window->GetRootWindow());
sky 2012/03/13 17:14:42 Maybe this shouldn't be a DCHECK, but instead retu
DaveMoore 2012/03/13 23:33:56 Done.
+ return aura::client::GetActivationClient(window->GetRootWindow())->
+ GetActiveWindow() == window;
}
aura::Window* GetActiveWindow() {

Powered by Google App Engine
This is Rietveld 408576698