| 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; | 19 class Browser; |
| 20 class PermissionsBubbleDialogDelegateView; | 20 class PermissionsBubbleDialogDelegateView; |
| 21 | 21 |
| 22 class PermissionBubbleViewViews : public PermissionBubbleView { | 22 class PermissionBubbleViewViews : public PermissionBubbleView { |
| 23 public: | 23 public: |
| 24 explicit PermissionBubbleViewViews(Browser* browser); | 24 explicit PermissionBubbleViewViews(Browser* browser); |
| 25 ~PermissionBubbleViewViews() override; | 25 ~PermissionBubbleViewViews() override; |
| 26 | 26 |
| 27 // PermissionBubbleView: | 27 // PermissionBubbleView: |
| 28 void SetDelegate(Delegate* delegate) override; | 28 void SetDelegate(Delegate* delegate) override; |
| 29 void Show(const std::vector<PermissionBubbleRequest*>& requests, | 29 void Show(const std::vector<PermissionRequest*>& requests, |
| 30 const std::vector<bool>& accept_state) override; | 30 const std::vector<bool>& accept_state) override; |
| 31 bool CanAcceptRequestUpdate() override; | 31 bool CanAcceptRequestUpdate() override; |
| 32 void Hide() override; | 32 void Hide() override; |
| 33 bool IsVisible() override; | 33 bool IsVisible() override; |
| 34 void UpdateAnchorPosition() override; | 34 void UpdateAnchorPosition() override; |
| 35 gfx::NativeWindow GetNativeWindow() override; | 35 gfx::NativeWindow GetNativeWindow() override; |
| 36 | 36 |
| 37 void Closing(); | 37 void Closing(); |
| 38 void Toggle(int index, bool value); | 38 void Toggle(int index, bool value); |
| 39 void Accept(); | 39 void Accept(); |
| 40 void Deny(); | 40 void Deny(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 views::View* GetAnchorView(); | 43 views::View* GetAnchorView(); |
| 44 views::BubbleBorder::Arrow GetAnchorArrow(); | 44 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 45 | 45 |
| 46 Browser* browser_; | 46 Browser* browser_; |
| 47 Delegate* delegate_; | 47 Delegate* delegate_; |
| 48 PermissionsBubbleDialogDelegateView* bubble_delegate_; | 48 PermissionsBubbleDialogDelegateView* bubble_delegate_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 53 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |