| Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h
|
| diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h
|
| index ce4146268943c3d19ef964dc7d2143671b71b470..0baa71ce7ab1a80714209f1e900836e196ccc3ae 100644
|
| --- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h
|
| +++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h
|
| @@ -6,12 +6,13 @@
|
|
|
| #include "base/mac/scoped_nsobject.h"
|
| #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
|
| -#include "chrome/browser/ui/website_settings/permission_bubble_view.h"
|
| #include "ui/base/models/simple_menu_model.h"
|
|
|
| +class Browser;
|
| @class MenuController;
|
| class PermissionBubbleCocoa;
|
| class PermissionBubbleRequest;
|
| +class PermissionBubbleManager;
|
|
|
| @interface PermissionBubbleController :
|
| BaseBubbleController<NSTextViewDelegate> {
|
| @@ -21,7 +22,10 @@ class PermissionBubbleRequest;
|
| base::scoped_nsobject<NSMutableArray> checkboxes_;
|
|
|
| // Delegate to be informed of user actions.
|
| - PermissionBubbleView::Delegate* delegate_; // Weak.
|
| + PermissionBubbleManager* manager_; // Weak.
|
| +
|
| + // Used to determine the correct anchor location and parent window.
|
| + Browser* browser_; // Weak.
|
|
|
| // Delegate that receives menu events on behalf of this.
|
| scoped_ptr<ui::SimpleMenuModel::Delegate> menuDelegate_;
|
| @@ -30,19 +34,16 @@ class PermissionBubbleRequest;
|
| PermissionBubbleCocoa* bridge_; // Weak.
|
| }
|
|
|
| -// Designated initializer. |parentWindow| and |bridge| must both be non-nil.
|
| -- (id)initWithParentWindow:(NSWindow*)parentWindow
|
| - bridge:(PermissionBubbleCocoa*)bridge;
|
| -
|
| -// Makes the bubble visible, with an arrow pointing to |anchor|. The bubble
|
| -// will be populated with text retrieved from |requests|. If
|
| -// |customizationMode| is YES, each request will have a checkbox, with its state
|
| -// set to the corresponding element in |acceptStates|. If it is NO, each
|
| -// request will have a bullet point and |acceptStates| may be empty. |delegate|
|
| -// will receive callbacks for user actions.
|
| -- (void)showAtAnchor:(NSPoint)anchor
|
| - withDelegate:(PermissionBubbleView::Delegate*)delegate
|
| - forRequests:(const std::vector<PermissionBubbleRequest*>&)requests
|
| - acceptStates:(const std::vector<bool>&)acceptStates;
|
| +// Designated initializer. |browser| and |bridge| must both be non-nil.
|
| +- (id)initWithBrowser:(Browser*)browser bridge:(PermissionBubbleCocoa*)bridge;
|
| +
|
| +// Makes the bubble visible. The bubble will be popuplated with text retrieved
|
| +// from |requests|. |delegate| will receive callbacks for user actions.
|
| +- (void)showWithManager:(PermissionBubbleManager*)manager
|
| + forRequests:(const std::vector<PermissionBubbleRequest*>&)requests
|
| + acceptStates:(const std::vector<bool>&)acceptStates;
|
| +
|
| +// Will reposition the bubble based in case the anchor or parent should change.
|
| +- (void)updateAnchorPosition;
|
|
|
| @end
|
|
|