OLD | NEW |
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_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ | 5 #ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ |
6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ | 6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/frame/caption_buttons/caption_button_types.h" | 9 #include "ash/frame/caption_buttons/caption_button_types.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 int icon_image_id, | 40 int icon_image_id, |
41 int inactive_icon_image_id, | 41 int inactive_icon_image_id, |
42 int hovered_background_image_id, | 42 int hovered_background_image_id, |
43 int pressed_background_image_id); | 43 int pressed_background_image_id); |
44 | 44 |
45 // Returns true if the button is crossfading to new visuals set in | 45 // Returns true if the button is crossfading to new visuals set in |
46 // SetImages(). | 46 // SetImages(). |
47 bool IsAnimatingImageSwap() const; | 47 bool IsAnimatingImageSwap() const; |
48 | 48 |
49 // views::View overrides: | 49 // views::View overrides: |
50 virtual gfx::Size GetPreferredSize() OVERRIDE; | 50 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
51 virtual const char* GetClassName() const OVERRIDE; | 51 virtual const char* GetClassName() const OVERRIDE; |
52 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 52 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
53 | 53 |
54 void set_paint_as_active(bool paint_as_active) { | 54 void set_paint_as_active(bool paint_as_active) { |
55 paint_as_active_ = paint_as_active; | 55 paint_as_active_ = paint_as_active; |
56 } | 56 } |
57 | 57 |
58 CaptionButtonIcon icon() const { | 58 CaptionButtonIcon icon() const { |
59 return icon_; | 59 return icon_; |
60 } | 60 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Crossfade animation started when the button's images are changed by | 94 // Crossfade animation started when the button's images are changed by |
95 // SetImages(). | 95 // SetImages(). |
96 scoped_ptr<gfx::SlideAnimation> swap_images_animation_; | 96 scoped_ptr<gfx::SlideAnimation> swap_images_animation_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButton); | 98 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButton); |
99 }; | 99 }; |
100 | 100 |
101 } // namespace ash | 101 } // namespace ash |
102 | 102 |
103 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ | 103 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ |
OLD | NEW |