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

Unified Diff: chrome/browser/guestview/webview/plugin_permission_helper.h

Issue 24576003: <webview>: Change how plugin load works inside guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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/guestview/webview/plugin_permission_helper.h
diff --git a/chrome/browser/guestview/webview/plugin_permission_helper.h b/chrome/browser/guestview/webview/plugin_permission_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..09f114ed5ec078a6e6bb8aefe51193932c2861d5
--- /dev/null
+++ b/chrome/browser/guestview/webview/plugin_permission_helper.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2013 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_GUESTVIEW_WEBVIEW_PLUGIN_PERMISSION_HELPER_H_
+#define CHROME_BROWSER_GUESTVIEW_WEBVIEW_PLUGIN_PERMISSION_HELPER_H_
+
+#include "base/memory/weak_ptr.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+
+class PluginPermissionHelper
+ : public content::WebContentsUserData<PluginPermissionHelper>,
+ public content::WebContentsObserver {
+ public:
+ virtual ~PluginPermissionHelper();
+
+ private:
+ explicit PluginPermissionHelper(content::WebContents* web_contents);
+ friend class content::WebContentsUserData<PluginPermissionHelper>;
+
+ // content::WebContentsObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // Message handlers:
+ void OnBlockedUnauthorizedPlugin(const string16& name,
+ const std::string& identifier);
+ void OnCouldNotLoadPlugin(const base::FilePath& plugin_path);
+ void OnBlockedOutdatedPlugin(int placeholder_id,
+ const std::string& identifier);
+ void OnNPAPINotSupported(const std::string& identifier);
+ void OnOpenAboutPlugins();
+#if defined(ENABLE_PLUGIN_INSTALLATION)
+ void OnFindMissingPlugin(int placeholder_id, const std::string& mime_type);
+
+ void OnRemovePluginPlaceholderHost(int placeholder_id);
+#endif
+
+ void OnPermissionResponse(const std::string& identifier,
+ bool allow,
+ const std::string& user_input);
+
+ base::WeakPtrFactory<PluginPermissionHelper> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(PluginPermissionHelper);
+};
+
+#endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_PLUGIN_PERMISSION_HELPER_H_
« no previous file with comments | « chrome/browser/apps/web_view_browsertest.cc ('k') | chrome/browser/guestview/webview/plugin_permission_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698