Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ | |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ | |
| 7 | |
| 8 #include "chrome/browser/ui/website_settings/permission_prompt.h" | |
| 9 | |
| 10 class GroupedPermissionInfoBarDelegate; | |
| 11 class InfoBarService; | |
| 12 | |
| 13 namespace content { | |
| 14 class WebContents; | |
| 15 } | |
| 16 | |
| 17 namespace infobars { | |
| 18 class InfoBar; | |
| 19 } | |
| 20 | |
| 21 class PermissionPromptAndroid : public PermissionPrompt { | |
| 22 public: | |
| 23 explicit PermissionPromptAndroid(content::WebContents* web_contents); | |
| 24 ~PermissionPromptAndroid() override; | |
| 25 | |
| 26 // PermissionPrompt: | |
| 27 void SetDelegate(Delegate* delegate) override; | |
| 28 void Show(const std::vector<PermissionRequest*>& requests, | |
| 29 const std::vector<bool>& accept_state) override; | |
| 30 bool CanAcceptRequestUpdate() override; | |
| 31 void Hide() override; | |
| 32 bool IsVisible() override; | |
| 33 void UpdateAnchorPosition() override; | |
| 34 gfx::NativeWindow GetNativeWindow() override; | |
| 35 | |
| 36 void Closing(); | |
| 37 | |
| 38 private: | |
| 39 content::WebContents* web_contents_; | |
|
dominickn
2016/10/24 23:22:38
Holding a bare WebContents is dangerous, since you
lshang
2016/10/25 03:33:14
PermissionRequestManager is a WebContentsObserver,
| |
| 40 Delegate* delegate_; | |
| 41 GroupedPermissionInfoBarDelegate* infobar_delegate_; | |
| 42 infobars::InfoBar* infobar_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid); | |
| 45 }; | |
| 46 | |
| 47 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ | |
| OLD | NEW |