Chromium Code Reviews| Index: chrome/browser/ui/cocoa/permission_bubble_controller.h |
| diff --git a/chrome/browser/ui/cocoa/permission_bubble_controller.h b/chrome/browser/ui/cocoa/permission_bubble_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0b8122148a6c37d136e91743df1f7e337281de9f |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/permission_bubble_controller.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +#include <vector> |
| + |
| +#include "base/mac/scoped_nsobject.h" |
| +#include "base/memory/scoped_ptr.h" |
|
groby-ooo-7-16
2014/01/31 22:31:51
Not used
leng
2014/02/03 22:38:04
Done.
|
| +#import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| +#include "chrome/browser/ui/website_settings/permission_bubble_delegate.h" |
|
groby-ooo-7-16
2014/01/31 22:31:51
Not needed - just forward declare
leng
2014/02/03 22:38:04
Maybe I just don't understand how to forward-decla
groby-ooo-7-16
2014/02/04 02:39:29
Ah - _that_ delegate is in permission_bubble_view.
leng
2014/02/04 21:48:22
AUGH! Silly names.
Done.
|
| +#include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| + |
| +class PermissionBubbleCocoa; |
| + |
| +@interface PermissionBubbleController : BaseBubbleController { |
| + @private |
| + // Array of views that are the checkboxes for every requested permission. |
| + // Only populated if |customizationMode| is YES when the UI is shown. |
| + std::vector<base::scoped_nsobject<NSView> > checkboxes_; |
|
groby-ooo-7-16
2014/01/31 22:31:51
NSMutableArray, please.
leng
2014/02/03 22:38:04
Done.
|
| + |
| + // Delegate to be informed of user actions. |
| + PermissionBubbleView::Delegate* delegate_; // Weak. |
| + |
| + // Bridge to the C++ class that created this object. |
| + PermissionBubbleCocoa* bridge_; // Weak. |
| +} |
| + |
| +- (id)initWithParentWindow:(NSWindow*)parentWindow |
| + bridge:(PermissionBubbleCocoa*)bridge; |
| + |
| +- (void)showAtAnchor:(NSPoint)anchor |
|
groby-ooo-7-16
2014/01/31 22:31:51
Please document class methods.
leng
2014/02/03 22:38:04
Done.
|
| + withDelegate:(PermissionBubbleView::Delegate*)delegate |
| + forRequests:(const std::vector<PermissionBubbleDelegate*>&)requests |
| + acceptStates:(const std::vector<bool>&)acceptStates |
| + customizationMode:(BOOL)customizationMode; |
| + |
| +@end |
| + |