OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void Redraw(bool order_changed) override; | 231 void Redraw(bool order_changed) override; |
232 void ResizeAndAnimate(gfx::Tween::Type tween_type, | 232 void ResizeAndAnimate(gfx::Tween::Type tween_type, |
233 int target_width, | 233 int target_width, |
234 bool suppress_chevron) override; | 234 bool suppress_chevron) override; |
235 void SetChevronVisibility(bool chevron_visible) override; | 235 void SetChevronVisibility(bool chevron_visible) override; |
236 int GetWidth(GetWidthTime get_width_time) const override; | 236 int GetWidth(GetWidthTime get_width_time) const override; |
237 bool IsAnimating() const override; | 237 bool IsAnimating() const override; |
238 void StopAnimating() override; | 238 void StopAnimating() override; |
239 int GetChevronWidth() const override; | 239 int GetChevronWidth() const override; |
240 void ShowToolbarActionBubble( | 240 void ShowToolbarActionBubble( |
241 scoped_ptr<ToolbarActionsBarBubbleDelegate> controller) override; | 241 std::unique_ptr<ToolbarActionsBarBubbleDelegate> controller) override; |
242 void ShowExtensionMessageBubble( | 242 void ShowExtensionMessageBubble( |
243 scoped_ptr<extensions::ExtensionMessageBubbleController> controller, | 243 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller, |
244 ToolbarActionViewController* anchor_action) override; | 244 ToolbarActionViewController* anchor_action) override; |
245 | 245 |
246 // views::WidgetObserver: | 246 // views::WidgetObserver: |
247 void OnWidgetClosing(views::Widget* widget) override; | 247 void OnWidgetClosing(views::Widget* widget) override; |
248 void OnWidgetDestroying(views::Widget* widget) override; | 248 void OnWidgetDestroying(views::Widget* widget) override; |
249 | 249 |
250 views::BubbleDelegateView* active_bubble() { return active_bubble_; } | 250 views::BubbleDelegateView* active_bubble() { return active_bubble_; } |
251 | 251 |
252 ChevronMenuButton* chevron_for_testing() { return chevron_; } | 252 ChevronMenuButton* chevron_for_testing() { return chevron_; } |
253 | 253 |
(...skipping 17 matching lines...) Expand all Loading... |
271 | 271 |
272 const ToolbarActionsBar::PlatformSettings& platform_settings() const { | 272 const ToolbarActionsBar::PlatformSettings& platform_settings() const { |
273 return toolbar_actions_bar_->platform_settings(); | 273 return toolbar_actions_bar_->platform_settings(); |
274 } | 274 } |
275 | 275 |
276 // Whether this container is in overflow mode (as opposed to in 'main' | 276 // Whether this container is in overflow mode (as opposed to in 'main' |
277 // mode). See class comments for details on the difference. | 277 // mode). See class comments for details on the difference. |
278 bool in_overflow_mode() const { return main_container_ != NULL; } | 278 bool in_overflow_mode() const { return main_container_ != NULL; } |
279 | 279 |
280 // The controlling ToolbarActionsBar, which handles most non-view logic. | 280 // The controlling ToolbarActionsBar, which handles most non-view logic. |
281 scoped_ptr<ToolbarActionsBar> toolbar_actions_bar_; | 281 std::unique_ptr<ToolbarActionsBar> toolbar_actions_bar_; |
282 | 282 |
283 // The vector of toolbar actions (icons/image buttons for each action). | 283 // The vector of toolbar actions (icons/image buttons for each action). |
284 ToolbarActionViews toolbar_action_views_; | 284 ToolbarActionViews toolbar_action_views_; |
285 | 285 |
286 // The Browser object the container is associated with. | 286 // The Browser object the container is associated with. |
287 Browser* browser_; | 287 Browser* browser_; |
288 | 288 |
289 // The main container we are serving as overflow for, or NULL if this | 289 // The main container we are serving as overflow for, or NULL if this |
290 // class is the the main container. See class comments for details on | 290 // class is the the main container. See class comments for details on |
291 // the difference between main and overflow. | 291 // the difference between main and overflow. |
292 BrowserActionsContainer* main_container_; | 292 BrowserActionsContainer* main_container_; |
293 | 293 |
294 // The resize area for the container. | 294 // The resize area for the container. |
295 views::ResizeArea* resize_area_; | 295 views::ResizeArea* resize_area_; |
296 | 296 |
297 // The chevron for accessing the overflow items. Can be NULL when in overflow | 297 // The chevron for accessing the overflow items. Can be NULL when in overflow |
298 // mode or if the toolbar is permanently suppressing the chevron menu. | 298 // mode or if the toolbar is permanently suppressing the chevron menu. |
299 ChevronMenuButton* chevron_; | 299 ChevronMenuButton* chevron_; |
300 | 300 |
301 // The painter used when we are highlighting a subset of extensions. | 301 // The painter used when we are highlighting a subset of extensions. |
302 scoped_ptr<views::Painter> info_highlight_painter_; | 302 std::unique_ptr<views::Painter> info_highlight_painter_; |
303 scoped_ptr<views::Painter> warning_highlight_painter_; | 303 std::unique_ptr<views::Painter> warning_highlight_painter_; |
304 | 304 |
305 // The animation that happens when the container snaps to place. | 305 // The animation that happens when the container snaps to place. |
306 scoped_ptr<gfx::SlideAnimation> resize_animation_; | 306 std::unique_ptr<gfx::SlideAnimation> resize_animation_; |
307 | 307 |
308 // Don't show the chevron while animating. | 308 // Don't show the chevron while animating. |
309 bool suppress_chevron_; | 309 bool suppress_chevron_; |
310 | 310 |
311 // True if the container has been added to the parent view. | 311 // True if the container has been added to the parent view. |
312 bool added_to_view_; | 312 bool added_to_view_; |
313 | 313 |
314 // When the container is resizing, this is the width at which it started. | 314 // When the container is resizing, this is the width at which it started. |
315 // If the container is not resizing, -1. | 315 // If the container is not resizing, -1. |
316 int resize_starting_width_; | 316 int resize_starting_width_; |
317 | 317 |
318 // This is used while the user is resizing (and when the animations are in | 318 // This is used while the user is resizing (and when the animations are in |
319 // progress) to know how wide the delta is between the current state and what | 319 // progress) to know how wide the delta is between the current state and what |
320 // we should draw. | 320 // we should draw. |
321 int resize_amount_; | 321 int resize_amount_; |
322 | 322 |
323 // Keeps track of the absolute pixel width the container should have when we | 323 // Keeps track of the absolute pixel width the container should have when we |
324 // are done animating. | 324 // are done animating. |
325 int animation_target_size_; | 325 int animation_target_size_; |
326 | 326 |
327 // The DropPosition for the current drag-and-drop operation, or NULL if there | 327 // The DropPosition for the current drag-and-drop operation, or NULL if there |
328 // is none. | 328 // is none. |
329 scoped_ptr<DropPosition> drop_position_; | 329 std::unique_ptr<DropPosition> drop_position_; |
330 | 330 |
331 // The extension bubble that is actively showing, if any. | 331 // The extension bubble that is actively showing, if any. |
332 views::BubbleDelegateView* active_bubble_; | 332 views::BubbleDelegateView* active_bubble_; |
333 | 333 |
334 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 334 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
335 }; | 335 }; |
336 | 336 |
337 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 337 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
OLD | NEW |