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

Unified Diff: ash/wm/property_util.cc

Issue 9566014: Attempt 2: Allows tab dragging when maximized on aura. To fix it I made it so (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/property_util.h ('k') | ash/wm/toplevel_window_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/property_util.cc
diff --git a/ash/wm/property_util.cc b/ash/wm/property_util.cc
index e3b577d2aa11667b4c39dd74dd92984199736116..2e5440c4ca8a500941730fb248995390e5529897 100644
--- a/ash/wm/property_util.cc
+++ b/ash/wm/property_util.cc
@@ -7,11 +7,20 @@
#include "ash/wm/window_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_property.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/rect.h"
+DECLARE_WINDOW_PROPERTY_TYPE(bool)
+
namespace ash {
+namespace {
+
+const aura::WindowProperty<bool> kWindowTrackedByWorkspaceSplitProp = {true};
+
+} // namespace
+
void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds) {
scoped_ptr<const gfx::Rect> old_bounds(GetRestoreBounds(window));
window->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds));
@@ -37,4 +46,15 @@ void ToggleMaximizedState(aura::Window* window) {
: ui::SHOW_STATE_MAXIMIZED);
}
+const aura::WindowProperty<bool>* const
+ kWindowTrackedByWorkspaceSplitPropKey = &kWindowTrackedByWorkspaceSplitProp;
+
+void SetTrackedByWorkspace(aura::Window* window, bool value) {
+ window->SetProperty(kWindowTrackedByWorkspaceSplitPropKey, value);
+}
+
+bool GetTrackedByWorkspace(aura::Window* window) {
+ return window->GetProperty(kWindowTrackedByWorkspaceSplitPropKey);
+}
+
}
« no previous file with comments | « ash/wm/property_util.h ('k') | ash/wm/toplevel_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698