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

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

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correcting logic to avoid getting stuck on resize Created 7 years, 7 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/property_util.h" 5 #include "ash/wm/property_util.h"
6 6
7 #include "ash/ash_export.h" 7 #include "ash/ash_export.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/wm/window_properties.h" 9 #include "ash/wm/window_properties.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 25 matching lines...) Expand all
36 const gfx::Rect* rect = GetRestoreBoundsInScreen(window); 36 const gfx::Rect* rect = GetRestoreBoundsInScreen(window);
37 if (!rect) 37 if (!rect)
38 return gfx::Rect(); 38 return gfx::Rect();
39 return ScreenAsh::ConvertRectFromScreen(window->parent(), *rect); 39 return ScreenAsh::ConvertRectFromScreen(window->parent(), *rect);
40 } 40 }
41 41
42 void ClearRestoreBounds(aura::Window* window) { 42 void ClearRestoreBounds(aura::Window* window) {
43 window->ClearProperty(aura::client::kRestoreBoundsKey); 43 window->ClearProperty(aura::client::kRestoreBoundsKey);
44 } 44 }
45 45
46 void SetStuckToEdge(aura::Window* window, int64 value) {
47 LOG(INFO) << "SetStuckToEdge " << value;
flackr 2013/05/22 02:00:56 Probably shouldn't land with this.
48 window->SetProperty(internal::kWindowStuckToEdge, value);
49 }
50
51 int64 GetStuckToEdge(const aura::Window* window) {
52 return window->GetProperty(internal::kWindowStuckToEdge);
53 }
54
46 void SetTrackedByWorkspace(aura::Window* window, bool value) { 55 void SetTrackedByWorkspace(aura::Window* window, bool value) {
47 window->SetProperty(internal::kWindowTrackedByWorkspaceKey, value); 56 window->SetProperty(internal::kWindowTrackedByWorkspaceKey, value);
48 } 57 }
49 58
50 bool GetTrackedByWorkspace(const aura::Window* window) { 59 bool GetTrackedByWorkspace(const aura::Window* window) {
51 return window->GetProperty(internal::kWindowTrackedByWorkspaceKey); 60 return window->GetProperty(internal::kWindowTrackedByWorkspaceKey);
52 } 61 }
53 62
54 void SetIgnoredByShelf(aura::Window* window, bool value) { 63 void SetIgnoredByShelf(aura::Window* window, bool value) {
55 window->SetProperty(internal::kIgnoredByShelfKey, value); 64 window->SetProperty(internal::kIgnoredByShelfKey, value);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return root_window ? 105 return root_window ?
97 root_window->GetProperty(internal::kRootWindowControllerKey) : NULL; 106 root_window->GetProperty(internal::kRootWindowControllerKey) : NULL;
98 } 107 }
99 108
100 void SetRootWindowController(aura::RootWindow* root_window, 109 void SetRootWindowController(aura::RootWindow* root_window,
101 internal::RootWindowController* controller) { 110 internal::RootWindowController* controller) {
102 root_window->SetProperty(internal::kRootWindowControllerKey, controller); 111 root_window->SetProperty(internal::kRootWindowControllerKey, controller);
103 } 112 }
104 113
105 } // namespace ash 114 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698