Chromium Code Reviews| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 protected: | 85 protected: |
| 86 // Returns the available screen bounds if the frame were to show in |rect|. | 86 // Returns the available screen bounds if the frame were to show in |rect|. |
| 87 virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) const; | 87 virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) const; |
| 88 | 88 |
| 89 bool IsCloseButtonVisible() const; | 89 bool IsCloseButtonVisible() const; |
| 90 gfx::Rect GetCloseButtonMirroredBounds() const; | 90 gfx::Rect GetCloseButtonMirroredBounds() const; |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView); | 93 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView); |
| 94 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CloseReasons); | 94 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CloseReasons); |
| 95 FRIEND_TEST_ALL_PREFIXES(BubbleDialogDelegateTest, CloseReasons); | |
|
msw
2016/03/17 17:28:26
Can you expose more functions in the Test* subclas
Evan Stade
2016/03/17 22:41:34
this is just for access to close_, and there's no
| |
| 95 | 96 |
| 96 // Mirrors the bubble's arrow location on the |vertical| or horizontal axis, | 97 // 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. | 98 // if the generated window bounds don't fit in the monitor bounds. |
| 98 void MirrorArrowIfOffScreen(bool vertical, | 99 void MirrorArrowIfOffScreen(bool vertical, |
| 99 const gfx::Rect& anchor_rect, | 100 const gfx::Rect& anchor_rect, |
| 100 const gfx::Size& client_size); | 101 const gfx::Size& client_size); |
| 101 | 102 |
| 102 // Adjust the bubble's arrow offsets if the generated window bounds don't fit | 103 // Adjust the bubble's arrow offsets if the generated window bounds don't fit |
| 103 // in the monitor bounds. | 104 // in the monitor bounds. |
| 104 void OffsetArrowIfOffScreen(const gfx::Rect& anchor_rect, | 105 void OffsetArrowIfOffScreen(const gfx::Rect& anchor_rect, |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 126 | 127 |
| 127 // Whether the close button was clicked. | 128 // Whether the close button was clicked. |
| 128 bool close_button_clicked_; | 129 bool close_button_clicked_; |
| 129 | 130 |
| 130 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); | 131 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace views | 134 } // namespace views |
| 134 | 135 |
| 135 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ | 136 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
| OLD | NEW |