Chromium Code Reviews| Index: chrome/browser/permissions/permission_prompt_android.h |
| diff --git a/chrome/browser/permissions/permission_prompt_android.h b/chrome/browser/permissions/permission_prompt_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2b6c3b05bb6fedcc0607d369218e5f3fde9414db |
| --- /dev/null |
| +++ b/chrome/browser/permissions/permission_prompt_android.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ |
| +#define CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ |
| + |
| +#include "chrome/browser/ui/website_settings/permission_prompt.h" |
| + |
| +class GroupedPermissionInfoBarDelegate; |
| +class InfoBarService; |
| + |
| +namespace content { |
| +class WebContents; |
| +} |
| + |
| +namespace infobars { |
| +class InfoBar; |
| +} |
| + |
| +class PermissionPromptAndroid : public PermissionPrompt { |
| + public: |
| + explicit PermissionPromptAndroid(content::WebContents* web_contents); |
| + ~PermissionPromptAndroid() override; |
| + |
| + // PermissionPrompt: |
| + void SetDelegate(Delegate* delegate) override; |
| + void Show(const std::vector<PermissionRequest*>& requests, |
| + const std::vector<bool>& accept_state) override; |
| + bool CanAcceptRequestUpdate() override; |
| + void Hide() override; |
| + bool IsVisible() override; |
| + void UpdateAnchorPosition() override; |
| + gfx::NativeWindow GetNativeWindow() override; |
| + |
| + void Closing(); |
| + |
| + private: |
| + 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,
|
| + Delegate* delegate_; |
| + GroupedPermissionInfoBarDelegate* infobar_delegate_; |
| + infobars::InfoBar* infobar_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ |