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

Side by Side Diff: ash/frame/caption_buttons/frame_caption_button.h

Issue 2901503003: Rename GetPreferredSize to CalculatePreferredSize in ash/ (Closed)
Patch Set: Created 3 years, 7 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
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_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 <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 29 matching lines...) Expand all
40 const gfx::VectorIcon& icon_image); 40 const gfx::VectorIcon& icon_image);
41 41
42 // Returns true if the button is crossfading to new visuals set in 42 // Returns true if the button is crossfading to new visuals set in
43 // SetImage(). 43 // SetImage().
44 bool IsAnimatingImageSwap() const; 44 bool IsAnimatingImageSwap() const;
45 45
46 // Sets the alpha to use for painting. Used to animate visibility changes. 46 // Sets the alpha to use for painting. Used to animate visibility changes.
47 void SetAlpha(int alpha); 47 void SetAlpha(int alpha);
48 48
49 // views::View overrides: 49 // views::View overrides:
50 gfx::Size GetPreferredSize() const override; 50 gfx::Size CalculatePreferredSize() const override;
51 const char* GetClassName() const override; 51 const char* GetClassName() const override;
52 void OnPaint(gfx::Canvas* canvas) override; 52 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 void set_use_light_images(bool light) { use_light_images_ = light; } 58 void set_use_light_images(bool light) { use_light_images_ = light; }
59 59
60 CaptionButtonIcon icon() const { return icon_; } 60 CaptionButtonIcon icon() const { return icon_; }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Crossfade animation started when the button's images are changed by 96 // Crossfade animation started when the button's images are changed by
97 // SetImage(). 97 // SetImage().
98 std::unique_ptr<gfx::SlideAnimation> swap_images_animation_; 98 std::unique_ptr<gfx::SlideAnimation> swap_images_animation_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButton); 100 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButton);
101 }; 101 };
102 102
103 } // namespace ash 103 } // namespace ash
104 104
105 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_ 105 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698