• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_
6 #define ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_
7 
8 #include "ash/ash_export.h"
9 #include "ash/wm/caption_buttons/caption_button_types.h"
10 
11 namespace gfx {
12 class Insets;
13 class Point;
14 }
15 
16 namespace ash {
17 class FrameCaptionButton;
18 
19 // Delegate interface for AlternateFrameSizeButton.
20 class ASH_EXPORT AlternateFrameSizeButtonDelegate {
21  public:
22   enum Animate {
23     ANIMATE_YES,
24     ANIMATE_NO
25   };
26 
27   // Returns whether the minimize button is visible.
28   virtual bool IsMinimizeButtonVisible() const = 0;
29 
30   // Reset the caption button views::Button::ButtonState back to normal. If
31   // |animate| is ANIMATE_YES, the buttons will crossfade back to their
32   // original icons.
33   virtual void SetButtonsToNormal(Animate animate) = 0;
34 
35   // Sets the minimize and close button icons. The buttons will crossfade to
36   // their new icons if |animate| is ANIMATE_YES.
37   virtual void SetButtonIcons(CaptionButtonIcon left_button_action,
38                               CaptionButtonIcon right_button_action,
39                               Animate animate) = 0;
40 
41   // Presses the button at |position_in_screen| and unpresses any other pressed
42   // caption buttons.
43   // |pressed_button_hittest_insets| indicates how much the hittest insets for
44   // the currently pressed button should be expanded if no button was found at
45   // |position_in_screen| using the normal button hittest insets.
46   // Returns the button which was pressed.
47   virtual const FrameCaptionButton* PressButtonAt(
48       const gfx::Point& position_in_screen,
49       const gfx::Insets& pressed_button_hittest_insets) const = 0;
50 
51  protected:
~AlternateFrameSizeButtonDelegate()52   virtual ~AlternateFrameSizeButtonDelegate() {}
53 };
54 
55 }  // namespace ash
56 
57 #endif  // ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_
58