Chromium Code Reviews| Index: ash/wm/caption_buttons/frame_maximize_button.h |
| diff --git a/ash/wm/caption_buttons/frame_maximize_button.h b/ash/wm/caption_buttons/frame_maximize_button.h |
| index 023a8e06312a9c1f7d5dc3739349f415ac2f1512..7583fd927adf045bf4c75183be4537346c0b2d79 100644 |
| --- a/ash/wm/caption_buttons/frame_maximize_button.h |
| +++ b/ash/wm/caption_buttons/frame_maximize_button.h |
| @@ -15,7 +15,7 @@ |
| #include "ui/views/widget/widget_observer.h" |
| namespace views { |
| -class NonClientFrameView; |
| +class Widget; |
| } |
| namespace ash { |
| @@ -33,7 +33,7 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton, |
| public aura::WindowObserver { |
| public: |
| FrameMaximizeButton(views::ButtonListener* listener, |
| - views::NonClientFrameView* frame); |
| + views::Widget* frame); |
| virtual ~FrameMaximizeButton(); |
| // Updates |snap_type_| based on a a given snap type. This is used by |
| @@ -138,8 +138,11 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton, |
| // Determine the maximize type of this window. |
| MaximizeBubbleFrameState GetMaximizeBubbleFrameState() const; |
| - // Frame that the maximize button acts on. |
| - views::NonClientFrameView* frame_; |
| + // Widget that the maximize button acts on. |
|
James Cook
2013/09/16 16:08:07
Maybe comment why you need to cache the widget, ra
|
| + views::Widget* frame_; |
| + |
| + // True if we have put observers on |frame_|. |
| + bool observing_frame_; |
| // Renders the snap position. |
| scoped_ptr<internal::PhantomWindowController> phantom_window_; |
| @@ -151,10 +154,6 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton, |
| // Did the user drag far enough to trigger snapping? |
| bool exceeded_drag_threshold_; |
| - // Remember the widget on which we have put some an observers, |
| - // so that we can remove it upon destruction. |
| - views::Widget* widget_; |
| - |
| // Location of the press. |
| gfx::Point press_location_; |