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/shell/renderer/shell_content_renderer_client.h" | 5 #include "content/shell/renderer/shell_content_renderer_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( | 129 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
130 v8::Local<v8::Context> context) { | 130 v8::Local<v8::Context> context) { |
131 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 131 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
132 switches::kExposeInternalsForTesting)) { | 132 switches::kExposeInternalsForTesting)) { |
133 blink::WebTestingSupport::injectInternalsObject(context); | 133 blink::WebTestingSupport::injectInternalsObject(context); |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 void ShellContentRendererClient::ExposeInterfacesToBrowser( | 137 void ShellContentRendererClient::ExposeInterfacesToBrowser( |
138 shell::InterfaceRegistry* interface_registry) { | 138 service_manager::InterfaceRegistry* interface_registry) { |
139 interface_registry->AddInterface<mojom::TestService>( | 139 interface_registry->AddInterface<mojom::TestService>( |
140 base::Bind(&CreateTestService)); | 140 base::Bind(&CreateTestService)); |
141 } | 141 } |
142 | 142 |
143 #if defined(OS_ANDROID) | 143 #if defined(OS_ANDROID) |
144 void ShellContentRendererClient::AddSupportedKeySystems( | 144 void ShellContentRendererClient::AddSupportedKeySystems( |
145 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) { | 145 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) { |
146 if (!base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting)) | 146 if (!base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting)) |
147 return; | 147 return; |
148 | 148 |
149 static const char kExternalClearKeyKeySystem[] = | 149 static const char kExternalClearKeyKeySystem[] = |
150 "org.chromium.externalclearkey"; | 150 "org.chromium.externalclearkey"; |
151 key_systems->emplace_back( | 151 key_systems->emplace_back( |
152 new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem)); | 152 new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem)); |
153 } | 153 } |
154 #endif | 154 #endif |
155 | 155 |
156 } // namespace content | 156 } // namespace content |
OLD | NEW |