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

Side by Side Diff: chrome/browser/extensions/plugin_manager.h

Issue 263513004: Forward MIME types to BrowserPlugin when a viewer is specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style cleanup Created 6 years, 7 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_PLUGIN_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_PLUGIN_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PLUGIN_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_PLUGIN_MANAGER_H_
7 7
8 #include <set>
not at google - send to devlin 2014/04/30 00:48:51 <string> while you're here too
Zachary Kuznia 2014/04/30 01:23:35 Done.
9
8 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
9 #include "chrome/common/extensions/manifest_handlers/nacl_modules_handler.h" 11 #include "chrome/common/extensions/manifest_handlers/nacl_modules_handler.h"
10 #include "extensions/browser/browser_context_keyed_api_factory.h" 12 #include "extensions/browser/browser_context_keyed_api_factory.h"
11 #include "extensions/browser/extension_registry_observer.h" 13 #include "extensions/browser/extension_registry_observer.h"
12 14
13 class GURL; 15 class GURL;
14 class Profile; 16 class Profile;
15 17
16 namespace content { 18 namespace content {
17 class BrowserContext; 19 class BrowserContext;
(...skipping 16 matching lines...) Expand all
34 36
35 // We implement some Pepper plug-ins using NaCl to take advantage of NaCl's 37 // We implement some Pepper plug-ins using NaCl to take advantage of NaCl's
36 // strong sandbox. Typically, these NaCl modules are stored in extensions 38 // strong sandbox. Typically, these NaCl modules are stored in extensions
37 // and registered here. Not all NaCl modules need to register for a MIME 39 // and registered here. Not all NaCl modules need to register for a MIME
38 // type, just the ones that are responsible for rendering a particular MIME 40 // type, just the ones that are responsible for rendering a particular MIME
39 // type, like application/pdf. Note: We only register NaCl modules in the 41 // type, like application/pdf. Note: We only register NaCl modules in the
40 // browser process. 42 // browser process.
41 void RegisterNaClModule(const NaClModuleInfo& info); 43 void RegisterNaClModule(const NaClModuleInfo& info);
42 void UnregisterNaClModule(const NaClModuleInfo& info); 44 void UnregisterNaClModule(const NaClModuleInfo& info);
43 45
46 void RegisterMimeTypeHandler(const std::string& extension_id);
47 void UnregisterMimeTypeHandler(const std::string& extension_id);
48
44 // Call UpdatePluginListWithNaClModules() after registering or unregistering 49 // Call UpdatePluginListWithNaClModules() after registering or unregistering
45 // a NaCl module to see those changes reflected in the PluginList. 50 // a NaCl module to see those changes reflected in the PluginList.
46 void UpdatePluginListWithNaClModules(); 51 void UpdatePluginListWithNaClModules();
47 52
48 extensions::NaClModuleInfo::List::iterator FindNaClModule(const GURL& url); 53 extensions::NaClModuleInfo::List::iterator FindNaClModule(const GURL& url);
49 54
50 // ExtensionRegistryObserver implementation. 55 // ExtensionRegistryObserver implementation.
51 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, 56 virtual void OnExtensionLoaded(content::BrowserContext* browser_context,
52 const Extension* extension) OVERRIDE; 57 const Extension* extension) OVERRIDE;
53 virtual void OnExtensionUnloaded( 58 virtual void OnExtensionUnloaded(
54 content::BrowserContext* browser_context, 59 content::BrowserContext* browser_context,
55 const Extension* extension, 60 const Extension* extension,
56 UnloadedExtensionInfo::Reason reason) OVERRIDE; 61 UnloadedExtensionInfo::Reason reason) OVERRIDE;
57 62
58 // BrowserContextKeyedAPI implementation. 63 // BrowserContextKeyedAPI implementation.
59 static const char* service_name() { return "PluginManager"; } 64 static const char* service_name() { return "PluginManager"; }
60 static const bool kServiceIsNULLWhileTesting = true; 65 static const bool kServiceIsNULLWhileTesting = true;
61 66
62 extensions::NaClModuleInfo::List nacl_module_list_; 67 extensions::NaClModuleInfo::List nacl_module_list_;
68 std::set<std::string> mime_type_handler_;
63 69
64 Profile* profile_; 70 Profile* profile_;
65 71
66 // Listen to extension load, unloaded notifications. 72 // Listen to extension load, unloaded notifications.
67 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 73 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
68 extension_registry_observer_; 74 extension_registry_observer_;
69 }; 75 };
70 76
71 } // namespace extensions 77 } // namespace extensions
72 78
73 #endif // CHROME_BROWSER_EXTENSIONS_PLUGIN_MANAGER_H_ 79 #endif // CHROME_BROWSER_EXTENSIONS_PLUGIN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698