Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.h

Issue 670463004: Make a platform-independent ToolbarActionViewController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 - (NSUInteger)buttonCount; 78 - (NSUInteger)buttonCount;
79 79
80 // Returns the current number of browser action buttons displayed in the 80 // Returns the current number of browser action buttons displayed in the
81 // container. 81 // container.
82 - (NSUInteger)visibleButtonCount; 82 - (NSUInteger)visibleButtonCount;
83 83
84 // Resizes the container given the number of visible buttons, taking into 84 // Resizes the container given the number of visible buttons, taking into
85 // account the size of the grippy. Also updates the persistent width preference. 85 // account the size of the grippy. Also updates the persistent width preference.
86 - (void)resizeContainerAndAnimate:(BOOL)animate; 86 - (void)resizeContainerAndAnimate:(BOOL)animate;
87 87
88 // Returns the NSView for the action button associated with an extension.
89 - (NSView*)browserActionViewForExtension:(
90 const extensions::Extension*)extension;
91
92 // Returns the saved width determined by the number of shown Browser Actions 88 // Returns the saved width determined by the number of shown Browser Actions
93 // preference property. If no preference is found, then the width for the 89 // preference property. If no preference is found, then the width for the
94 // container is returned as if all buttons are shown. 90 // container is returned as if all buttons are shown.
95 - (CGFloat)savedWidth; 91 - (CGFloat)savedWidth;
96 92
97 // Returns where the popup arrow should point to for a given Browser Action. If 93 // Returns where the popup arrow should point to for the action with the given
98 // it is passed an extension that is not a Browser Action, then it will return 94 // |id|. If passed an id with no corresponding button, returns NSZeroPoint.
99 // NSZeroPoint. 95 - (NSPoint)popupPointForId:(const std::string&)id;
100 - (NSPoint)popupPointForBrowserAction:(const extensions::Extension*)extension;
101 96
102 // Returns whether the chevron button is currently hidden or in the process of 97 // Returns whether the chevron button is currently hidden or in the process of
103 // being hidden (fading out). Will return NO if it is not hidden or is in the 98 // being hidden (fading out). Will return NO if it is not hidden or is in the
104 // process of fading in. 99 // process of fading in.
105 - (BOOL)chevronIsHidden; 100 - (BOOL)chevronIsHidden;
106 101
107 // Activates the browser action for the extension that has the given id. 102 // Activates the browser action for the extension that has the given id.
108 - (void)activateBrowserAction:(const std::string&)extension_id; 103 - (void)activateBrowserAction:(const std::string&)extension_id;
109 104
110 @end // @interface BrowserActionsController 105 @end // @interface BrowserActionsController
111 106
112 @interface BrowserActionsController(TestingAPI) 107 @interface BrowserActionsController(TestingAPI)
113 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; 108 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index;
114 @end 109 @end
115 110
116 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ 111 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698