| 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 "webkit/plugins/webplugininfo.h" | 5 #include "webkit/plugins/webplugininfo.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 | 9 |
| 10 namespace webkit { | 10 namespace webkit { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 path = rhs.path; | 44 path = rhs.path; |
| 45 version = rhs.version; | 45 version = rhs.version; |
| 46 desc = rhs.desc; | 46 desc = rhs.desc; |
| 47 mime_types = rhs.mime_types; | 47 mime_types = rhs.mime_types; |
| 48 type = rhs.type; | 48 type = rhs.type; |
| 49 pepper_permissions = rhs.pepper_permissions; | 49 pepper_permissions = rhs.pepper_permissions; |
| 50 return *this; | 50 return *this; |
| 51 } | 51 } |
| 52 | 52 |
| 53 WebPluginInfo::WebPluginInfo(const string16& fake_name, | 53 WebPluginInfo::WebPluginInfo(const string16& fake_name, |
| 54 const FilePath& fake_path, | 54 const base::FilePath& fake_path, |
| 55 const string16& fake_version, | 55 const string16& fake_version, |
| 56 const string16& fake_desc) | 56 const string16& fake_desc) |
| 57 : name(fake_name), | 57 : name(fake_name), |
| 58 path(fake_path), | 58 path(fake_path), |
| 59 version(fake_version), | 59 version(fake_version), |
| 60 desc(fake_desc), | 60 desc(fake_desc), |
| 61 mime_types(), | 61 mime_types(), |
| 62 type(PLUGIN_TYPE_NPAPI), | 62 type(PLUGIN_TYPE_NPAPI), |
| 63 pepper_permissions(0) { | 63 pepper_permissions(0) { |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool IsPepperPlugin(const WebPluginInfo& plugin) { | 66 bool IsPepperPlugin(const WebPluginInfo& plugin) { |
| 67 return ((plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS ) || | 67 return ((plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS ) || |
| 68 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) || | 68 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) || |
| 69 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED)); | 69 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool IsOutOfProcessPlugin(const WebPluginInfo& plugin) { | 72 bool IsOutOfProcessPlugin(const WebPluginInfo& plugin) { |
| 73 return ((plugin.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) || | 73 return ((plugin.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) || |
| 74 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) || | 74 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) || |
| 75 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED)); | 75 (plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace webkit | 78 } // namespace webkit |
| OLD | NEW |