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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h

Issue 151593005: Implement permission bubble view for Cocoa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ensure only one delegate owns the view at a time Created 6 years, 9 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 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 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
7
8 #include "base/mac/scoped_nsobject.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
12 #include "content/public/browser/web_contents.h"
13
14 #ifdef __OBJC__
15 @class PermissionBubbleController;
16 #else
17 class PermissionBubbleController;
18 #endif
19
20 class PermissionBubbleCocoa : public PermissionBubbleView {
21 public:
22 explicit PermissionBubbleCocoa(NSWindow* parent_window);
23 virtual ~PermissionBubbleCocoa();
24
25 // PermissionBubbleView interface.
26 virtual void Show(const std::vector<PermissionBubbleRequest*>& requests,
27 const std::vector<bool>& accept_state,
28 bool customization_mode) OVERRIDE;
29 virtual void Hide() OVERRIDE;
30 virtual void SetDelegate(Delegate* delegate) OVERRIDE;
31
32 // Called when |bubbleController_| is closing.
33 void OnBubbleClosing();
34
35 private:
36 NSWindow* parent_window_; // Weak.
37 Delegate* delegate_; // Weak.
38
39 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
40 PermissionBubbleController* bubbleController_;
41
42 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
43 };
44
45 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698