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

Side by Side Diff: chrome/browser/ui/cocoa/permission_bubble_controller.h

Issue 151593005: Implement permission bubble view for Cocoa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a few comments Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6
7 #include <vector>
8
9 #include "base/mac/scoped_nsobject.h"
10 #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.
11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
12 #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.
13 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
14
15 class PermissionBubbleCocoa;
16
17 @interface PermissionBubbleController : BaseBubbleController {
18 @private
19 // Array of views that are the checkboxes for every requested permission.
20 // Only populated if |customizationMode| is YES when the UI is shown.
21 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.
22
23 // Delegate to be informed of user actions.
24 PermissionBubbleView::Delegate* delegate_; // Weak.
25
26 // Bridge to the C++ class that created this object.
27 PermissionBubbleCocoa* bridge_; // Weak.
28 }
29
30 - (id)initWithParentWindow:(NSWindow*)parentWindow
31 bridge:(PermissionBubbleCocoa*)bridge;
32
33 - (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.
34 withDelegate:(PermissionBubbleView::Delegate*)delegate
35 forRequests:(const std::vector<PermissionBubbleDelegate*>&)requests
36 acceptStates:(const std::vector<bool>&)acceptStates
37 customizationMode:(BOOL)customizationMode;
38
39 @end
40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698