| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This class responds to requests from renderers for the list of plugins, and | 5 // This class responds to requests from renderers for the list of plugins, and |
| 6 // also a proxy object for plugin instances. | 6 // also a proxy object for plugin instances. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_PLUGIN_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_PLUGIN_SERVICE_H_ |
| 9 #define CHROME_BROWSER_PLUGIN_SERVICE_H_ | 9 #define CHROME_BROWSER_PLUGIN_SERVICE_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // 'plugin_path' if needed. If the process fails to start, the return value | 73 // 'plugin_path' if needed. If the process fails to start, the return value |
| 74 // is NULL. Must be called on the IO thread. | 74 // is NULL. Must be called on the IO thread. |
| 75 PluginProcessHost* FindOrStartPluginProcess(const FilePath& plugin_path); | 75 PluginProcessHost* FindOrStartPluginProcess(const FilePath& plugin_path); |
| 76 | 76 |
| 77 // Opens a channel to a plugin process for the given mime type, starting | 77 // Opens a channel to a plugin process for the given mime type, starting |
| 78 // a new plugin process if necessary. This must be called on the IO thread | 78 // a new plugin process if necessary. This must be called on the IO thread |
| 79 // or else a deadlock can occur. | 79 // or else a deadlock can occur. |
| 80 void OpenChannelToPlugin(ResourceMessageFilter* renderer_msg_filter, | 80 void OpenChannelToPlugin(ResourceMessageFilter* renderer_msg_filter, |
| 81 const GURL& url, | 81 const GURL& url, |
| 82 const std::string& mime_type, | 82 const std::string& mime_type, |
| 83 const std::wstring& locale, | 83 const std::string& locale, |
| 84 IPC::Message* reply_msg); | 84 IPC::Message* reply_msg); |
| 85 | 85 |
| 86 // Returns true if the given plugin is allowed to be used by a page with | 86 // Returns true if the given plugin is allowed to be used by a page with |
| 87 // the given URL. | 87 // the given URL. |
| 88 bool PrivatePluginAllowedForURL(const FilePath& plugin_path, const GURL& url); | 88 bool PrivatePluginAllowedForURL(const FilePath& plugin_path, const GURL& url); |
| 89 | 89 |
| 90 // The UI thread's message loop | 90 // The UI thread's message loop |
| 91 MessageLoop* main_message_loop() { return main_message_loop_; } | 91 MessageLoop* main_message_loop() { return main_message_loop_; } |
| 92 | 92 |
| 93 ResourceDispatcherHost* resource_dispatcher_host() const { | 93 ResourceDispatcherHost* resource_dispatcher_host() const { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 base::WaitableEventWatcher hklm_watcher_; | 146 base::WaitableEventWatcher hklm_watcher_; |
| 147 #endif | 147 #endif |
| 148 | 148 |
| 149 // Set to true if chrome plugins are enabled. Defaults to true. | 149 // Set to true if chrome plugins are enabled. Defaults to true. |
| 150 static bool enable_chrome_plugins_; | 150 static bool enable_chrome_plugins_; |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(PluginService); | 152 DISALLOW_COPY_AND_ASSIGN(PluginService); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 #endif // CHROME_BROWSER_PLUGIN_SERVICE_H_ | 155 #endif // CHROME_BROWSER_PLUGIN_SERVICE_H_ |
| OLD | NEW |