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_PERMISSION_PROMPT_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "chrome/browser/ui/website_settings/permission_prompt.h" | 13 #include "chrome/browser/ui/website_settings/permission_prompt.h" |
14 #include "ui/gfx/geometry/point.h" | 14 #include "ui/gfx/geometry/point.h" |
15 #include "ui/views/bubble/bubble_border.h" | 15 #include "ui/views/bubble/bubble_border.h" |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 class View; | 18 class View; |
19 } | 19 } |
20 | 20 |
| 21 namespace content { |
| 22 class WebContents; |
| 23 } |
| 24 |
21 class Browser; | 25 class Browser; |
22 class PermissionsBubbleDialogDelegateView; | 26 class PermissionsBubbleDialogDelegateView; |
23 | 27 |
24 class PermissionPromptImpl : public PermissionPrompt { | 28 class PermissionPromptImpl : public PermissionPrompt { |
25 public: | 29 public: |
26 explicit PermissionPromptImpl(Browser* browser); | 30 explicit PermissionPromptImpl(content::WebContents* web_contents); |
27 ~PermissionPromptImpl() override; | 31 ~PermissionPromptImpl() override; |
28 | 32 |
29 // PermissionPrompt: | 33 // PermissionPrompt: |
30 void SetDelegate(Delegate* delegate) override; | 34 void SetDelegate(Delegate* delegate) override; |
31 void Show(const std::vector<PermissionRequest*>& requests, | 35 void Show(const std::vector<PermissionRequest*>& requests, |
32 const std::vector<bool>& accept_state) override; | 36 const std::vector<bool>& accept_state) override; |
33 bool CanAcceptRequestUpdate() override; | 37 bool CanAcceptRequestUpdate() override; |
34 void Hide() override; | 38 void Hide() override; |
35 bool IsVisible() override; | 39 bool IsVisible() override; |
36 void UpdateAnchorPosition() override; | 40 void UpdateAnchorPosition() override; |
(...skipping 17 matching lines...) Expand all Loading... |
54 views::BubbleBorder::Arrow GetAnchorArrow(); | 58 views::BubbleBorder::Arrow GetAnchorArrow(); |
55 | 59 |
56 Browser* browser_; | 60 Browser* browser_; |
57 Delegate* delegate_; | 61 Delegate* delegate_; |
58 PermissionsBubbleDialogDelegateView* bubble_delegate_; | 62 PermissionsBubbleDialogDelegateView* bubble_delegate_; |
59 | 63 |
60 DISALLOW_COPY_AND_ASSIGN(PermissionPromptImpl); | 64 DISALLOW_COPY_AND_ASSIGN(PermissionPromptImpl); |
61 }; | 65 }; |
62 | 66 |
63 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ | 67 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ |
OLD | NEW |