| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "base/scoped_nsobject.h" | 10 #import "base/scoped_nsobject.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Initializes the controller given the current browser and container view that | 51 // Initializes the controller given the current browser and container view that |
| 52 // will hold the browser action buttons. | 52 // will hold the browser action buttons. |
| 53 - (id)initWithBrowser:(Browser*)browser | 53 - (id)initWithBrowser:(Browser*)browser |
| 54 containerView:(NSView*)container; | 54 containerView:(NSView*)container; |
| 55 | 55 |
| 56 // Creates and appends any existing browser action buttons present within the | 56 // Creates and appends any existing browser action buttons present within the |
| 57 // extensions service to the toolbar. | 57 // extensions service to the toolbar. |
| 58 - (void)createButtons; | 58 - (void)createButtons; |
| 59 | 59 |
| 60 // Update the display of all buttons. |
| 61 - (void)update; |
| 62 |
| 60 // Hides the browser action's popup menu (if one is present and visible). | 63 // Hides the browser action's popup menu (if one is present and visible). |
| 61 - (void)hidePopup; | 64 - (void)hidePopup; |
| 62 | 65 |
| 63 // Returns the controller used to display the popup being shown. If no popup is | 66 // Returns the controller used to display the popup being shown. If no popup is |
| 64 // currently open, then nil is returned. | 67 // currently open, then nil is returned. |
| 65 - (ExtensionPopupController*)popup; | 68 - (ExtensionPopupController*)popup; |
| 66 | 69 |
| 67 // Marks the container view for redraw. Called by the extension service | 70 // Marks the container view for redraw. Called by the extension service |
| 68 // notification bridge. | 71 // notification bridge. |
| 69 - (void)browserActionVisibilityHasChanged; | 72 - (void)browserActionVisibilityHasChanged; |
| 70 | 73 |
| 71 // Returns the current number of browser action buttons displayed in the | 74 // Returns the current number of browser action buttons displayed in the |
| 72 // container. | 75 // container. |
| 73 - (int)buttonCount; | 76 - (int)buttonCount; |
| 74 | 77 |
| 75 // Executes the action designated by the extension. | 78 // Executes the action designated by the extension. |
| 76 - (void)browserActionClicked:(BrowserActionButton*)sender; | 79 - (void)browserActionClicked:(BrowserActionButton*)sender; |
| 77 | 80 |
| 78 // Returns the current ID of the active tab, -1 in the case where the user is in | 81 // Returns the current ID of the active tab, -1 in the case where the user is in |
| 79 // incognito mode. | 82 // incognito mode. |
| 80 - (int)currentTabId; | 83 - (int)currentTabId; |
| 81 | 84 |
| 82 @end // @interface BrowserActionsController | 85 @end // @interface BrowserActionsController |
| 83 | 86 |
| 84 #endif // CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 87 #endif // CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| OLD | NEW |