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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_GUESTVIEW_WEBVIEW_PLUGIN_PERMISSION_HELPER_H_
6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_PLUGIN_PERMISSION_HELPER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h"
11
12 class PluginPermissionHelper
13 : public content::WebContentsUserData<PluginPermissionHelper>,
14 public content::WebContentsObserver {
15 public:
16 virtual ~PluginPermissionHelper();
17
18 private:
19 explicit PluginPermissionHelper(content::WebContents* web_contents);
20 friend class content::WebContentsUserData<PluginPermissionHelper>;
21
22 // content::WebContentsObserver implementation.
23 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
24
25 // Message handlers:
26 void OnBlockedUnauthorizedPlugin(const string16& name,
27 const std::string& identifier);
28 void OnCouldNotLoadPlugin(const base::FilePath& plugin_path);
29
30 void OnPermissionResponse(const std::string& identifier,
31 bool allow,
32 const std::string& user_input);
33
34 base::WeakPtrFactory<PluginPermissionHelper> weak_factory_;
35
36 DISALLOW_COPY_AND_ASSIGN(PluginPermissionHelper);
37 };
38
39 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_PLUGIN_PERMISSION_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698