| 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" |
| 11 #include "ui/gfx/geometry/insets.h" | 11 #include "ui/gfx/geometry/insets.h" |
| 12 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
| 13 #include "ui/views/window/non_client_view.h" | 13 #include "ui/views/window/non_client_view.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class FontList; | 16 class FontList; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace views { | 19 namespace views { |
| 20 | 20 |
| 21 class Label; | 21 class Label; |
| 22 class LabelButton; | 22 class LabelButton; |
| 23 class BubbleBorder; | 23 class BubbleBorder; |
| 24 class ImageView; |
| 24 | 25 |
| 25 // The non-client frame view of bubble-styled widgets. | 26 // The non-client frame view of bubble-styled widgets. |
| 26 class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView, | 27 class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView, |
| 27 public ButtonListener { | 28 public ButtonListener { |
| 28 public: | 29 public: |
| 29 // Internal class name. | 30 // Internal class name. |
| 30 static const char kViewClassName[]; | 31 static const char kViewClassName[]; |
| 31 | 32 |
| 32 explicit BubbleFrameView(const gfx::Insets& content_margins); | 33 explicit BubbleFrameView(const gfx::Insets& content_margins); |
| 33 ~BubbleFrameView() override; | 34 ~BubbleFrameView() override; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 106 |
| 106 // Calculates the size needed to accommodate the given client area. | 107 // Calculates the size needed to accommodate the given client area. |
| 107 gfx::Size GetSizeForClientSize(const gfx::Size& client_size) const; | 108 gfx::Size GetSizeForClientSize(const gfx::Size& client_size) const; |
| 108 | 109 |
| 109 // The bubble border. | 110 // The bubble border. |
| 110 BubbleBorder* bubble_border_; | 111 BubbleBorder* bubble_border_; |
| 111 | 112 |
| 112 // Margins between the content and the inside of the border, in pixels. | 113 // Margins between the content and the inside of the border, in pixels. |
| 113 gfx::Insets content_margins_; | 114 gfx::Insets content_margins_; |
| 114 | 115 |
| 115 // The optional title and (x) close button. | 116 // The optional title icon, title, and (x) close button. |
| 117 views::ImageView* title_icon_; |
| 116 Label* title_; | 118 Label* title_; |
| 117 LabelButton* close_; | 119 LabelButton* close_; |
| 118 | 120 |
| 119 // When supplied, this view is placed in the titlebar between the title and | 121 // When supplied, this view is placed in the titlebar between the title and |
| 120 // (x) close button. | 122 // (x) close button. |
| 121 View* titlebar_extra_view_; | 123 View* titlebar_extra_view_; |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); | 125 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace views | 128 } // namespace views |
| 127 | 129 |
| 128 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 130 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
| OLD | NEW |