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

Side by Side Diff: chrome/default_plugin/plugin_main.cc

Issue 2813047: Move default_plugin from webkit/ to chrome/ (Closed)
Patch Set: fix windows? Created 10 years, 5 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
« no previous file with comments | « chrome/default_plugin/plugin_main.h ('k') | chrome/default_plugin/plugins.xml » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "webkit/default_plugin/plugin_main.h" 5 #include "chrome/default_plugin/plugin_main.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "webkit/default_plugin/plugin_impl.h" 9 #include "chrome/default_plugin/plugin_impl.h"
10 #include "webkit/glue/webkit_glue.h" 10 #include "webkit/glue/webkit_glue.h"
11 11
12 namespace default_plugin { 12 namespace default_plugin {
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 // 15 //
16 // Forward declare the linker-provided pseudo variable for the 16 // Forward declare the linker-provided pseudo variable for the
17 // current module handle. 17 // current module handle.
18 // 18 //
19 extern "C" IMAGE_DOS_HEADER __ImageBase; 19 extern "C" IMAGE_DOS_HEADER __ImageBase;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 NPNVToolkit, 151 NPNVToolkit,
152 &toolkit); 152 &toolkit);
153 if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) { 153 if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) {
154 NOTREACHED(); 154 NOTREACHED();
155 return false; 155 return false;
156 } 156 }
157 #endif 157 #endif
158 return true; 158 return true;
159 } 159 }
160 160
161 NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16_t mode, int16_t arg c, 161 NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16_t mode,
162 char* argn[], char* argv[], NPSavedData* saved) { 162 int16_t argc, char* argn[], char* argv[], NPSavedData* saved) {
163 if (instance == NULL) 163 if (instance == NULL)
164 return NPERR_INVALID_INSTANCE_ERROR; 164 return NPERR_INVALID_INSTANCE_ERROR;
165 165
166 // We don't want the null plugin to work in the following cases:- 166 // We don't want the null plugin to work in the following cases:-
167 // 1. Test-shell 167 // 1. Test-shell
168 // 2. The plugin is running in the renderer process. 168 // 2. The plugin is running in the renderer process.
169 if (webkit_glue::IsPluginRunningInRendererProcess()) { 169 if (webkit_glue::IsPluginRunningInRendererProcess()) {
170 return NPERR_GENERIC_ERROR; 170 return NPERR_GENERIC_ERROR;
171 } 171 }
172 172
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 if (instance == NULL) 327 if (instance == NULL)
328 return 0; 328 return 0;
329 329
330 PluginInstallerImpl* plugin_impl = 330 PluginInstallerImpl* plugin_impl =
331 reinterpret_cast<PluginInstallerImpl*>(instance->pdata); 331 reinterpret_cast<PluginInstallerImpl*>(instance->pdata);
332 332
333 return plugin_impl->NPP_HandleEvent(event); 333 return plugin_impl->NPP_HandleEvent(event);
334 } 334 }
335 335
336 } // default_plugin 336 } // default_plugin
OLDNEW
« no previous file with comments | « chrome/default_plugin/plugin_main.h ('k') | chrome/default_plugin/plugins.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698