OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 : public views::View, | 251 : public views::View, |
252 public views::ViewMenuDelegate, | 252 public views::ViewMenuDelegate, |
253 public views::DragController, | 253 public views::DragController, |
254 public views::ResizeGripper::ResizeGripperDelegate, | 254 public views::ResizeGripper::ResizeGripperDelegate, |
255 public AnimationDelegate, | 255 public AnimationDelegate, |
256 public ExtensionToolbarModel::Observer, | 256 public ExtensionToolbarModel::Observer, |
257 public BrowserActionOverflowMenuController::Observer, | 257 public BrowserActionOverflowMenuController::Observer, |
258 public ExtensionContextMenuModel::PopupDelegate, | 258 public ExtensionContextMenuModel::PopupDelegate, |
259 public ExtensionPopup::Observer { | 259 public ExtensionPopup::Observer { |
260 public: | 260 public: |
261 // If |should_save_size| is false, container resizes will not persist across | 261 BrowserActionsContainer(Browser* browser, views::View* owner_view); |
262 // browser restarts. | |
263 BrowserActionsContainer(Browser* browser, views::View* owner_view, | |
264 bool should_save_size); | |
265 virtual ~BrowserActionsContainer(); | 262 virtual ~BrowserActionsContainer(); |
266 | 263 |
267 static void RegisterUserPrefs(PrefService* prefs); | 264 static void RegisterUserPrefs(PrefService* prefs); |
268 | 265 |
269 // Get the number of browser actions being displayed. | 266 // Get the number of browser actions being displayed. |
270 int num_browser_actions() const { return browser_action_views_.size(); } | 267 int num_browser_actions() const { return browser_action_views_.size(); } |
271 | 268 |
272 // Whether we are performing resize animation on the container. | 269 // Whether we are performing resize animation on the container. |
273 bool animating() const { return animation_target_size_ > 0; } | 270 bool animating() const { return animation_target_size_ > 0; } |
274 | 271 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 BrowserActionViews browser_action_views_; | 443 BrowserActionViews browser_action_views_; |
447 | 444 |
448 Profile* profile_; | 445 Profile* profile_; |
449 | 446 |
450 // The Browser object the container is associated with. | 447 // The Browser object the container is associated with. |
451 Browser* browser_; | 448 Browser* browser_; |
452 | 449 |
453 // The view that owns us. | 450 // The view that owns us. |
454 views::View* owner_view_; | 451 views::View* owner_view_; |
455 | 452 |
456 // True if we should save the size of the container to the global prefs. | |
457 bool should_save_size_; | |
458 | |
459 // The current popup and the button it came from. NULL if no popup. | 453 // The current popup and the button it came from. NULL if no popup. |
460 ExtensionPopup* popup_; | 454 ExtensionPopup* popup_; |
461 | 455 |
462 // The button that triggered the current popup (just a reference to a button | 456 // The button that triggered the current popup (just a reference to a button |
463 // from browser_action_views_). | 457 // from browser_action_views_). |
464 BrowserActionButton* popup_button_; | 458 BrowserActionButton* popup_button_; |
465 | 459 |
466 // The model that tracks the order of the toolbar icons. | 460 // The model that tracks the order of the toolbar icons. |
467 ExtensionToolbarModel* model_; | 461 ExtensionToolbarModel* model_; |
468 | 462 |
(...skipping 30 matching lines...) Expand all Loading... |
499 | 493 |
500 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; | 494 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; |
501 | 495 |
502 // Handles delayed showing of the overflow menu when hovering. | 496 // Handles delayed showing of the overflow menu when hovering. |
503 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; | 497 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; |
504 | 498 |
505 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 499 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
506 }; | 500 }; |
507 | 501 |
508 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 502 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
OLD | NEW |