Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3042)

Unified Diff: chrome/browser/permissions/permission_prompt_android.h

Issue 2315563002: Add PermissionPromptAndroid skeleton (Closed)
Patch Set: add a comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b6517bc313189224bac3b6aef5f6679e28bb9dbd
--- /dev/null
+++ b/chrome/browser/permissions/permission_prompt_android.h
@@ -0,0 +1,49 @@
+// 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* delegate_;
+ infobars::InfoBar* infobar_;
dominickn 2016/10/26 02:51:16 Nit: add another comment here to say // |infobar_
lshang 2016/10/26 04:55:17 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid);
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698