OLD | NEW |
(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 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 class PermissionBubbleDelegate; |
| 11 class PermissionBubbleManager; |
| 12 |
| 13 // This class is the platform-independent base class which the |
| 14 // manager uses to communicate to the UI surface. The UI toolkit |
| 15 // must set the manager to the view for each tab change caused |
| 16 // in the window. |
| 17 class PermissionBubbleView { |
| 18 public: |
| 19 class Delegate { |
| 20 virtual void ToggleAccept(int index, bool new_value) = 0; |
| 21 virtual void Accept() = 0; |
| 22 virtual void Deny() = 0; |
| 23 virtual void Closing() = 0; |
| 24 }; |
| 25 |
| 26 // Set the delegate which will receive UI events forwarded from the bubble. |
| 27 virtual void SetDelegate(Delegate* delegate) = 0; |
| 28 |
| 29 // Used for live updates to the bubble. |
| 30 virtual void AddPermissionBubbleDelegate( |
| 31 PermissionBubbleDelegate* delegate) = 0; |
| 32 virtual void RemovePermissionBubbleDelegate( |
| 33 PermissionBubbleDelegate* delegate) = 0; |
| 34 |
| 35 virtual void Show( |
| 36 const std::vector<PermissionBubbleDelegate*>& delegates, |
| 37 const std::vector<bool>& accept_state) = 0; |
| 38 virtual void Hide() = 0; |
| 39 }; |
| 40 |
| 41 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_ |
OLD | NEW |