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

Unified Diff: ash/common/wm/panels/panel_window_resizer.cc

Issue 2731663002: Remove WmWindowProperty (Closed)
Patch Set: Created 3 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
Index: ash/common/wm/panels/panel_window_resizer.cc
diff --git a/ash/common/wm/panels/panel_window_resizer.cc b/ash/common/wm/panels/panel_window_resizer.cc
index 9a8aa83511c11db0533e688b3dd24e15c0419d01..3778eedb557d33ee41d141072ee27e45ba1c351b 100644
--- a/ash/common/wm/panels/panel_window_resizer.cc
+++ b/ash/common/wm/panels/panel_window_resizer.cc
@@ -10,8 +10,8 @@
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_window.h"
-#include "ash/common/wm_window_property.h"
#include "ash/public/cpp/shell_window_ids.h"
+#include "ash/public/cpp/window_properties.h"
#include "ash/root_window_controller.h"
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_types.h"
@@ -106,8 +106,7 @@ PanelWindowResizer::PanelWindowResizer(WindowResizer* next_window_resizer,
panel_container_(NULL),
initial_panel_container_(NULL),
did_move_or_resize_(false),
- was_attached_(
- GetTarget()->GetBoolProperty(WmWindowProperty::PANEL_ATTACHED)),
+ was_attached_(GetTarget()->aura_window()->GetProperty(kPanelAttachedKey)),
weak_ptr_factory_(this) {
DCHECK(details().is_resizable);
panel_container_ = GetTarget()->GetRootWindow()->GetChildByShellWindowId(
@@ -159,7 +158,7 @@ void PanelWindowResizer::StartedDragging() {
if (!was_attached_) {
// Attach the panel while dragging, placing it in front of other panels.
WmWindow* target = GetTarget();
- target->SetBoolProperty(WmWindowProperty::PANEL_ATTACHED, true);
+ target->aura_window()->SetProperty(kPanelAttachedKey, true);
// We use root window coordinates to ensure that during the drag the panel
// is reparented to a container in the root window that has that window.
WmWindow* target_root = target->GetRootWindow();
@@ -174,10 +173,10 @@ void PanelWindowResizer::StartedDragging() {
void PanelWindowResizer::FinishDragging() {
if (!did_move_or_resize_)
return;
- if (GetTarget()->GetBoolProperty(WmWindowProperty::PANEL_ATTACHED) !=
+ if (GetTarget()->aura_window()->GetProperty(kPanelAttachedKey) !=
details().should_attach_to_shelf) {
- GetTarget()->SetBoolProperty(WmWindowProperty::PANEL_ATTACHED,
- details().should_attach_to_shelf);
+ GetTarget()->aura_window()->SetProperty(kPanelAttachedKey,
+ details().should_attach_to_shelf);
// We use last known location to ensure that after the drag the panel
// is reparented to a container in the root window that has that location.
WmWindow* target = GetTarget();

Powered by Google App Engine
This is Rietveld 408576698