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

Unified Diff: media/mojo/services/mojo_cdm.h

Issue 844643005: Fix few compilation errors on Windows in media/ during Windows GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: media/mojo/services/mojo_cdm.h
diff --git a/media/mojo/services/mojo_cdm.h b/media/mojo/services/mojo_cdm.h
index 40837282210252be77281045e99d2c9ed53f57c8..64a71da7d562160e7b773ff08f2f78d76a3a814d 100644
--- a/media/mojo/services/mojo_cdm.h
+++ b/media/mojo/services/mojo_cdm.h
@@ -74,10 +74,18 @@ class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient {
int64_t new_expiry_time_usec) final;
// Callbacks to handle CDM promises.
+ // We have to inline this method, since MS VS 2013 compiler fails to compile
+ // it when this method is not inlined. It fails with error C2244
+ // "unable to match function definition to an existing declaration".
template <typename... T>
void OnPromiseResult(scoped_ptr<CdmPromiseTemplate<T...>> promise,
mojo::CdmPromiseResultPtr result,
- typename MojoTypeTrait<T>::MojoType... args);
+ typename MojoTypeTrait<T>::MojoType... args) {
+ if (result->success)
+ promise->resolve(args.template To<T>()...); // See ISO C++03 14.2/4.
+ else
+ RejectPromise(promise.Pass(), result.Pass());
+ }
mojo::ContentDecryptionModulePtr remote_cdm_;
« media/audio/BUILD.gn ('K') | « media/cast/BUILD.gn ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698