| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "base/memory/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 | 12 |
| 13 class Browser; | 13 class Browser; |
| 14 @class BrowserActionButton; | 14 @class BrowserActionButton; |
| 15 @class BrowserActionsContainerView; | 15 @class BrowserActionsContainerView; |
| 16 @class ExtensionPopupController; | 16 @class ExtensionPopupController; |
| 17 class ExtensionToolbarModel; | 17 class ExtensionToolbarModel; |
| 18 class ExtensionServiceObserverBridge; | 18 class ExtensionServiceObserverBridge; |
| 19 @class MenuButton; | 19 @class MenuButton; |
| 20 class Profile; | 20 class Profile; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 45 | 45 |
| 46 // The model that tracks the order of the toolbar icons. Weak. | 46 // The model that tracks the order of the toolbar icons. Weak. |
| 47 ExtensionToolbarModel* toolbarModel_; | 47 ExtensionToolbarModel* toolbarModel_; |
| 48 | 48 |
| 49 // The observer for the ExtensionService we're getting events from. | 49 // The observer for the ExtensionService we're getting events from. |
| 50 scoped_ptr<ExtensionServiceObserverBridge> observer_; | 50 scoped_ptr<ExtensionServiceObserverBridge> observer_; |
| 51 | 51 |
| 52 // A dictionary of Extension ID -> BrowserActionButton pairs representing the | 52 // A dictionary of Extension ID -> BrowserActionButton pairs representing the |
| 53 // buttons present in the container view. The ID is a string unique to each | 53 // buttons present in the container view. The ID is a string unique to each |
| 54 // extension. | 54 // extension. |
| 55 scoped_nsobject<NSMutableDictionary> buttons_; | 55 base::scoped_nsobject<NSMutableDictionary> buttons_; |
| 56 | 56 |
| 57 // Array of hidden buttons in the correct order in which the user specified. | 57 // Array of hidden buttons in the correct order in which the user specified. |
| 58 scoped_nsobject<NSMutableArray> hiddenButtons_; | 58 base::scoped_nsobject<NSMutableArray> hiddenButtons_; |
| 59 | 59 |
| 60 // The currently running chevron animation (fade in/out). | 60 // The currently running chevron animation (fade in/out). |
| 61 scoped_nsobject<NSViewAnimation> chevronAnimation_; | 61 base::scoped_nsobject<NSViewAnimation> chevronAnimation_; |
| 62 | 62 |
| 63 // The chevron button used when Browser Actions are hidden. | 63 // The chevron button used when Browser Actions are hidden. |
| 64 scoped_nsobject<MenuButton> chevronMenuButton_; | 64 base::scoped_nsobject<MenuButton> chevronMenuButton_; |
| 65 | 65 |
| 66 // The Browser Actions overflow menu. | 66 // The Browser Actions overflow menu. |
| 67 scoped_nsobject<NSMenu> overflowMenu_; | 67 base::scoped_nsobject<NSMenu> overflowMenu_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; | 70 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; |
| 71 | 71 |
| 72 // Initializes the controller given the current browser and container view that | 72 // Initializes the controller given the current browser and container view that |
| 73 // will hold the browser action buttons. | 73 // will hold the browser action buttons. |
| 74 - (id)initWithBrowser:(Browser*)browser | 74 - (id)initWithBrowser:(Browser*)browser |
| 75 containerView:(BrowserActionsContainerView*)container; | 75 containerView:(BrowserActionsContainerView*)container; |
| 76 | 76 |
| 77 // Update the display of all buttons. | 77 // Update the display of all buttons. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Registers the user preferences used by this class. | 111 // Registers the user preferences used by this class. |
| 112 + (void)registerUserPrefs:(user_prefs::PrefRegistrySyncable*)prefs; | 112 + (void)registerUserPrefs:(user_prefs::PrefRegistrySyncable*)prefs; |
| 113 | 113 |
| 114 @end // @interface BrowserActionsController | 114 @end // @interface BrowserActionsController |
| 115 | 115 |
| 116 @interface BrowserActionsController(TestingAPI) | 116 @interface BrowserActionsController(TestingAPI) |
| 117 - (NSButton*)buttonWithIndex:(NSUInteger)index; | 117 - (NSButton*)buttonWithIndex:(NSUInteger)index; |
| 118 @end | 118 @end |
| 119 | 119 |
| 120 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 120 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| OLD | NEW |