Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: ui/views/bubble/bubble_frame_view.h

Issue 1809933003: Port BubbleDelegate tests to BubbleDialogDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw review Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, CloseMethods);
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
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_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate_unittest.cc ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698