| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" | 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| 13 #include "ui/views/bubble/bubble_border.h" | 13 #include "ui/views/bubble/bubble_border.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 class View; | 16 class View; |
| 17 } | 17 } |
| 18 | 18 |
| 19 class Browser; | |
| 20 class PermissionsBubbleDelegateView; | 19 class PermissionsBubbleDelegateView; |
| 21 | 20 |
| 22 class PermissionBubbleViewViews : public PermissionBubbleView { | 21 class PermissionBubbleViewViews : public PermissionBubbleView { |
| 23 public: | 22 public: |
| 24 explicit PermissionBubbleViewViews(Browser* browser); | 23 explicit PermissionBubbleViewViews(PermissionBubbleDelegate* delegate); |
| 25 ~PermissionBubbleViewViews() override; | 24 ~PermissionBubbleViewViews() override; |
| 26 | 25 |
| 27 // PermissionBubbleView: | 26 // PermissionBubbleView: |
| 28 void SetDelegate(Delegate* delegate) override; | 27 void SetDelegate(PermissionBubbleDelegate* delegate) override; |
| 29 void Show(const std::vector<PermissionBubbleRequest*>& requests, | 28 void Show() override; |
| 30 const std::vector<bool>& accept_state) override; | |
| 31 bool CanAcceptRequestUpdate() override; | 29 bool CanAcceptRequestUpdate() override; |
| 32 void Hide() override; | 30 void Hide() override; |
| 33 bool IsVisible() override; | 31 bool IsVisible() override; |
| 34 void UpdateAnchorPosition() override; | 32 void UpdateAnchorPosition() override; |
| 35 gfx::NativeWindow GetNativeWindow() override; | 33 gfx::NativeWindow GetNativeWindow() override; |
| 36 | 34 |
| 37 void Closing(); | 35 void Closing(); |
| 38 void Toggle(int index, bool value); | 36 void Toggle(int index, bool value); |
| 39 void Accept(); | 37 void Accept(); |
| 40 void Deny(); | 38 void Deny(); |
| 41 | 39 |
| 42 private: | 40 private: |
| 43 views::View* GetAnchorView(); | 41 views::View* GetAnchorView(); |
| 44 views::BubbleBorder::Arrow GetAnchorArrow(); | 42 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 45 | 43 |
| 46 Browser* browser_; | 44 PermissionBubbleDelegate* delegate_; |
| 47 Delegate* delegate_; | |
| 48 PermissionsBubbleDelegateView* bubble_delegate_; | 45 PermissionsBubbleDelegateView* bubble_delegate_; |
| 49 | 46 |
| 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 47 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 51 }; | 48 }; |
| 52 | 49 |
| 53 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 50 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |