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 "content/browser/ppapi_plugin_process_host.h" | 5 #include "content/browser/ppapi_plugin_process_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // going to explode. | 334 // going to explode. |
335 std::string field_trial = | 335 std::string field_trial = |
336 base::FieldTrialList::FindFullName(kFlashHwVideoDecodeFieldTrialName); | 336 base::FieldTrialList::FindFullName(kFlashHwVideoDecodeFieldTrialName); |
337 std::string existing_args = | 337 std::string existing_args = |
338 browser_command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs); | 338 browser_command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs); |
339 if (field_trial == kFlashHwVideoDecodeFieldTrialEnabledName) { | 339 if (field_trial == kFlashHwVideoDecodeFieldTrialEnabledName) { |
340 // Arguments passed to Flash are comma delimited. | 340 // Arguments passed to Flash are comma delimited. |
341 if (!existing_args.empty()) | 341 if (!existing_args.empty()) |
342 existing_args.append(","); | 342 existing_args.append(","); |
343 existing_args.append("enable_hw_video_decode=1"); | 343 existing_args.append("enable_hw_video_decode=1"); |
| 344 #if defined(OS_MACOSX) |
| 345 // TODO(ihf): Remove this once Flash newer than 15.0.0.223 is released. |
| 346 existing_args.append(",enable_hw_video_decode_mac=1"); |
| 347 #endif |
344 } | 348 } |
345 cmd_line->AppendSwitchASCII(switches::kPpapiFlashArgs, existing_args); | 349 cmd_line->AppendSwitchASCII(switches::kPpapiFlashArgs, existing_args); |
346 } | 350 } |
347 | 351 |
348 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); | 352 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); |
349 if (!locale.empty()) { | 353 if (!locale.empty()) { |
350 // Pass on the locale so the plugin will know what language we're using. | 354 // Pass on the locale so the plugin will know what language we're using. |
351 cmd_line->AppendSwitchASCII(switches::kLang, locale); | 355 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
352 } | 356 } |
353 | 357 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 // sent_requests_ queue should be the one that the plugin just created. | 466 // sent_requests_ queue should be the one that the plugin just created. |
463 Client* client = sent_requests_.front(); | 467 Client* client = sent_requests_.front(); |
464 sent_requests_.pop(); | 468 sent_requests_.pop(); |
465 | 469 |
466 const ChildProcessData& data = process_->GetData(); | 470 const ChildProcessData& data = process_->GetData(); |
467 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 471 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
468 data.id); | 472 data.id); |
469 } | 473 } |
470 | 474 |
471 } // namespace content | 475 } // namespace content |
OLD | NEW |