| 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_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" | 10 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| 11 | 11 |
| 12 namespace views { | 12 namespace views { |
| 13 class View; | 13 class View; |
| 14 } | 14 } |
| 15 | 15 |
| 16 class PermissionsBubbleDelegateView; | 16 class PermissionsBubbleDelegateView; |
| 17 class Profile; |
| 17 | 18 |
| 18 class PermissionBubbleViewViews : public PermissionBubbleView { | 19 class PermissionBubbleViewViews : public PermissionBubbleView { |
| 19 public: | 20 public: |
| 20 explicit PermissionBubbleViewViews(views::View* anchor_view); | 21 PermissionBubbleViewViews(views::View* anchor_view, Profile* profile); |
| 21 ~PermissionBubbleViewViews() override; | 22 ~PermissionBubbleViewViews() override; |
| 22 | 23 |
| 23 // PermissionBubbleView: | 24 // PermissionBubbleView: |
| 24 void SetDelegate(Delegate* delegate) override; | 25 void SetDelegate(Delegate* delegate) override; |
| 25 void Show(const std::vector<PermissionBubbleRequest*>& requests, | 26 void Show(const std::vector<PermissionBubbleRequest*>& requests, |
| 26 const std::vector<bool>& accept_state, | 27 const std::vector<bool>& accept_state, |
| 27 bool customization_mode) override; | 28 bool customization_mode) override; |
| 28 bool CanAcceptRequestUpdate() override; | 29 bool CanAcceptRequestUpdate() override; |
| 29 void Hide() override; | 30 void Hide() override; |
| 30 bool IsVisible() override; | 31 bool IsVisible() override; |
| 31 | 32 |
| 32 void Closing(); | 33 void Closing(); |
| 33 void Toggle(int index, bool value); | 34 void Toggle(int index, bool value); |
| 34 void Accept(); | 35 void Accept(); |
| 35 void Deny(); | 36 void Deny(); |
| 36 void SetCustomizationMode(); | 37 void SetCustomizationMode(); |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 views::View* anchor_view_; | 40 views::View* anchor_view_; |
| 40 Delegate* delegate_; | 41 Delegate* delegate_; |
| 41 PermissionsBubbleDelegateView* bubble_delegate_; | 42 PermissionsBubbleDelegateView* bubble_delegate_; |
| 43 Profile* profile_; |
| 42 | 44 |
| 43 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 45 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 48 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |