Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef ASH_WM_PROPERTY_UTIL_H_ | 5 #ifndef ASH_WM_PROPERTY_UTIL_H_ |
| 6 #define ASH_WM_PROPERTY_UTIL_H_ | 6 #define ASH_WM_PROPERTY_UTIL_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | |
| 9 | 10 |
| 10 namespace aura { | 11 namespace aura { |
| 11 class RootWindow; | 12 class RootWindow; |
| 12 class Window; | 13 class Window; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace gfx { | 16 namespace gfx { |
| 16 class Rect; | 17 class Rect; |
| 17 } | 18 } |
| 18 | 19 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 // Sets whether |window| should always be restored to the restore bounds | 56 // Sets whether |window| should always be restored to the restore bounds |
| 56 // (sometimes the workspace layout manager restores the window to its original | 57 // (sometimes the workspace layout manager restores the window to its original |
| 57 // bounds instead of the restore bounds. Setting this key overrides that | 58 // bounds instead of the restore bounds. Setting this key overrides that |
| 58 // behaviour). The flag is reset to the default value after the window is | 59 // behaviour). The flag is reset to the default value after the window is |
| 59 // restored. | 60 // restored. |
| 60 ASH_EXPORT void SetWindowAlwaysRestoresToRestoreBounds(aura::Window* window, | 61 ASH_EXPORT void SetWindowAlwaysRestoresToRestoreBounds(aura::Window* window, |
| 61 bool value); | 62 bool value); |
| 62 ASH_EXPORT bool GetWindowAlwaysRestoresToRestoreBounds( | 63 ASH_EXPORT bool GetWindowAlwaysRestoresToRestoreBounds( |
| 63 const aura::Window* window); | 64 const aura::Window* window); |
| 64 | 65 |
| 66 // Enum for possible edges that a window is docked on to the dock | |
| 67 enum DockEdge { | |
| 68 DOCK_EDGE_NONE, | |
| 69 DOCK_EDGE_LEFT, | |
| 70 DOCK_EDGE_RIGHT, | |
| 71 }; | |
|
flackr
2013/06/03 22:03:43
I'm not sure if we need to track which edge each w
varkha
2013/06/04 03:13:50
I thought this allows to keep the logic of compari
flackr
2013/06/04 19:58:10
At the point when you determine the dock edge, you
| |
| 72 | |
| 73 // Sets whether the specified window is docked near a screen edge. | |
| 74 // Default is DOCK_EDGE_NONE and may change when a window is moved by user or | |
| 75 // when the dock alignment is changed. | |
|
flackr
2013/06/03 22:03:43
You mean when the shelf alignment is changed right
varkha
2013/06/04 03:13:50
Done.
| |
| 76 ASH_EXPORT void SetDockEdge(aura::Window* window, DockEdge value); | |
| 77 ASH_EXPORT DockEdge GetDockEdge(const aura::Window* window); | |
| 78 | |
| 65 // Sets whether the specified window is tracked by workspace code. Default is | 79 // Sets whether the specified window is tracked by workspace code. Default is |
| 66 // true. If set to false the workspace does not switch the current workspace, | 80 // true. If set to false the workspace does not switch the current workspace, |
| 67 // nor does it attempt to impose constraints on the bounds of the window. This | 81 // nor does it attempt to impose constraints on the bounds of the window. This |
| 68 // is intended for tab dragging. | 82 // is intended for tab dragging. |
| 69 ASH_EXPORT void SetTrackedByWorkspace(aura::Window* window, bool value); | 83 ASH_EXPORT void SetTrackedByWorkspace(aura::Window* window, bool value); |
| 70 ASH_EXPORT bool GetTrackedByWorkspace(const aura::Window* window); | 84 ASH_EXPORT bool GetTrackedByWorkspace(const aura::Window* window); |
| 71 | 85 |
| 72 // Makes |window| persist across all workspaces. The default is controlled | 86 // Makes |window| persist across all workspaces. The default is controlled |
| 73 // by SetDefaultPersistsAcrossAllWorkspaces(). | 87 // by SetDefaultPersistsAcrossAllWorkspaces(). |
| 74 ASH_EXPORT void SetPersistsAcrossAllWorkspaces( | 88 ASH_EXPORT void SetPersistsAcrossAllWorkspaces( |
| 75 aura::Window* window, | 89 aura::Window* window, |
| 76 WindowPersistsAcrossAllWorkspacesType type); | 90 WindowPersistsAcrossAllWorkspacesType type); |
| 77 ASH_EXPORT bool GetPersistsAcrossAllWorkspaces(aura::Window* window); | 91 ASH_EXPORT bool GetPersistsAcrossAllWorkspaces(aura::Window* window); |
| 78 | 92 |
| 79 // Sets the default value for whether windows persist across all workspaces. | 93 // Sets the default value for whether windows persist across all workspaces. |
| 80 // The default is false. | 94 // The default is false. |
| 81 ASH_EXPORT void SetDefaultPersistsAcrossAllWorkspaces(bool value); | 95 ASH_EXPORT void SetDefaultPersistsAcrossAllWorkspaces(bool value); |
| 82 | 96 |
| 83 // Sets/Gets the RootWindowController for |root_window|. | 97 // Sets/Gets the RootWindowController for |root_window|. |
| 84 ASH_EXPORT void SetRootWindowController( | 98 ASH_EXPORT void SetRootWindowController( |
| 85 aura::RootWindow* root_window, | 99 aura::RootWindow* root_window, |
| 86 internal::RootWindowController* controller); | 100 internal::RootWindowController* controller); |
| 87 ASH_EXPORT internal::RootWindowController* GetRootWindowController( | 101 ASH_EXPORT internal::RootWindowController* GetRootWindowController( |
| 88 const aura::RootWindow* root_window); | 102 const aura::RootWindow* root_window); |
| 89 | 103 |
| 90 } | 104 } |
| 91 | 105 |
| 92 #endif // ASH_WM_PROPERTY_UTIL_H_ | 106 #endif // ASH_WM_PROPERTY_UTIL_H_ |
| OLD | NEW |