summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 21:51:06 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 21:51:06 +0000
commitb5e498da5e398d59739c431525edf0682d7680fe (patch)
treef37a87d0fed83d46728d1aaa2de690d1719e0561
parent1f2b2fcea5361d4d1c1dca69bf1651bb93efcb08 (diff)
downloadchromium_src-b5e498da5e398d59739c431525edf0682d7680fe.zip
chromium_src-b5e498da5e398d59739c431525edf0682d7680fe.tar.gz
chromium_src-b5e498da5e398d59739c431525edf0682d7680fe.tar.bz2
aura/ash cleanup: Use a single window-key for constrained windows.
There is a kConstrainedWindowKey in both ash and aura::client namespace, which is pretty confusing when reading the code. So remove the ash version. BUG=none R=sky@chromium.org Review URL: https://codereview.chromium.org/97893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238195 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash_constants.cc2
-rw-r--r--ash/ash_constants.h5
-rw-r--r--ash/wm/solo_window_tracker.cc2
-rw-r--r--ash/wm/solo_window_tracker_unittest.cc2
-rw-r--r--chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc1
5 files changed, 2 insertions, 10 deletions
diff --git a/ash/ash_constants.cc b/ash/ash_constants.cc
index a1404d0..82501f2 100644
--- a/ash/ash_constants.cc
+++ b/ash/ash_constants.cc
@@ -9,8 +9,6 @@
namespace ash {
-DEFINE_WINDOW_PROPERTY_KEY(bool, kConstrainedWindowKey, false);
-
const int kResizeAreaCornerSize = 16;
const int kResizeOutsideBoundsSize = 6;
const int kResizeOutsideBoundsScaleForTouch = 5;
diff --git a/ash/ash_constants.h b/ash/ash_constants.h
index 8e88985..cad4354 100644
--- a/ash/ash_constants.h
+++ b/ash/ash_constants.h
@@ -13,11 +13,6 @@ typedef unsigned int SkColor;
namespace ash {
-// The window is a constrained window and lives therefore entirely within
-// another aura window.
-ASH_EXPORT extern const aura::WindowProperty<bool>* const
- kConstrainedWindowKey;
-
// In the window corners, the resize areas don't actually expand bigger, but the
// 16 px at the end of each edge triggers diagonal resizing.
ASH_EXPORT extern const int kResizeAreaCornerSize;
diff --git a/ash/wm/solo_window_tracker.cc b/ash/wm/solo_window_tracker.cc
index 71299d2..633d3bd 100644
--- a/ash/wm/solo_window_tracker.cc
+++ b/ash/wm/solo_window_tracker.cc
@@ -60,7 +60,7 @@ bool IsValidCandidate(aura::Window* window) {
window->layer() &&
window->layer()->type() != ui::LAYER_NOT_DRAWN &&
window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE &&
- !window->GetProperty(ash::kConstrainedWindowKey);
+ !window->GetProperty(aura::client::kConstrainedWindowKey);
}
// Schedule's a paint of the window's entire bounds.
diff --git a/ash/wm/solo_window_tracker_unittest.cc b/ash/wm/solo_window_tracker_unittest.cc
index 5792008..a874bb8 100644
--- a/ash/wm/solo_window_tracker_unittest.cc
+++ b/ash/wm/solo_window_tracker_unittest.cc
@@ -272,7 +272,7 @@ TEST_F(SoloWindowTrackerTest, Constrained) {
// Create a fake constrained window.
scoped_ptr<aura::Window> w2(CreateWindowInPrimary());
- w2->SetProperty(ash::kConstrainedWindowKey, true);
+ w2->SetProperty(aura::client::kConstrainedWindowKey, true);
w2->Show();
// Despite two windows, the first window should still be considered "solo"
diff --git a/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc b/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc
index 46d8a99..24d8a48 100644
--- a/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc
+++ b/chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc
@@ -92,7 +92,6 @@ class NativeWebContentsModalDialogManagerViews
}
// TODO(wittman): remove once the new visual style is complete
- widget->GetNativeWindow()->SetProperty(ash::kConstrainedWindowKey, true);
views::corewm::SetModalParent(
widget->GetNativeWindow(),
platform_util::GetParent(widget->GetNativeView()));