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

Side by Side Diff: ash/wm/window_util.cc

Issue 9837046: Revert r128507 "Revert r128436 "relanding: disabled workspace_window_resizer test. fixed access-aft… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.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) 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 #include "ash/wm/window_util.h" 5 #include "ash/wm/window_util.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/activation_controller.h" 8 #include "ash/wm/activation_controller.h"
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 21 matching lines...) Expand all
32 DCHECK(window); 32 DCHECK(window);
33 DCHECK(window->GetRootWindow()); 33 DCHECK(window->GetRootWindow());
34 aura::client::GetActivationClient(window->GetRootWindow())->DeactivateWindow( 34 aura::client::GetActivationClient(window->GetRootWindow())->DeactivateWindow(
35 window); 35 window);
36 } 36 }
37 37
38 bool IsActiveWindow(aura::Window* window) { 38 bool IsActiveWindow(aura::Window* window) {
39 DCHECK(window); 39 DCHECK(window);
40 if (!window->GetRootWindow()) 40 if (!window->GetRootWindow())
41 return false; 41 return false;
42 42 aura::client::ActivationClient* client =
43 return aura::client::GetActivationClient(window->GetRootWindow())-> 43 aura::client::GetActivationClient(window->GetRootWindow());
44 GetActiveWindow() == window; 44 return client && client->GetActiveWindow() == window;
45 } 45 }
46 46
47 aura::Window* GetActiveWindow() { 47 aura::Window* GetActiveWindow() {
48 return aura::client::GetActivationClient(Shell::GetRootWindow())-> 48 return aura::client::GetActivationClient(Shell::GetRootWindow())->
49 GetActiveWindow(); 49 GetActiveWindow();
50 } 50 }
51 51
52 aura::Window* GetActivatableWindow(aura::Window* window) { 52 aura::Window* GetActivatableWindow(aura::Window* window) {
53 return internal::ActivationController::GetActivatableWindow(window, NULL); 53 return internal::ActivationController::GetActivatableWindow(window, NULL);
54 } 54 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void SetOpenWindowSplit(aura::Window* window, bool value) { 86 void SetOpenWindowSplit(aura::Window* window, bool value) {
87 window->SetProperty(kOpenWindowSplitKey, value); 87 window->SetProperty(kOpenWindowSplitKey, value);
88 } 88 }
89 89
90 bool GetOpenWindowSplit(aura::Window* window) { 90 bool GetOpenWindowSplit(aura::Window* window) {
91 return window->GetProperty(kOpenWindowSplitKey); 91 return window->GetProperty(kOpenWindowSplitKey);
92 } 92 }
93 93
94 } // namespace wm 94 } // namespace wm
95 } // namespace ash 95 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698