OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/gpu/chrome_content_gpu_client.h" | 5 #include "chrome/gpu/chrome_content_gpu_client.h" |
6 | 6 |
| 7 #include "base/command_line.h" |
7 #include "content/public/common/service_registry.h" | 8 #include "content/public/common/service_registry.h" |
8 | 9 |
9 #if defined(OS_CHROMEOS) | 10 #if defined(OS_CHROMEOS) |
10 #include "chrome/gpu/gpu_arc_video_service.h" | 11 #include "chrome/gpu/gpu_arc_video_service.h" |
11 #endif | 12 #endif |
12 | 13 |
13 #if defined(OS_CHROMEOS) | 14 #if defined(OS_CHROMEOS) |
14 namespace { | 15 namespace { |
15 | 16 |
16 void CreateGpuArcVideoService( | 17 void CreateGpuArcVideoService( |
(...skipping 12 matching lines...) Expand all Loading... |
29 ChromeContentGpuClient::ChromeContentGpuClient() {} | 30 ChromeContentGpuClient::ChromeContentGpuClient() {} |
30 | 31 |
31 ChromeContentGpuClient::~ChromeContentGpuClient() {} | 32 ChromeContentGpuClient::~ChromeContentGpuClient() {} |
32 | 33 |
33 void ChromeContentGpuClient::RegisterMojoServices( | 34 void ChromeContentGpuClient::RegisterMojoServices( |
34 content::ServiceRegistry* registry) { | 35 content::ServiceRegistry* registry) { |
35 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
36 registry->AddService(base::Bind(&CreateGpuArcVideoService)); | 37 registry->AddService(base::Bind(&CreateGpuArcVideoService)); |
37 #endif | 38 #endif |
38 } | 39 } |
| 40 |
| 41 void ChromeContentGpuClient::Initialize( |
| 42 base::FieldTrialList::Observer* observer) { |
| 43 DCHECK(!field_trial_syncer_); |
| 44 field_trial_syncer_.reset( |
| 45 new chrome_variations::ChildProcessFieldTrialSyncer(observer)); |
| 46 const base::CommandLine& command_line = |
| 47 *base::CommandLine::ForCurrentProcess(); |
| 48 field_trial_syncer_->InitFieldTrialObserving(command_line); |
| 49 } |
OLD | NEW |