OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/default_plugin/plugin_installer_base.h" |
| 6 |
| 7 #include "base/string_number_conversions.h" |
| 8 #include "base/string_util.h" |
| 9 #include "content/common/content_constants.h" |
| 10 |
| 11 PluginInstallerBase::PluginInstallerBase() |
| 12 : renderer_process_id_(0), |
| 13 render_view_id_(0) { |
| 14 } |
| 15 |
| 16 PluginInstallerBase::~PluginInstallerBase() { |
| 17 } |
| 18 |
| 19 bool PluginInstallerBase::Initialize(void* module_handle, NPP instance, |
| 20 NPMIMEType mime_type, int16 argc, |
| 21 char* argn[], char* argv[]) { |
| 22 for (int16_t index = 0; index < argc; ++index) { |
| 23 if (!base::strncasecmp(argn[index], |
| 24 content::kDefaultPluginRenderProcessId, |
| 25 strlen(argn[index]))) { |
| 26 base::StringToInt(argv[index], &renderer_process_id_); |
| 27 } else if (!base::strncasecmp(argn[index], |
| 28 content::kDefaultPluginRenderViewId, |
| 29 strlen(argn[index]))) { |
| 30 base::StringToInt(argv[index], &render_view_id_); |
| 31 } |
| 32 } |
| 33 return true; |
| 34 } |
OLD | NEW |