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.
5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
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"
15 @
class PermissionBubbleController
;
17 class PermissionBubbleController
;
20 class PermissionBubbleCocoa
: public PermissionBubbleView
{
22 explicit PermissionBubbleCocoa(NSWindow
* parent_window
);
23 virtual ~PermissionBubbleCocoa();
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 virtual bool CanAcceptRequestUpdate() OVERRIDE
;
33 // Called when |bubbleController_| is closing.
34 void OnBubbleClosing();
37 NSWindow
* parent_window_
; // Weak.
38 Delegate
* delegate_
; // Weak.
40 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
41 PermissionBubbleController
* bubbleController_
;
43 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa
);
46 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_