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

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

Issue 11363177: Don't use drag to corner resizing for unresizable windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 8 years, 1 month 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/wm/window_util.h ('k') | ash/wm/workspace/workspace_window_resizer.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 <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return false; 72 return false;
73 aura::client::ActivationClient* client = 73 aura::client::ActivationClient* client =
74 aura::client::GetActivationClient(window->GetRootWindow()); 74 aura::client::GetActivationClient(window->GetRootWindow());
75 return client && client->CanActivateWindow(window); 75 return client && client->CanActivateWindow(window);
76 } 76 }
77 77
78 bool CanMaximizeWindow(const aura::Window* window) { 78 bool CanMaximizeWindow(const aura::Window* window) {
79 return window->GetProperty(aura::client::kCanMaximizeKey); 79 return window->GetProperty(aura::client::kCanMaximizeKey);
80 } 80 }
81 81
82 bool CanResizeWindow(const aura::Window* window) {
83 return window->GetProperty(aura::client::kCanResizeKey);
84 }
85
82 bool IsWindowNormal(const aura::Window* window) { 86 bool IsWindowNormal(const aura::Window* window) {
83 return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey)); 87 return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey));
84 } 88 }
85 89
86 bool IsWindowStateNormal(ui::WindowShowState state) { 90 bool IsWindowStateNormal(ui::WindowShowState state) {
87 return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT; 91 return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT;
88 } 92 }
89 93
90 bool IsWindowMaximized(const aura::Window* window) { 94 bool IsWindowMaximized(const aura::Window* window) {
91 return window->GetProperty(aura::client::kShowStateKey) == 95 return window->GetProperty(aura::client::kShowStateKey) ==
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 x_offset = work_area.right() - bounds->x() - kMinimumOnScreenArea; 204 x_offset = work_area.right() - bounds->x() - kMinimumOnScreenArea;
201 } else if (bounds->right() < work_area.x()) { 205 } else if (bounds->right() < work_area.x()) {
202 x_offset = work_area.x() - bounds->right() + kMinimumOnScreenArea; 206 x_offset = work_area.x() - bounds->right() + kMinimumOnScreenArea;
203 } 207 }
204 bounds->Offset(x_offset, y_offset); 208 bounds->Offset(x_offset, y_offset);
205 } 209 }
206 } 210 }
207 211
208 } // namespace wm 212 } // namespace wm
209 } // namespace ash 213 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698