Chromium Code Reviews| 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_BROWSER_ACTIONS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 // | 264 // |
| 265 //////////////////////////////////////////////////////////////////////////////// | 265 //////////////////////////////////////////////////////////////////////////////// |
| 266 class BrowserActionsContainer | 266 class BrowserActionsContainer |
| 267 : public views::View, | 267 : public views::View, |
| 268 public views::MenuButtonListener, | 268 public views::MenuButtonListener, |
| 269 public views::DragController, | 269 public views::DragController, |
| 270 public views::ResizeAreaDelegate, | 270 public views::ResizeAreaDelegate, |
| 271 public ui::AnimationDelegate, | 271 public ui::AnimationDelegate, |
| 272 public ExtensionToolbarModel::Observer, | 272 public ExtensionToolbarModel::Observer, |
| 273 public BrowserActionOverflowMenuController::Observer, | 273 public BrowserActionOverflowMenuController::Observer, |
| 274 public ExtensionContextMenuModel::PopupDelegate, | |
|
sky
2012/04/12 15:57:23
Are there any includes that can be removed now?
benwells
2012/04/13 04:56:19
Oh yeah, good catch. Done.
| |
| 275 public views::Widget::Observer { | 274 public views::Widget::Observer { |
| 276 public: | 275 public: |
| 277 BrowserActionsContainer(Browser* browser, views::View* owner_view); | 276 BrowserActionsContainer(Browser* browser, views::View* owner_view); |
| 278 virtual ~BrowserActionsContainer(); | 277 virtual ~BrowserActionsContainer(); |
| 279 | 278 |
| 280 static void RegisterUserPrefs(PrefService* prefs); | 279 static void RegisterUserPrefs(PrefService* prefs); |
| 281 | 280 |
| 282 void Init(); | 281 void Init(); |
| 283 | 282 |
| 284 // Get the number of browser actions being displayed. | 283 // Get the number of browser actions being displayed. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 virtual void OnResize(int resize_amount, bool done_resizing) OVERRIDE; | 357 virtual void OnResize(int resize_amount, bool done_resizing) OVERRIDE; |
| 359 | 358 |
| 360 // Overridden from ui::AnimationDelegate: | 359 // Overridden from ui::AnimationDelegate: |
| 361 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 360 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 362 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 361 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
| 363 | 362 |
| 364 // Overridden from BrowserActionOverflowMenuController::Observer: | 363 // Overridden from BrowserActionOverflowMenuController::Observer: |
| 365 virtual void NotifyMenuDeleted( | 364 virtual void NotifyMenuDeleted( |
| 366 BrowserActionOverflowMenuController* controller) OVERRIDE; | 365 BrowserActionOverflowMenuController* controller) OVERRIDE; |
| 367 | 366 |
| 368 // Overridden from ExtensionContextMenuModel::PopupDelegate | |
| 369 virtual void InspectPopup(ExtensionAction* action) OVERRIDE; | |
| 370 | |
| 371 // Overridden from views::Widget::Observer | 367 // Overridden from views::Widget::Observer |
| 372 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 368 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
| 373 | 369 |
| 374 // Moves a browser action with |id| to |new_index|. | 370 // Moves a browser action with |id| to |new_index|. |
| 375 void MoveBrowserAction(const std::string& extension_id, size_t new_index); | 371 void MoveBrowserAction(const std::string& extension_id, size_t new_index); |
| 376 | 372 |
| 377 // Hide the current popup. | 373 // Hide the current popup. |
| 378 void HidePopup(); | 374 void HidePopup(); |
| 379 | 375 |
| 380 // Simulate a click on a browser action button. This should only be | 376 // Simulate a click on a browser action button. This should only be |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 528 | 524 |
| 529 base::WeakPtrFactory<BrowserActionsContainer> task_factory_; | 525 base::WeakPtrFactory<BrowserActionsContainer> task_factory_; |
| 530 | 526 |
| 531 // Handles delayed showing of the overflow menu when hovering. | 527 // Handles delayed showing of the overflow menu when hovering. |
| 532 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; | 528 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; |
| 533 | 529 |
| 534 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 530 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
| 535 }; | 531 }; |
| 536 | 532 |
| 537 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 533 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
| OLD | NEW |