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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 // does not fit on the monitor and |adjust_if_offscreen| is true. | 81 // does not fit on the monitor and |adjust_if_offscreen| is true. |
82 gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect, | 82 gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect, |
83 gfx::Size client_size, | 83 gfx::Size client_size, |
84 bool adjust_if_offscreen); | 84 bool adjust_if_offscreen); |
85 | 85 |
86 protected: | 86 protected: |
87 // Returns the available screen bounds if the frame were to show in |rect|. | 87 // Returns the available screen bounds if the frame were to show in |rect|. |
88 virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect); | 88 virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect); |
89 | 89 |
90 bool IsCloseButtonVisible() const; | 90 bool IsCloseButtonVisible() const; |
91 gfx::Rect GetCloseButtonBounds() const; | 91 gfx::Rect GetCloseButtonMirroredBounds() const; |
msw
2015/05/19 17:06:20
nit: I wouldn't bother renaming the function.
Matt Giuca
2015/05/19 23:47:23
I think it's pretty important to change the name,
msw
2015/05/20 00:20:45
Acknowledged.
| |
92 | 92 |
93 private: | 93 private: |
94 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView); | 94 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView); |
95 | 95 |
96 // Mirrors the bubble's arrow location on the |vertical| or horizontal axis, | 96 // Mirrors the bubble's arrow location on the |vertical| or horizontal axis, |
97 // if the generated window bounds don't fit in the monitor bounds. | 97 // if the generated window bounds don't fit in the monitor bounds. |
98 void MirrorArrowIfOffScreen(bool vertical, | 98 void MirrorArrowIfOffScreen(bool vertical, |
99 const gfx::Rect& anchor_rect, | 99 const gfx::Rect& anchor_rect, |
100 const gfx::Size& client_size); | 100 const gfx::Size& client_size); |
101 | 101 |
(...skipping 19 matching lines...) Expand all Loading... | |
121 // 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 |
122 // (x) close button. | 122 // (x) close button. |
123 View* titlebar_extra_view_; | 123 View* titlebar_extra_view_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); | 125 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace views | 128 } // namespace views |
129 | 129 |
130 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 130 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
OLD | NEW |