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

Side by Side Diff: content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc

Issue 222973003: Conversion of content_shell target to use WebLocalFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some TODOs Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #if defined(ENABLE_PEPPER_CDMS) 5 #if defined(ENABLE_PEPPER_CDMS)
6 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" 6 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h"
7 7
8 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 8 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
9 #include "content/renderer/pepper/pepper_webplugin_impl.h" 9 #include "content/renderer/pepper/pepper_webplugin_impl.h"
10 #include "third_party/WebKit/public/platform/WebString.h" 10 #include "third_party/WebKit/public/platform/WebString.h"
11 #include "third_party/WebKit/public/web/WebDocument.h" 11 #include "third_party/WebKit/public/web/WebDocument.h"
12 #include "third_party/WebKit/public/web/WebFrame.h" 12 #include "third_party/WebKit/public/web/WebFrame.h"
13 #include "third_party/WebKit/public/web/WebHelperPlugin.h" 13 #include "third_party/WebKit/public/web/WebHelperPlugin.h"
14 #include "third_party/WebKit/public/web/WebPlugin.h" 14 #include "third_party/WebKit/public/web/WebPlugin.h"
15 #include "third_party/WebKit/public/web/WebView.h" 15 #include "third_party/WebKit/public/web/WebView.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 void WebHelperPluginDeleter::operator()(blink::WebHelperPlugin* plugin) const { 19 void WebHelperPluginDeleter::operator()(blink::WebHelperPlugin* plugin) const {
20 plugin->destroy(); 20 plugin->destroy();
21 } 21 }
22 22
23 scoped_ptr<PepperCdmWrapper> PepperCdmWrapperImpl::Create( 23 scoped_ptr<PepperCdmWrapper> PepperCdmWrapperImpl::Create(
24 blink::WebFrame* frame, 24 blink::WebLocalFrame* frame,
25 const std::string& pluginType) { 25 const std::string& pluginType) {
26 DCHECK(frame); 26 DCHECK(frame);
27 ScopedHelperPlugin helper_plugin(blink::WebHelperPlugin::create( 27 ScopedHelperPlugin helper_plugin(blink::WebHelperPlugin::create(
28 blink::WebString::fromUTF8(pluginType), frame)); 28 blink::WebString::fromUTF8(pluginType), frame));
29 if (!helper_plugin) 29 if (!helper_plugin)
30 return scoped_ptr<PepperCdmWrapper>(); 30 return scoped_ptr<PepperCdmWrapper>();
31 31
32 blink::WebPlugin* plugin = helper_plugin->getPlugin(); 32 blink::WebPlugin* plugin = helper_plugin->getPlugin();
33 DCHECK(!plugin->isPlaceholder()); // Prevented by Blink. 33 DCHECK(!plugin->isPlaceholder()); // Prevented by Blink.
34 34
(...skipping 28 matching lines...) Expand all
63 helper_plugin_.reset(); 63 helper_plugin_.reset();
64 } 64 }
65 65
66 ContentDecryptorDelegate* PepperCdmWrapperImpl::GetCdmDelegate() { 66 ContentDecryptorDelegate* PepperCdmWrapperImpl::GetCdmDelegate() {
67 return plugin_instance_->GetContentDecryptorDelegate(); 67 return plugin_instance_->GetContentDecryptorDelegate();
68 } 68 }
69 69
70 } // namespace content 70 } // namespace content
71 71
72 #endif // defined(ENABLE_PEPPER_CDMS) 72 #endif // defined(ENABLE_PEPPER_CDMS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698