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

Unified Diff: content/public/browser/browser_plugin_guest_delegate.h

Issue 21297005: <webview>: Refactor Permission API to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_permissions
Patch Set: Merge with ToT Created 7 years, 4 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
« no previous file with comments | « content/content_common.gypi ('k') | content/public/browser/browser_plugin_guest_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_plugin_guest_delegate.h
diff --git a/content/public/browser/browser_plugin_guest_delegate.h b/content/public/browser/browser_plugin_guest_delegate.h
index df98e4fd7ed7dd0fb66a024bcc23660007a815da..11facb9b5ed32e1a1a7d58b49cec50ac7dc14542 100644
--- a/content/public/browser/browser_plugin_guest_delegate.h
+++ b/content/public/browser/browser_plugin_guest_delegate.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
#define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
+#include "base/callback_forward.h"
#include "base/process/kill.h"
#include "base/strings/string16.h"
+#include "base/values.h"
#include "content/common/content_export.h"
+#include "content/public/common/browser_plugin_permission_type.h"
namespace content {
@@ -41,6 +44,19 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
// Notification that the guest is hung.
virtual void RendererUnresponsive() {}
+
+ typedef base::Callback<void(bool /* allow */,
+ const std::string& /* user_input */)>
+ PermissionResponseCallback;
+
+ // Request permission from the delegate to perform an action of the provided
+ // |permission_type|. Details of the permission request are found in
+ // |request_info|. A |callback| is provided to make the decision.
+ // Returns whether the delegate has, or will handle the permission request.
+ virtual bool RequestPermission(
+ BrowserPluginPermissionType permission_type,
+ const base::DictionaryValue& request_info,
+ const PermissionResponseCallback& callback);
};
} // namespace content
« no previous file with comments | « content/content_common.gypi ('k') | content/public/browser/browser_plugin_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698