X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fui%2Fcocoa%2Fextensions%2Fbrowser_actions_controller.h;h=e6649be0b741a47540aa6e8771346f9c94d1df03;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=edb3471cf431465295a33e637b1f02ee6244e9a1;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h b/src/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h index edb3471..e6649be 100644 --- a/src/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h +++ b/src/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h @@ -23,6 +23,10 @@ class Extension; class ExtensionToolbarModel; } +namespace content { +class WebContents; +} + // Sent when the visibility of the Browser Actions changes. extern NSString* const kBrowserActionVisibilityChangedNotification; @@ -85,19 +89,14 @@ extern NSString* const kBrowserActionVisibilityChangedNotification; // account the size of the grippy. Also updates the persistent width preference. - (void)resizeContainerAndAnimate:(BOOL)animate; -// Returns the NSView for the action button associated with an extension. -- (NSView*)browserActionViewForExtension:( - const extensions::Extension*)extension; - // Returns the saved width determined by the number of shown Browser Actions // preference property. If no preference is found, then the width for the // container is returned as if all buttons are shown. - (CGFloat)savedWidth; -// Returns where the popup arrow should point to for a given Browser Action. If -// it is passed an extension that is not a Browser Action, then it will return -// NSZeroPoint. -- (NSPoint)popupPointForBrowserAction:(const extensions::Extension*)extension; +// Returns where the popup arrow should point to for the action with the given +// |id|. If passed an id with no corresponding button, returns NSZeroPoint. +- (NSPoint)popupPointForId:(const std::string&)id; // Returns whether the chevron button is currently hidden or in the process of // being hidden (fading out). Will return NO if it is not hidden or is in the @@ -107,10 +106,13 @@ extern NSString* const kBrowserActionVisibilityChangedNotification; // Activates the browser action for the extension that has the given id. - (void)activateBrowserAction:(const std::string&)extension_id; +// Returns the currently-active web contents. +- (content::WebContents*)currentWebContents; + @end // @interface BrowserActionsController @interface BrowserActionsController(TestingAPI) -- (NSButton*)buttonWithIndex:(NSUInteger)index; +- (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; @end #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_