OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ |
7 | 7 |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 explicit PermissionBubbleCocoa(NSWindow* parent_window); | 22 explicit PermissionBubbleCocoa(NSWindow* parent_window); |
23 virtual ~PermissionBubbleCocoa(); | 23 virtual ~PermissionBubbleCocoa(); |
24 | 24 |
25 // PermissionBubbleView interface. | 25 // PermissionBubbleView interface. |
26 virtual void Show(const std::vector<PermissionBubbleRequest*>& requests, | 26 virtual void Show(const std::vector<PermissionBubbleRequest*>& requests, |
27 const std::vector<bool>& accept_state, | 27 const std::vector<bool>& accept_state, |
28 bool customization_mode) OVERRIDE; | 28 bool customization_mode) OVERRIDE; |
29 virtual void Hide() OVERRIDE; | 29 virtual void Hide() OVERRIDE; |
30 virtual void SetDelegate(Delegate* delegate) OVERRIDE; | 30 virtual void SetDelegate(Delegate* delegate) OVERRIDE; |
| 31 virtual bool CanAcceptRequestUpdate() OVERRIDE; |
31 | 32 |
32 // Called when |bubbleController_| is closing. | 33 // Called when |bubbleController_| is closing. |
33 void OnBubbleClosing(); | 34 void OnBubbleClosing(); |
34 | 35 |
35 private: | 36 private: |
36 NSWindow* parent_window_; // Weak. | 37 NSWindow* parent_window_; // Weak. |
37 Delegate* delegate_; // Weak. | 38 Delegate* delegate_; // Weak. |
38 | 39 |
39 // Cocoa-side UI controller for the bubble. Weak, as it will close itself. | 40 // Cocoa-side UI controller for the bubble. Weak, as it will close itself. |
40 PermissionBubbleController* bubbleController_; | 41 PermissionBubbleController* bubbleController_; |
41 | 42 |
42 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); | 43 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); |
43 }; | 44 }; |
44 | 45 |
45 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ | 46 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ |
OLD | NEW |