| 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..70334e6553c3f9acd4e7cd96467dd3ee1faf1648
|
| --- /dev/null
|
| +++ b/chrome/browser/permissions/permission_prompt_android.h
|
| @@ -0,0 +1,52 @@
|
| +// 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:
|
| + // PermissionPromptAndroid is owned by PermissionRequestManager, so it should
|
| + // be safe to hold a raw WebContents pointer here because this class is
|
| + // destroyed before the WebContents.
|
| + content::WebContents* web_contents_;
|
| + // |delegate_| is the PermissionRequestManager, which owns this object.
|
| + Delegate* delegate_;
|
| + // |infobar_| is owned by the InfoBarService; we keep a pointer here so we can
|
| + // ask the service to remove the infobar after it is added.
|
| + infobars::InfoBar* infobar_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_
|
|
|