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

Unified Diff: ash/wm/caption_buttons/alternate_frame_size_button_delegate.h

Issue 168943006: Keep the size button pressed when the user hovers the snap left or snap right button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/wm/caption_buttons/alternate_frame_size_button_delegate.h
diff --git a/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h b/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h
index c1472b21bf141f037196266f0fc596f369b51eab..2b9311c4a40ad94d7cdeaf83dabe6aed5c7f5029 100644
--- a/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h
+++ b/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h
@@ -11,6 +11,7 @@
namespace gfx {
class Insets;
class Point;
+class Vector2d;
}
namespace ash {
@@ -38,15 +39,15 @@ class ASH_EXPORT AlternateFrameSizeButtonDelegate {
CaptionButtonIcon right_button_action,
Animate animate) = 0;
- // Presses the button at |position_in_screen| and unpresses any other pressed
- // caption buttons.
- // |pressed_button_hittest_insets| indicates how much the hittest insets for
- // the currently pressed button should be expanded if no button was found at
- // |position_in_screen| using the normal button hittest insets.
- // Returns the button which was pressed.
- virtual const FrameCaptionButton* PressButtonAt(
- const gfx::Point& position_in_screen,
- const gfx::Insets& pressed_button_hittest_insets) const = 0;
+ // Returns the button closest to |position_in_screen|.
+ virtual const FrameCaptionButton* GetButtonClosestTo(
+ const gfx::Point& position_in_screen) const = 0;
+
+ // Sets |to_hover| and |to_pressed| to STATE_HOVERED and STATE_PRESSED
+ // respectively. All other buttons are to set to STATE_NORMAL.
+ virtual void SetHoveredAndPressedButtons(
+ const FrameCaptionButton* to_hover,
+ const FrameCaptionButton* to_press) = 0;
protected:
virtual ~AlternateFrameSizeButtonDelegate() {}
« no previous file with comments | « ash/wm/caption_buttons/alternate_frame_size_button.cc ('k') | ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698