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

Side by Side Diff: ash/wm/caption_buttons/frame_caption_button_container_view.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ 5 #ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
6 #define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ 6 #define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/caption_buttons/alternate_frame_size_button_delegate.h" 9 #include "ash/wm/caption_buttons/alternate_frame_size_button_delegate.h"
10 #include "ui/gfx/image/image_skia.h" 10 #include "ui/gfx/image/image_skia.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // views::ButtonListener override: 117 // views::ButtonListener override:
118 virtual void ButtonPressed(views::Button* sender, 118 virtual void ButtonPressed(views::Button* sender,
119 const ui::Event& event) OVERRIDE; 119 const ui::Event& event) OVERRIDE;
120 120
121 // AlternateFrameSizeButton::Delegate overrides: 121 // AlternateFrameSizeButton::Delegate overrides:
122 virtual bool IsMinimizeButtonVisible() const OVERRIDE; 122 virtual bool IsMinimizeButtonVisible() const OVERRIDE;
123 virtual void SetButtonsToNormal(Animate animate) OVERRIDE; 123 virtual void SetButtonsToNormal(Animate animate) OVERRIDE;
124 virtual void SetButtonIcons(CaptionButtonIcon minimize_button_icon, 124 virtual void SetButtonIcons(CaptionButtonIcon minimize_button_icon,
125 CaptionButtonIcon close_button_icon, 125 CaptionButtonIcon close_button_icon,
126 Animate animate) OVERRIDE; 126 Animate animate) OVERRIDE;
127 virtual const FrameCaptionButton* PressButtonAt( 127 virtual const FrameCaptionButton* GetButtonClosestTo(
128 const gfx::Point& position_in_screen, 128 const gfx::Point& position_in_screen) const OVERRIDE;
129 const gfx::Insets& pressed_hittest_outer_insets) const OVERRIDE; 129 virtual void SetHoveredAndPressedButtons(
130 const FrameCaptionButton* to_hover,
131 const FrameCaptionButton* to_press) OVERRIDE;
130 132
131 // The widget that the buttons act on. 133 // The widget that the buttons act on.
132 views::Widget* frame_; 134 views::Widget* frame_;
133 135
134 // The close button separator. 136 // The close button separator.
135 gfx::ImageSkia button_separator_; 137 gfx::ImageSkia button_separator_;
136 138
137 // The buttons. In the normal button style, at most one of |minimize_button_| 139 // The buttons. In the normal button style, at most one of |minimize_button_|
138 // and |size_button_| is visible. 140 // and |size_button_| is visible.
139 FrameCaptionButton* minimize_button_; 141 FrameCaptionButton* minimize_button_;
140 FrameCaptionButton* size_button_; 142 FrameCaptionButton* size_button_;
141 FrameCaptionButton* close_button_; 143 FrameCaptionButton* close_button_;
142 144
143 // Mapping of the images needed to paint a button for each of the values of 145 // Mapping of the images needed to paint a button for each of the values of
144 // CaptionButtonIcon. 146 // CaptionButtonIcon.
145 std::map<CaptionButtonIcon, ButtonIconIds> button_icon_id_map_; 147 std::map<CaptionButtonIcon, ButtonIconIds> button_icon_id_map_;
146 148
147 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); 149 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView);
148 }; 150 };
149 151
150 } // namesapace ash 152 } // namesapace ash
151 153
152 #endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ 154 #endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698