OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/cpu.h" | 8 #include "base/cpu.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // or 11.2.123.45. | 306 // or 11.2.123.45. |
307 std::string flash_version = | 307 std::string flash_version = |
308 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 308 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
309 switches::kPpapiFlashVersion); | 309 switches::kPpapiFlashVersion); |
310 | 310 |
311 plugins->push_back( | 311 plugins->push_back( |
312 CreatePepperFlashInfo(FilePath(flash_path), flash_version)); | 312 CreatePepperFlashInfo(FilePath(flash_path), flash_version)); |
313 } | 313 } |
314 | 314 |
315 bool GetBundledPepperFlash(content::PepperPluginInfo* plugin) { | 315 bool GetBundledPepperFlash(content::PepperPluginInfo* plugin) { |
| 316 #if defined(FLAPPER_AVAILABLE) |
316 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 317 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
317 if (!command_line->HasSwitch(switches::kDisablePepperThreading) && | |
318 !command_line->HasSwitch(switches::kEnablePepperThreading)) { | |
319 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | |
320 if (channel == chrome::VersionInfo::CHANNEL_CANARY) | |
321 command_line->AppendSwitch(switches::kEnablePepperThreading); | |
322 } | |
323 | 318 |
324 #if defined(FLAPPER_AVAILABLE) | |
325 // Ignore bundled Pepper Flash if there is Pepper Flash specified from the | 319 // Ignore bundled Pepper Flash if there is Pepper Flash specified from the |
326 // command-line. | 320 // command-line. |
327 if (command_line->HasSwitch(switches::kPpapiFlashPath)) | 321 if (command_line->HasSwitch(switches::kPpapiFlashPath)) |
328 return false; | 322 return false; |
329 | 323 |
330 bool force_disable = | 324 bool force_disable = |
331 command_line->HasSwitch(switches::kDisableBundledPpapiFlash); | 325 command_line->HasSwitch(switches::kDisableBundledPpapiFlash); |
332 if (force_disable) | 326 if (force_disable) |
333 return false; | 327 return false; |
334 | 328 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 } | 449 } |
456 return false; | 450 return false; |
457 } | 451 } |
458 | 452 |
459 std::string ChromeContentClient::GetCarbonInterposePath() const { | 453 std::string ChromeContentClient::GetCarbonInterposePath() const { |
460 return std::string(kInterposeLibraryPath); | 454 return std::string(kInterposeLibraryPath); |
461 } | 455 } |
462 #endif | 456 #endif |
463 | 457 |
464 } // namespace chrome | 458 } // namespace chrome |
OLD | NEW |