OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/component_updater/flash_component_installer.h" | 5 #include "chrome/browser/component_updater/flash_component_installer.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/base_paths.h" | 11 #include "base/base_paths.h" |
(...skipping 14 matching lines...) Expand all Loading... |
26 #include "chrome/browser/component_updater/component_updater_service.h" | 26 #include "chrome/browser/component_updater/component_updater_service.h" |
27 #include "chrome/browser/plugins/plugin_prefs.h" | 27 #include "chrome/browser/plugins/plugin_prefs.h" |
28 #include "chrome/common/chrome_constants.h" | 28 #include "chrome/common/chrome_constants.h" |
29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/common/pepper_flash.h" | 31 #include "chrome/common/pepper_flash.h" |
32 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
33 #include "content/public/browser/plugin_service.h" | 33 #include "content/public/browser/plugin_service.h" |
34 #include "content/public/common/pepper_plugin_info.h" | 34 #include "content/public/common/pepper_plugin_info.h" |
35 #include "ppapi/c/private/ppb_pdf.h" | 35 #include "ppapi/c/private/ppb_pdf.h" |
| 36 #include "webkit/common/plugins/ppapi/ppapi_utils.h" |
36 #include "webkit/plugins/plugin_constants.h" | 37 #include "webkit/plugins/plugin_constants.h" |
37 #include "webkit/plugins/ppapi/plugin_module.h" | |
38 | 38 |
39 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. | 39 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. |
40 | 40 |
41 using content::BrowserThread; | 41 using content::BrowserThread; |
42 using content::PluginService; | 42 using content::PluginService; |
43 | 43 |
44 namespace { | 44 namespace { |
45 | 45 |
46 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb. | 46 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb. |
47 const uint8 kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20, | 47 const uint8 kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 found = true; | 116 found = true; |
117 } | 117 } |
118 } | 118 } |
119 return found; | 119 return found; |
120 } | 120 } |
121 #endif | 121 #endif |
122 | 122 |
123 // Returns true if the Pepper |interface_name| is implemented by this browser. | 123 // Returns true if the Pepper |interface_name| is implemented by this browser. |
124 // It does not check if the interface is proxied. | 124 // It does not check if the interface is proxied. |
125 bool SupportsPepperInterface(const char* interface_name) { | 125 bool SupportsPepperInterface(const char* interface_name) { |
126 if (webkit::ppapi::PluginModule::SupportsInterface(interface_name)) | 126 if (webkit::ppapi::IsSupportedPepperInterface(interface_name)) |
127 return true; | 127 return true; |
128 // The PDF interface is invisible to SupportsInterface() on the browser | 128 // The PDF interface is invisible to SupportsInterface() on the browser |
129 // process because it is provided using PpapiInterfaceFactoryManager. We need | 129 // process because it is provided using PpapiInterfaceFactoryManager. We need |
130 // to check for that as well. | 130 // to check for that as well. |
131 // TODO(cpu): make this more sane. | 131 // TODO(cpu): make this more sane. |
132 return (strcmp(interface_name, PPB_PDF_INTERFACE) == 0); | 132 return (strcmp(interface_name, PPB_PDF_INTERFACE) == 0); |
133 } | 133 } |
134 | 134 |
135 bool MakePepperFlashPluginInfo(const base::FilePath& flash_path, | 135 bool MakePepperFlashPluginInfo(const base::FilePath& flash_path, |
136 const Version& flash_version, | 136 const Version& flash_version, |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) | 387 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) |
388 // Component updated flash supersedes bundled flash therefore if that one | 388 // Component updated flash supersedes bundled flash therefore if that one |
389 // is disabled then this one should never install. | 389 // is disabled then this one should never install. |
390 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 390 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
391 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) | 391 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
392 return; | 392 return; |
393 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 393 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
394 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 394 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
395 #endif | 395 #endif |
396 } | 396 } |
OLD | NEW |