Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Side by Side Diff: content/browser/ppapi_plugin_process_host.cc

Issue 141753006: Enable Windows Flash hw video decode trial. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 switches::kNoSandbox, 300 switches::kNoSandbox,
301 switches::kPpapiStartupDialog, 301 switches::kPpapiStartupDialog,
302 }; 302 };
303 cmd_line->CopySwitchesFrom(browser_command_line, kPluginForwardSwitches, 303 cmd_line->CopySwitchesFrom(browser_command_line, kPluginForwardSwitches,
304 arraysize(kPluginForwardSwitches)); 304 arraysize(kPluginForwardSwitches));
305 305
306 // Copy any flash args over and introduce field trials if necessary. 306 // Copy any flash args over and introduce field trials if necessary.
307 // TODO(vtl): Stop passing flash args in the command line, or windows is 307 // TODO(vtl): Stop passing flash args in the command line, or windows is
308 // going to explode. 308 // going to explode.
309 std::string field_trial = 309 std::string field_trial =
310 base::FieldTrialList::FindFullName(kLowLatencyFlashAudioFieldTrialName); 310 base::FieldTrialList::FindFullName(kFlashHwVideoDecodeFieldTrialName);
311 std::string existing_args = 311 std::string existing_args =
312 browser_command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs); 312 browser_command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs);
313 if (field_trial == kLowLatencyFlashAudioFieldTrialEnabledName) 313 if (field_trial == kFlashHwVideoDecodeFieldTrialEnabledName) {
314 existing_args.append(" enable_low_latency_audio=1"); 314 // Arguments passed to Flash are comma delimited.
315 if (!existing_args.empty())
316 existing_args.append(",");
317 existing_args.append("enable_hw_video_decode=1");
318 }
315 cmd_line->AppendSwitchASCII(switches::kPpapiFlashArgs, existing_args); 319 cmd_line->AppendSwitchASCII(switches::kPpapiFlashArgs, existing_args);
316 } 320 }
317 321
318 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); 322 std::string locale = GetContentClient()->browser()->GetApplicationLocale();
319 if (!locale.empty()) { 323 if (!locale.empty()) {
320 // Pass on the locale so the plugin will know what language we're using. 324 // Pass on the locale so the plugin will know what language we're using.
321 cmd_line->AppendSwitchASCII(switches::kLang, locale); 325 cmd_line->AppendSwitchASCII(switches::kLang, locale);
322 } 326 }
323 327
324 if (!plugin_launcher.empty()) 328 if (!plugin_launcher.empty())
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // sent_requests_ queue should be the one that the plugin just created. 440 // sent_requests_ queue should be the one that the plugin just created.
437 Client* client = sent_requests_.front(); 441 Client* client = sent_requests_.front();
438 sent_requests_.pop(); 442 sent_requests_.pop();
439 443
440 const ChildProcessData& data = process_->GetData(); 444 const ChildProcessData& data = process_->GetData();
441 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 445 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
442 data.id); 446 data.id);
443 } 447 }
444 448
445 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials_desktop.cc ('k') | content/public/common/content_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698