OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "content/public/common/pepper_plugin_info.h" | 5 #include "content/public/common/pepper_plugin_info.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/version.h" |
8 | 9 |
9 namespace content { | 10 namespace content { |
10 | 11 |
11 PepperPluginInfo::EntryPoints::EntryPoints() | 12 PepperPluginInfo::EntryPoints::EntryPoints() |
12 : get_interface(NULL), | 13 : get_interface(NULL), |
13 initialize_module(NULL), | 14 initialize_module(NULL), |
14 shutdown_module(NULL) { | 15 shutdown_module(NULL) { |
15 } | 16 } |
16 | 17 |
17 PepperPluginInfo::PepperPluginInfo() | 18 PepperPluginInfo::PepperPluginInfo() |
18 : is_internal(false), | 19 : is_internal(false), |
19 is_out_of_process(false), | 20 is_out_of_process(false), |
20 is_debug(false), | 21 is_debug(false), |
| 22 is_on_local_drive(true), |
| 23 is_external(false), |
| 24 is_bundled(false), |
21 permissions(0) { | 25 permissions(0) { |
22 } | 26 } |
23 | 27 |
24 PepperPluginInfo::PepperPluginInfo(const PepperPluginInfo& other) = default; | 28 PepperPluginInfo::PepperPluginInfo(const PepperPluginInfo& other) = default; |
25 | 29 |
26 PepperPluginInfo::~PepperPluginInfo() { | 30 PepperPluginInfo::~PepperPluginInfo() { |
27 } | 31 } |
28 | 32 |
29 WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { | 33 WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { |
30 WebPluginInfo info; | 34 WebPluginInfo info; |
31 | 35 |
32 info.type = is_out_of_process ? | 36 info.type = is_out_of_process ? |
33 WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS : | 37 WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS : |
34 WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS; | 38 WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS; |
35 | 39 |
36 info.name = name.empty() ? | 40 info.name = name.empty() ? |
37 path.BaseName().LossyDisplayName() : base::UTF8ToUTF16(name); | 41 path.BaseName().LossyDisplayName() : base::UTF8ToUTF16(name); |
38 info.path = path; | 42 info.path = path; |
39 info.version = base::ASCIIToUTF16(version); | 43 info.version = base::ASCIIToUTF16(version); |
40 info.desc = base::ASCIIToUTF16(description); | 44 info.desc = base::ASCIIToUTF16(description); |
41 info.mime_types = mime_types; | 45 info.mime_types = mime_types; |
42 info.pepper_permissions = permissions; | 46 info.pepper_permissions = permissions; |
43 | 47 |
44 return info; | 48 return info; |
45 } | 49 } |
46 | 50 |
47 } // namespace content | 51 } // namespace content |
OLD | NEW |