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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 const gfx::Insets& content_margins); | 34 const gfx::Insets& content_margins); |
35 ~BubbleFrameView() override; | 35 ~BubbleFrameView() override; |
36 | 36 |
37 // Creates a close button used in the corner of the dialog. | 37 // Creates a close button used in the corner of the dialog. |
38 static LabelButton* CreateCloseButton(ButtonListener* listener); | 38 static LabelButton* CreateCloseButton(ButtonListener* listener); |
39 | 39 |
40 // NonClientFrameView overrides: | 40 // NonClientFrameView overrides: |
41 gfx::Rect GetBoundsForClientView() const override; | 41 gfx::Rect GetBoundsForClientView() const override; |
42 gfx::Rect GetWindowBoundsForClientBounds( | 42 gfx::Rect GetWindowBoundsForClientBounds( |
43 const gfx::Rect& client_bounds) const override; | 43 const gfx::Rect& client_bounds) const override; |
| 44 bool GetClientMask(const gfx::Size& size, gfx::Path* path) const override; |
44 int NonClientHitTest(const gfx::Point& point) override; | 45 int NonClientHitTest(const gfx::Point& point) override; |
45 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; | 46 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; |
46 void ResetWindowControls() override; | 47 void ResetWindowControls() override; |
47 void UpdateWindowIcon() override; | 48 void UpdateWindowIcon() override; |
48 void UpdateWindowTitle() override; | 49 void UpdateWindowTitle() override; |
49 void SizeConstraintsChanged() override; | 50 void SizeConstraintsChanged() override; |
50 | 51 |
51 // Set the FontList to be used for the title of the bubble. | 52 // Set the FontList to be used for the title of the bubble. |
52 // Caller must arrange to update the layout to have the call take effect. | 53 // Caller must arrange to update the layout to have the call take effect. |
53 void SetTitleFontList(const gfx::FontList& font_list); | 54 void SetTitleFontList(const gfx::FontList& font_list); |
54 | 55 |
55 // View overrides: | 56 // View overrides: |
| 57 const char* GetClassName() const override; |
56 gfx::Insets GetInsets() const override; | 58 gfx::Insets GetInsets() const override; |
57 gfx::Size GetPreferredSize() const override; | 59 gfx::Size GetPreferredSize() const override; |
58 gfx::Size GetMinimumSize() const override; | 60 gfx::Size GetMinimumSize() const override; |
59 gfx::Size GetMaximumSize() const override; | 61 gfx::Size GetMaximumSize() const override; |
60 void Layout() override; | 62 void Layout() override; |
61 const char* GetClassName() const override; | 63 void OnPaint(gfx::Canvas* canvas) override; |
| 64 void PaintChildren(const ui::PaintContext& context) override; |
62 void OnThemeChanged() override; | 65 void OnThemeChanged() override; |
63 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 66 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
64 | 67 |
65 // Overridden from ButtonListener: | 68 // Overridden from ButtonListener: |
66 void ButtonPressed(Button* sender, const ui::Event& event) override; | 69 void ButtonPressed(Button* sender, const ui::Event& event) override; |
67 | 70 |
68 // Use bubble_border() and SetBubbleBorder(), not border() and SetBorder(). | 71 // Use bubble_border() and SetBubbleBorder(), not border() and SetBorder(). |
69 BubbleBorder* bubble_border() const { return bubble_border_; } | 72 BubbleBorder* bubble_border() const { return bubble_border_; } |
70 void SetBubbleBorder(scoped_ptr<BubbleBorder> border); | 73 void SetBubbleBorder(scoped_ptr<BubbleBorder> border); |
71 | 74 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 130 |
128 // Whether the close button was clicked. | 131 // Whether the close button was clicked. |
129 bool close_button_clicked_; | 132 bool close_button_clicked_; |
130 | 133 |
131 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); | 134 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
132 }; | 135 }; |
133 | 136 |
134 } // namespace views | 137 } // namespace views |
135 | 138 |
136 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 139 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
OLD | NEW |