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

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

Issue 1921353002: Moves handful of files to ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell_ids
Patch Set: merge to trunk Created 4 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
« no previous file with comments | « ash/wm/window_state.cc ('k') | ash/wm/window_state_delegate.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_state_aura.h" 5 #include "ash/wm/window_state_aura.h"
6 6
7 #include "ash/wm/aura/wm_window_aura.h" 7 #include "ash/wm/aura/wm_window_aura.h"
8 #include "ash/wm/common/window_state.h"
8 #include "ash/wm/window_properties.h" 9 #include "ash/wm/window_properties.h"
9 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace wm { 14 namespace wm {
15 15
16 WindowState* GetActiveWindowState() { 16 WindowState* GetActiveWindowState() {
17 aura::Window* active = GetActiveWindow(); 17 aura::Window* active = GetActiveWindow();
18 return active ? GetWindowState(active) : nullptr; 18 return active ? GetWindowState(active) : nullptr;
19 } 19 }
20 20
21 WindowState* GetWindowState(aura::Window* window) { 21 WindowState* GetWindowState(aura::Window* window) {
22 if (!window) 22 if (!window)
23 return nullptr; 23 return nullptr;
24 WindowState* settings = window->GetProperty(kWindowStateKey); 24 WindowState* settings = window->GetProperty(kWindowStateKey);
25 if (!settings) { 25 if (!settings) {
26 settings = new WindowState(WmWindowAura::Get(window)); 26 settings = new WindowState(WmWindowAura::Get(window));
27 window->SetProperty(kWindowStateKey, settings); 27 window->SetProperty(kWindowStateKey, settings);
28 } 28 }
29 return settings; 29 return settings;
30 } 30 }
31 31
32 const WindowState* GetWindowState(const aura::Window* window) { 32 const WindowState* GetWindowState(const aura::Window* window) {
33 return GetWindowState(const_cast<aura::Window*>(window)); 33 return GetWindowState(const_cast<aura::Window*>(window));
34 } 34 }
35 35
36 } // namespace wm 36 } // namespace wm
37 } // namespace ash 37 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_state.cc ('k') | ash/wm/window_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698