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

Side by Side Diff: content/shell/renderer/shell_content_renderer_client.cc

Issue 2712983004: Simplify/Cleanup MediaClient (Closed)
Patch Set: Created 3 years, 9 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/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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/cdm/renderer/external_clear_key_key_system_properties.h" 13 #include "components/cdm/renderer/external_clear_key_key_system_properties.h"
14 #include "components/web_cache/renderer/web_cache_impl.h" 14 #include "components/web_cache/renderer/web_cache_impl.h"
15 #include "content/public/renderer/content_media_client.h"
15 #include "content/public/test/test_service.mojom.h" 16 #include "content/public/test/test_service.mojom.h"
16 #include "content/shell/common/shell_switches.h" 17 #include "content/shell/common/shell_switches.h"
17 #include "content/shell/renderer/shell_render_view_observer.h" 18 #include "content/shell/renderer/shell_render_view_observer.h"
18 #include "mojo/public/cpp/bindings/binding.h" 19 #include "mojo/public/cpp/bindings/binding.h"
19 #include "mojo/public/cpp/system/message_pipe.h" 20 #include "mojo/public/cpp/system/message_pipe.h"
20 #include "ppapi/features/features.h" 21 #include "ppapi/features/features.h"
21 #include "services/service_manager/public/cpp/interface_registry.h" 22 #include "services/service_manager/public/cpp/interface_registry.h"
22 #include "third_party/WebKit/public/web/WebTestingSupport.h" 23 #include "third_party/WebKit/public/web/WebTestingSupport.h"
23 #include "third_party/WebKit/public/web/WebView.h" 24 #include "third_party/WebKit/public/web/WebView.h"
24 #include "v8/include/v8.h" 25 #include "v8/include/v8.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 } // namespace 97 } // namespace
97 98
98 ShellContentRendererClient::ShellContentRendererClient() {} 99 ShellContentRendererClient::ShellContentRendererClient() {}
99 100
100 ShellContentRendererClient::~ShellContentRendererClient() { 101 ShellContentRendererClient::~ShellContentRendererClient() {
101 } 102 }
102 103
103 void ShellContentRendererClient::RenderThreadStarted() { 104 void ShellContentRendererClient::RenderThreadStarted() {
104 web_cache_impl_.reset(new web_cache::WebCacheImpl()); 105 web_cache_impl_.reset(new web_cache::WebCacheImpl());
106 ::media::SetMediaClient(new ::content::ContentMediaClient(this));
105 } 107 }
106 108
107 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) { 109 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) {
108 new ShellRenderViewObserver(render_view); 110 new ShellRenderViewObserver(render_view);
109 } 111 }
110 112
111 bool ShellContentRendererClient::IsPluginAllowedToUseCompositorAPI( 113 bool ShellContentRendererClient::IsPluginAllowedToUseCompositorAPI(
112 const GURL& url) { 114 const GURL& url) {
113 #if BUILDFLAG(ENABLE_PLUGINS) 115 #if BUILDFLAG(ENABLE_PLUGINS)
114 return base::CommandLine::ForCurrentProcess()->HasSwitch( 116 return base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return; 150 return;
149 151
150 static const char kExternalClearKeyKeySystem[] = 152 static const char kExternalClearKeyKeySystem[] =
151 "org.chromium.externalclearkey"; 153 "org.chromium.externalclearkey";
152 key_systems->emplace_back( 154 key_systems->emplace_back(
153 new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem)); 155 new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem));
154 } 156 }
155 #endif 157 #endif
156 158
157 } // namespace content 159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698