| Index: chrome/common/chrome_plugin_lib.cc
|
| ===================================================================
|
| --- chrome/common/chrome_plugin_lib.cc (revision 8197)
|
| +++ chrome/common/chrome_plugin_lib.cc (working copy)
|
| @@ -36,6 +36,12 @@
|
| static DWORD g_plugin_thread_id = 0;
|
| static MessageLoop* g_plugin_thread_loop = NULL;
|
|
|
| +#ifdef GEARS_STATIC_LIB
|
| +// defined in gears/base/chrome/module_cr.cc
|
| +CPError STDCALL Gears_CP_Initialize(CPID id, const CPBrowserFuncs *bfuncs,
|
| + CPPluginFuncs *pfuncs);
|
| +#endif
|
| +
|
| static bool IsSingleProcessMode() {
|
| // We don't support ChromePlugins in single-process mode.
|
| CommandLine command_line;
|
| @@ -231,6 +237,14 @@
|
|
|
| bool ChromePluginLib::Load() {
|
| DCHECK(module_ == 0);
|
| +#ifdef GEARS_STATIC_LIB
|
| + FilePath path;
|
| + if (filename_.BaseName().value().find(FILE_PATH_LITERAL("gears")) == 0) {
|
| + CP_Initialize_ = &Gears_CP_Initialize;
|
| + return true;
|
| + }
|
| +#endif
|
| +
|
| module_ = LoadLibrary(filename_.value().c_str());
|
| if (module_ == 0)
|
| return false;
|
|
|