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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebContentDecryptionModuleResult.cpp

Issue 1729063003: media: Reject pending CDM promise during destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 10 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 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 #include "public/platform/WebContentDecryptionModuleResult.h" 5 #include "public/platform/WebContentDecryptionModuleResult.h"
6 6
7 #include "platform/ContentDecryptionModuleResult.h" 7 #include "platform/ContentDecryptionModuleResult.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 bool WebContentDecryptionModuleResult::isCompleted()
12 {
13 return m_impl.get();
14 }
15
11 void WebContentDecryptionModuleResult::complete() 16 void WebContentDecryptionModuleResult::complete()
12 { 17 {
13 m_impl->complete(); 18 m_impl->complete();
14 reset(); 19 reset();
15 } 20 }
16 21
17 void WebContentDecryptionModuleResult::completeWithContentDecryptionModule(WebCo ntentDecryptionModule* cdm) 22 void WebContentDecryptionModuleResult::completeWithContentDecryptionModule(WebCo ntentDecryptionModule* cdm)
18 { 23 {
19 m_impl->completeWithContentDecryptionModule(cdm); 24 m_impl->completeWithContentDecryptionModule(cdm);
20 reset(); 25 reset();
(...skipping 18 matching lines...) Expand all
39 } 44 }
40 45
41 void WebContentDecryptionModuleResult::reset() 46 void WebContentDecryptionModuleResult::reset()
42 { 47 {
43 m_impl.reset(); 48 m_impl.reset();
44 } 49 }
45 50
46 void WebContentDecryptionModuleResult::assign(const WebContentDecryptionModuleRe sult& o) 51 void WebContentDecryptionModuleResult::assign(const WebContentDecryptionModuleRe sult& o)
47 { 52 {
48 m_impl = o.m_impl; 53 m_impl = o.m_impl;
54 ASSERT(m_impl.get());
49 } 55 }
50 56
51 } // namespace blink 57 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698