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

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

Issue 9113045: Reworks the workspace code. Here's the new heuristics: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged and all that good stuff. Created 8 years, 11 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/wm/window_util.h ('k') | ash/wm/workspace/workspace.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 (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/wm/activation_controller.h" 7 #include "ash/wm/activation_controller.h"
8 #include "ui/aura/client/activation_client.h" 8 #include "ui/aura/client/activation_client.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/base/ui_base_types.h" 12 #include "ui/base/ui_base_types.h"
13 #include "ui/gfx/screen.h" 13 #include "ui/gfx/screen.h"
14 14
15 namespace ash { 15 namespace ash {
16 16
17 namespace {
18
19 const char kOpenWindowSplitKey[] = "OpenWindowSplit";
20
21 } // namespace
22
17 void ActivateWindow(aura::Window* window) { 23 void ActivateWindow(aura::Window* window) {
18 aura::client::GetActivationClient()->ActivateWindow(window); 24 aura::client::GetActivationClient()->ActivateWindow(window);
19 } 25 }
20 26
21 void DeactivateWindow(aura::Window* window) { 27 void DeactivateWindow(aura::Window* window) {
22 aura::client::GetActivationClient()->DeactivateWindow(window); 28 aura::client::GetActivationClient()->DeactivateWindow(window);
23 } 29 }
24 30
25 bool IsActiveWindow(aura::Window* window) { 31 bool IsActiveWindow(aura::Window* window) {
26 return GetActiveWindow() == window; 32 return GetActiveWindow() == window;
(...skipping 30 matching lines...) Expand all
57 bool HasFullscreenWindow(const WindowSet& windows) { 63 bool HasFullscreenWindow(const WindowSet& windows) {
58 for (WindowSet::const_iterator i = windows.begin(); i != windows.end(); ++i) { 64 for (WindowSet::const_iterator i = windows.begin(); i != windows.end(); ++i) {
59 if ((*i)->GetIntProperty(aura::client::kShowStateKey) 65 if ((*i)->GetIntProperty(aura::client::kShowStateKey)
60 == ui::SHOW_STATE_FULLSCREEN) { 66 == ui::SHOW_STATE_FULLSCREEN) {
61 return true; 67 return true;
62 } 68 }
63 } 69 }
64 return false; 70 return false;
65 } 71 }
66 72
73 void SetOpenWindowSplit(aura::Window* window, bool value) {
74 window->SetIntProperty(kOpenWindowSplitKey, value ? 1 : 0);
75 }
76
77 bool GetOpenWindowSplit(aura::Window* window) {
78 return window->GetIntProperty(kOpenWindowSplitKey) == 1;
79 }
80
67 } // namespace window_util 81 } // namespace window_util
68 } // namespace ash 82 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698