OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
6 #define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 virtual ~BubbleFrameView(); | 33 virtual ~BubbleFrameView(); |
34 | 34 |
35 // Insets to make bubble contents align horizontal with the bubble title. | 35 // Insets to make bubble contents align horizontal with the bubble title. |
36 // NOTE: this does not take into account whether a title actually exists. | 36 // NOTE: this does not take into account whether a title actually exists. |
37 static gfx::Insets GetTitleInsets(); | 37 static gfx::Insets GetTitleInsets(); |
38 | 38 |
39 // Creates a close button used in the corner of the dialog. | 39 // Creates a close button used in the corner of the dialog. |
40 static LabelButton* CreateCloseButton(ButtonListener* listener); | 40 static LabelButton* CreateCloseButton(ButtonListener* listener); |
41 | 41 |
42 // NonClientFrameView overrides: | 42 // NonClientFrameView overrides: |
43 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 43 virtual gfx::Rect GetBoundsForClientView() const override; |
44 virtual gfx::Rect GetWindowBoundsForClientBounds( | 44 virtual gfx::Rect GetWindowBoundsForClientBounds( |
45 const gfx::Rect& client_bounds) const OVERRIDE; | 45 const gfx::Rect& client_bounds) const override; |
46 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 46 virtual int NonClientHitTest(const gfx::Point& point) override; |
47 virtual void GetWindowMask(const gfx::Size& size, | 47 virtual void GetWindowMask(const gfx::Size& size, |
48 gfx::Path* window_mask) OVERRIDE; | 48 gfx::Path* window_mask) override; |
49 virtual void ResetWindowControls() OVERRIDE; | 49 virtual void ResetWindowControls() override; |
50 virtual void UpdateWindowIcon() OVERRIDE; | 50 virtual void UpdateWindowIcon() override; |
51 virtual void UpdateWindowTitle() OVERRIDE; | 51 virtual void UpdateWindowTitle() override; |
52 virtual void SizeConstraintsChanged() OVERRIDE; | 52 virtual void SizeConstraintsChanged() override; |
53 | 53 |
54 // Set the FontList to be used for the title of the bubble. | 54 // Set the FontList to be used for the title of the bubble. |
55 // Caller must arrange to update the layout to have the call take effect. | 55 // Caller must arrange to update the layout to have the call take effect. |
56 void SetTitleFontList(const gfx::FontList& font_list); | 56 void SetTitleFontList(const gfx::FontList& font_list); |
57 | 57 |
58 // View overrides: | 58 // View overrides: |
59 virtual gfx::Insets GetInsets() const OVERRIDE; | 59 virtual gfx::Insets GetInsets() const override; |
60 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 60 virtual gfx::Size GetPreferredSize() const override; |
61 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 61 virtual gfx::Size GetMinimumSize() const override; |
62 virtual void Layout() OVERRIDE; | 62 virtual void Layout() override; |
63 virtual const char* GetClassName() const OVERRIDE; | 63 virtual const char* GetClassName() const override; |
64 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; | 64 virtual void ChildPreferredSizeChanged(View* child) override; |
65 virtual void OnThemeChanged() OVERRIDE; | 65 virtual void OnThemeChanged() override; |
66 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | 66 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
67 | 67 |
68 // Overridden from ButtonListener: | 68 // Overridden from ButtonListener: |
69 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 69 virtual void ButtonPressed(Button* sender, const ui::Event& event) override; |
70 | 70 |
71 // Use bubble_border() and SetBubbleBorder(), not border() and SetBorder(). | 71 // Use bubble_border() and SetBubbleBorder(), not border() and SetBorder(). |
72 BubbleBorder* bubble_border() const { return bubble_border_; } | 72 BubbleBorder* bubble_border() const { return bubble_border_; } |
73 void SetBubbleBorder(scoped_ptr<BubbleBorder> border); | 73 void SetBubbleBorder(scoped_ptr<BubbleBorder> border); |
74 | 74 |
75 gfx::Insets content_margins() const { return content_margins_; } | 75 gfx::Insets content_margins() const { return content_margins_; } |
76 | 76 |
77 void SetTitlebarExtraView(View* view); | 77 void SetTitlebarExtraView(View* view); |
78 | 78 |
79 // Given the size of the contents and the rect to point at, returns the bounds | 79 // Given the size of the contents and the rect to point at, returns the bounds |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // When supplied, this view is placed in the titlebar between the title and | 120 // When supplied, this view is placed in the titlebar between the title and |
121 // (x) close button. | 121 // (x) close button. |
122 View* titlebar_extra_view_; | 122 View* titlebar_extra_view_; |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); | 124 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
125 }; | 125 }; |
126 | 126 |
127 } // namespace views | 127 } // namespace views |
128 | 128 |
129 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 129 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
OLD | NEW |