| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Overridden from ButtonListener: | 49 // Overridden from ButtonListener: |
| 50 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 50 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; |
| 51 | 51 |
| 52 // Use bubble_border() and SetBubbleBorder(), not border() and set_border(). | 52 // Use bubble_border() and SetBubbleBorder(), not border() and set_border(). |
| 53 BubbleBorder* bubble_border() const { return bubble_border_; } | 53 BubbleBorder* bubble_border() const { return bubble_border_; } |
| 54 void SetBubbleBorder(BubbleBorder* border); | 54 void SetBubbleBorder(BubbleBorder* border); |
| 55 | 55 |
| 56 gfx::Insets content_margins() const { return content_margins_; } | 56 gfx::Insets content_margins() const { return content_margins_; } |
| 57 | 57 |
| 58 void SetTitle(const string16& title); | |
| 59 void SetShowCloseButton(bool show); | |
| 60 void SetTitlebarExtraView(View* view); | 58 void SetTitlebarExtraView(View* view); |
| 61 | 59 |
| 62 // Given the size of the contents and the rect to point at, returns the bounds | 60 // Given the size of the contents and the rect to point at, returns the bounds |
| 63 // of the bubble window. The bubble's arrow location may change if the bubble | 61 // of the bubble window. The bubble's arrow location may change if the bubble |
| 64 // does not fit on the monitor and |adjust_if_offscreen| is true. | 62 // does not fit on the monitor and |adjust_if_offscreen| is true. |
| 65 gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect, | 63 gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect, |
| 66 gfx::Size client_size, | 64 gfx::Size client_size, |
| 67 bool adjust_if_offscreen); | 65 bool adjust_if_offscreen); |
| 68 | 66 |
| 69 protected: | 67 protected: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 98 // When supplied, this view is placed in the titlebar between the title and | 96 // When supplied, this view is placed in the titlebar between the title and |
| 99 // (x) close button. | 97 // (x) close button. |
| 100 View* titlebar_extra_view_; | 98 View* titlebar_extra_view_; |
| 101 | 99 |
| 102 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); | 100 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
| 103 }; | 101 }; |
| 104 | 102 |
| 105 } // namespace views | 103 } // namespace views |
| 106 | 104 |
| 107 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 105 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
| OLD | NEW |