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

Side by Side Diff: content/browser/plugin_service_filter.h

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_PLUGIN_FILTER_H_ 5 #ifndef CONTENT_BROWSER_PLUGIN_FILTER_H_
6 #define CONTENT_BROWSER_PLUGIN_FILTER_H_ 6 #define CONTENT_BROWSER_PLUGIN_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 10
11 namespace webkit { 11 namespace webkit {
12 struct WebPluginInfo; 12 struct WebPluginInfo;
13 } 13 }
14 14
15 namespace content { 15 namespace content {
16 16
17 class ResourceContext; 17 class ResourceContext;
18 18
19 // base::Bind() has limited arity, and the filter-related methods tend to 19 // base::Bind() has limited arity, and the filter-related methods tend to
20 // surpass that limit. 20 // surpass that limit.
21 struct PluginServiceFilterParams { 21 struct PluginServiceFilterParams {
22 int render_process_id; 22 int render_process_id;
23 int render_view_id; 23 int render_view_id;
24 GURL page_url; 24 GURL page_url;
25 const ResourceContext* resource_context; 25 ResourceContext* resource_context;
26 }; 26 };
27 27
28 // Callback class to let the client filter the list of all installed plug-ins. 28 // Callback class to let the client filter the list of all installed plug-ins.
29 // This class is called on the FILE thread. 29 // This class is called on the FILE thread.
30 class PluginServiceFilter { 30 class PluginServiceFilter {
31 public: 31 public:
32 virtual ~PluginServiceFilter() {} 32 virtual ~PluginServiceFilter() {}
33 33
34 // Whether to use |plugin|. The client can return false to disallow the 34 // Whether to use |plugin|. The client can return false to disallow the
35 // plugin, or return true and optionally change the passed in plugin. 35 // plugin, or return true and optionally change the passed in plugin.
36 virtual bool ShouldUsePlugin( 36 virtual bool ShouldUsePlugin(
37 int render_process_id, 37 int render_process_id,
38 int render_view_id, 38 int render_view_id,
39 const void* context, 39 const void* context,
40 const GURL& url, 40 const GURL& url,
41 const GURL& policy_url, 41 const GURL& policy_url,
42 webkit::WebPluginInfo* plugin) = 0; 42 webkit::WebPluginInfo* plugin) = 0;
43 }; 43 };
44 44
45 } // namespace content 45 } // namespace content
46 46
47 #endif // CONTENT_BROWSER_PLUGIN_FILTER_H_ 47 #endif // CONTENT_BROWSER_PLUGIN_FILTER_H_
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698