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

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

Issue 1923143003: Implement the 2016Q2 Translate UI designe spec out in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor changes in comments Created 4 years, 7 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
« no previous file with comments | « ui/resources/ui_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Given the size of the contents and the rect to point at, returns the bounds 79 // Given the size of the contents and the rect to point at, returns the bounds
80 // of the bubble window. The bubble's arrow location may change if the bubble 80 // of the bubble window. The bubble's arrow location may change if the bubble
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 bool close_button_clicked() const { return close_button_clicked_; } 86 bool close_button_clicked() const { return close_button_clicked_; }
87 87
88 LabelButton* GetCloseButtonForTest() { return close_; }
89
88 protected: 90 protected:
89 // Returns the available screen bounds if the frame were to show in |rect|. 91 // Returns the available screen bounds if the frame were to show in |rect|.
90 virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) const; 92 virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) const;
91 93
92 bool IsCloseButtonVisible() const; 94 bool IsCloseButtonVisible() const;
93 gfx::Rect GetCloseButtonMirroredBounds() const; 95 gfx::Rect GetCloseButtonMirroredBounds() const;
94 96
95 private: 97 private:
96 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView); 98 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView);
97 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CloseReasons); 99 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CloseReasons);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 132
131 // Whether the close button was clicked. 133 // Whether the close button was clicked.
132 bool close_button_clicked_; 134 bool close_button_clicked_;
133 135
134 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); 136 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
135 }; 137 };
136 138
137 } // namespace views 139 } // namespace views
138 140
139 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 141 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « ui/resources/ui_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698