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.
4
5#ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_DELEGATE_H_
6#define ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_DELEGATE_H_
7
8#include "ash/ash_export.h"
9#include "ash/frame/caption_buttons/caption_button_types.h"
10
11namespace gfx {
12class Insets;
13class Point;
14class Vector2d;
15}
16
17namespace ash {
18class FrameCaptionButton;
19
20// Delegate interface for FrameSizeButton.
21class ASH_EXPORT FrameSizeButtonDelegate {
22 public:
23  enum Animate {
24    ANIMATE_YES,
25    ANIMATE_NO
26  };
27
28  // Returns whether the minimize button is visible.
29  virtual bool IsMinimizeButtonVisible() const = 0;
30
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;
35
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;
41
42  // Returns the button closest to |position_in_screen|.
43  virtual const FrameCaptionButton* GetButtonClosestTo(
44      const gfx::Point& position_in_screen) const = 0;
45
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;
51
52 protected:
53  virtual ~FrameSizeButtonDelegate() {}
54};
55
56}  // namespace ash
57
58#endif  // ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_DELEGATE_H_
59