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 CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // to allow users to see where hovered links point to. | 28 // to allow users to see where hovered links point to. |
29 class StatusBubbleViews : public StatusBubble { | 29 class StatusBubbleViews : public StatusBubble { |
30 public: | 30 public: |
31 // How wide the bubble's shadow is. | 31 // How wide the bubble's shadow is. |
32 static const int kShadowThickness; | 32 static const int kShadowThickness; |
33 | 33 |
34 // The combined vertical padding above and below the text. | 34 // The combined vertical padding above and below the text. |
35 static const int kTotalVerticalPadding = 7; | 35 static const int kTotalVerticalPadding = 7; |
36 | 36 |
37 // |base_view| is the view that this bubble is positioned relative to. | 37 // |base_view| is the view that this bubble is positioned relative to. |
38 explicit StatusBubbleViews(views::View* base_view); | 38 StatusBubbleViews(views::View* base_view, bool has_client_edge); |
39 ~StatusBubbleViews() override; | 39 ~StatusBubbleViews() override; |
40 | 40 |
41 views::View* base_view() { return base_view_; } | 41 views::View* base_view() { return base_view_; } |
42 | 42 |
43 // Reposition the bubble's popup - as we are using a WS_POPUP for the bubble, | 43 // Reposition the bubble's popup - as we are using a WS_POPUP for the bubble, |
44 // we have to manually position it when the browser window moves. | 44 // we have to manually position it when the browser window moves. |
45 void RepositionPopup(); | 45 void RepositionPopup(); |
46 | 46 |
47 // The bubble only has a preferred height: the sum of the height of | 47 // The bubble only has a preferred height: the sum of the height of |
48 // the font and kTotalVerticalPadding. | 48 // the font and kTotalVerticalPadding. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Manages the expansion of a status bubble to fit a long URL. | 132 // Manages the expansion of a status bubble to fit a long URL. |
133 std::unique_ptr<StatusViewExpander> expand_view_; | 133 std::unique_ptr<StatusViewExpander> expand_view_; |
134 | 134 |
135 // If the download shelf is visible, do not obscure it. | 135 // If the download shelf is visible, do not obscure it. |
136 bool download_shelf_is_visible_; | 136 bool download_shelf_is_visible_; |
137 | 137 |
138 // If the bubble has already been expanded, and encounters a new URL, | 138 // If the bubble has already been expanded, and encounters a new URL, |
139 // change size immediately, with no hover. | 139 // change size immediately, with no hover. |
140 bool is_expanded_; | 140 bool is_expanded_; |
141 | 141 |
| 142 // Whether or not the frame that the bubble will be painting inside has a |
| 143 // client edge. Affects layout. |
| 144 const bool has_client_edge_; |
| 145 |
142 // Times expansion of status bubble when URL is too long for standard width. | 146 // Times expansion of status bubble when URL is too long for standard width. |
143 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; | 147 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; |
144 | 148 |
145 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); | 149 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); |
146 }; | 150 }; |
147 | 151 |
148 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 152 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
OLD | NEW |