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 12 matching lines...) Expand all Loading... |
23 #include "ppapi/features/features.h" | 23 #include "ppapi/features/features.h" |
24 #include "services/service_manager/public/cpp/binder_registry.h" | 24 #include "services/service_manager/public/cpp/binder_registry.h" |
25 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 25 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
26 #include "third_party/WebKit/public/web/WebView.h" | 26 #include "third_party/WebKit/public/web/WebView.h" |
27 #include "v8/include/v8.h" | 27 #include "v8/include/v8.h" |
28 | 28 |
29 #if BUILDFLAG(ENABLE_PLUGINS) | 29 #if BUILDFLAG(ENABLE_PLUGINS) |
30 #include "ppapi/shared_impl/ppapi_switches.h" // nogncheck | 30 #include "ppapi/shared_impl/ppapi_switches.h" // nogncheck |
31 #endif | 31 #endif |
32 | 32 |
33 #if defined(ENABLE_MOJO_CDM) | 33 #if BUILDFLAG(ENABLE_MOJO_CDM) |
34 #include "base/feature_list.h" | 34 #include "base/feature_list.h" |
35 #include "media/base/media_switches.h" | 35 #include "media/base/media_switches.h" |
36 #endif | 36 #endif |
37 | 37 |
38 namespace content { | 38 namespace content { |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 // A test service which can be driven by browser tests for various reasons. | 42 // A test service which can be driven by browser tests for various reasons. |
43 class TestServiceImpl : public mojom::TestService { | 43 class TestServiceImpl : public mojom::TestService { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 138 } |
139 | 139 |
140 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( | 140 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
141 v8::Local<v8::Context> context) { | 141 v8::Local<v8::Context> context) { |
142 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 142 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
143 switches::kExposeInternalsForTesting)) { | 143 switches::kExposeInternalsForTesting)) { |
144 blink::WebTestingSupport::InjectInternalsObject(context); | 144 blink::WebTestingSupport::InjectInternalsObject(context); |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
148 #if defined(ENABLE_MOJO_CDM) | 148 #if BUILDFLAG(ENABLE_MOJO_CDM) |
149 void ShellContentRendererClient::AddSupportedKeySystems( | 149 void ShellContentRendererClient::AddSupportedKeySystems( |
150 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) { | 150 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) { |
151 if (!base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting)) | 151 if (!base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting)) |
152 return; | 152 return; |
153 | 153 |
154 static const char kExternalClearKeyKeySystem[] = | 154 static const char kExternalClearKeyKeySystem[] = |
155 "org.chromium.externalclearkey"; | 155 "org.chromium.externalclearkey"; |
156 key_systems->emplace_back( | 156 key_systems->emplace_back( |
157 new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem)); | 157 new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem)); |
158 } | 158 } |
159 #endif | 159 #endif |
160 | 160 |
161 } // namespace content | 161 } // namespace content |
OLD | NEW |