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> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
13 #include "chrome/browser/ui/status_bubble.h" | 14 #include "chrome/browser/ui/status_bubble.h" |
14 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
16 | 17 |
17 namespace gfx { | 18 namespace gfx { |
18 class Point; | 19 class Point; |
19 } | 20 } |
20 namespace views { | 21 namespace views { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 gfx::Point last_mouse_moved_location_; | 117 gfx::Point last_mouse_moved_location_; |
117 | 118 |
118 // Whether the view contains the mouse. | 119 // Whether the view contains the mouse. |
119 bool contains_mouse_; | 120 bool contains_mouse_; |
120 | 121 |
121 // How vertically offset the bubble is from its root position_. | 122 // How vertically offset the bubble is from its root position_. |
122 int offset_; | 123 int offset_; |
123 | 124 |
124 // We use a HWND for the popup so that it may float above any HWNDs in our | 125 // We use a HWND for the popup so that it may float above any HWNDs in our |
125 // UI (the location bar, for example). | 126 // UI (the location bar, for example). |
126 scoped_ptr<views::Widget> popup_; | 127 std::unique_ptr<views::Widget> popup_; |
127 | 128 |
128 views::View* base_view_; | 129 views::View* base_view_; |
129 StatusView* view_; | 130 StatusView* view_; |
130 | 131 |
131 // 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. |
132 scoped_ptr<StatusViewExpander> expand_view_; | 133 std::unique_ptr<StatusViewExpander> expand_view_; |
133 | 134 |
134 // If the download shelf is visible, do not obscure it. | 135 // If the download shelf is visible, do not obscure it. |
135 bool download_shelf_is_visible_; | 136 bool download_shelf_is_visible_; |
136 | 137 |
137 // 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, |
138 // change size immediately, with no hover. | 139 // change size immediately, with no hover. |
139 bool is_expanded_; | 140 bool is_expanded_; |
140 | 141 |
141 // Times expansion of status bubble when URL is too long for standard width. | 142 // Times expansion of status bubble when URL is too long for standard width. |
142 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; | 143 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; |
143 | 144 |
144 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); | 145 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); |
145 }; | 146 }; |
146 | 147 |
147 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 148 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
OLD | NEW |