Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / ash / frame / caption_buttons / frame_size_button_delegate.h
blobddccf16c6628ba1ea04c09f632eabc2856ed3fcf
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_DELEGATE_H_
6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_DELEGATE_H_
8 #include "ash/ash_export.h"
9 #include "ash/frame/caption_buttons/caption_button_types.h"
11 namespace gfx {
12 class Insets;
13 class Point;
14 class Vector2d;
17 namespace ash {
18 class FrameCaptionButton;
20 // Delegate interface for FrameSizeButton.
21 class ASH_EXPORT FrameSizeButtonDelegate {
22 public:
23 enum Animate {
24 ANIMATE_YES,
25 ANIMATE_NO
28 // Returns whether the minimize button is visible.
29 virtual bool IsMinimizeButtonVisible() const = 0;
31 // Reset the caption button views::Button::ButtonState back to normal. If
32 // |animate| is ANIMATE_YES, the buttons will crossfade back to their
33 // original icons.
34 virtual void SetButtonsToNormal(Animate animate) = 0;
36 // Sets the minimize and close button icons. The buttons will crossfade to
37 // their new icons if |animate| is ANIMATE_YES.
38 virtual void SetButtonIcons(CaptionButtonIcon minimize_button_icon,
39 CaptionButtonIcon close_button_icon,
40 Animate animate) = 0;
42 // Returns the button closest to |position_in_screen|.
43 virtual const FrameCaptionButton* GetButtonClosestTo(
44 const gfx::Point& position_in_screen) const = 0;
46 // Sets |to_hover| and |to_pressed| to STATE_HOVERED and STATE_PRESSED
47 // respectively. All other buttons are to set to STATE_NORMAL.
48 virtual void SetHoveredAndPressedButtons(
49 const FrameCaptionButton* to_hover,
50 const FrameCaptionButton* to_press) = 0;
52 protected:
53 virtual ~FrameSizeButtonDelegate() {}
56 } // namespace ash
58 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_DELEGATE_H_