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

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

Issue 7812020: Moved the following IPC messages used by the chrome NPAPI plugin installer out of content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 (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 "chrome/default_plugin/plugin_main.h" 5 #include "chrome/default_plugin/plugin_main.h"
6 #include "content/common/content_constants.h"
6 7
7 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 10 #include "base/string_util.h"
9 #include "chrome/default_plugin/plugin_impl.h" 11 #include "chrome/default_plugin/plugin_impl.h"
10 #include "webkit/glue/webkit_glue.h" 12 #include "webkit/glue/webkit_glue.h"
11 13
12 namespace default_plugin { 14 namespace default_plugin {
13 15
14 #if defined(OS_WIN) 16 #if defined(OS_WIN)
15 // 17 //
16 // Forward declare the linker-provided pseudo variable for the 18 // Forward declare the linker-provided pseudo variable for the
17 // current module handle. 19 // current module handle.
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 int16_t NPP_HandleEvent(NPP instance, void* event) { 321 int16_t NPP_HandleEvent(NPP instance, void* event) {
320 if (instance == NULL) 322 if (instance == NULL)
321 return 0; 323 return 0;
322 324
323 PluginInstallerImpl* plugin_impl = 325 PluginInstallerImpl* plugin_impl =
324 reinterpret_cast<PluginInstallerImpl*>(instance->pdata); 326 reinterpret_cast<PluginInstallerImpl*>(instance->pdata);
325 327
326 return plugin_impl->NPP_HandleEvent(event); 328 return plugin_impl->NPP_HandleEvent(event);
327 } 329 }
328 330
331
332 // PluginInstallerBase member definitions.
333
334 PluginInstallerBase::PluginInstallerBase()
335 : renderer_process_id_(0),
336 render_view_id_(0) {
337 }
338
339 PluginInstallerBase::~PluginInstallerBase() {
340 }
341
342 bool PluginInstallerBase::Initialize(void* module_handle, NPP instance,
343 NPMIMEType mime_type, int16 argc,
344 char* argn[], char* argv[]) {
345 for (int16_t index = 0; index < argc; ++index) {
346 if (!base::strncasecmp(argn[index], content::kPluginRenderProcessId,
347 strlen(argn[index]))) {
348 base::StringToInt(argv[index], &renderer_process_id_);
349 } else if (!base::strncasecmp(argn[index], content::kPluginRenderViewId,
350 strlen(argn[index]))) {
351 base::StringToInt(argv[index], &render_view_id_);
352 }
353 }
354 return true;
355 }
356
329 } // default_plugin 357 } // default_plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698