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

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

Issue 10914231: Map fullscreen button to maximize (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix review issues Created 8 years, 3 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 #include "ash/wm/window_util.h" 5 #include "ash/wm/window_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/activation_controller.h" 10 #include "ash/wm/activation_controller.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 bool CanActivateWindow(aura::Window* window) { 55 bool CanActivateWindow(aura::Window* window) {
56 DCHECK(window); 56 DCHECK(window);
57 if (!window->GetRootWindow()) 57 if (!window->GetRootWindow())
58 return false; 58 return false;
59 aura::client::ActivationClient* client = 59 aura::client::ActivationClient* client =
60 aura::client::GetActivationClient(window->GetRootWindow()); 60 aura::client::GetActivationClient(window->GetRootWindow());
61 return client && client->CanActivateWindow(window); 61 return client && client->CanActivateWindow(window);
62 } 62 }
63 63
64 bool CanMaximizeWindow(aura::Window* window) {
65 return window->GetProperty(aura::client::kCanMaximizeKey);
66 }
67
64 bool IsWindowNormal(aura::Window* window) { 68 bool IsWindowNormal(aura::Window* window) {
65 return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey)); 69 return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey));
66 } 70 }
67 71
68 bool IsWindowStateNormal(ui::WindowShowState state) { 72 bool IsWindowStateNormal(ui::WindowShowState state) {
69 return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT; 73 return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT;
70 } 74 }
71 75
72 bool IsWindowMaximized(aura::Window* window) { 76 bool IsWindowMaximized(aura::Window* window) {
73 return window->GetProperty(aura::client::kShowStateKey) == 77 return window->GetProperty(aura::client::kShowStateKey) ==
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 it != children.end(); 127 it != children.end();
124 ++it) { 128 ++it) {
125 ui::Layer* child = *it; 129 ui::Layer* child = *it;
126 DeepDeleteLayers(child); 130 DeepDeleteLayers(child);
127 } 131 }
128 delete layer; 132 delete layer;
129 } 133 }
130 134
131 } // namespace wm 135 } // namespace wm
132 } // namespace ash 136 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698