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

Side by Side Diff: third_party/WebKit/Source/modules/mediasession/MediaSessionError.cpp

Issue 1370453002: Introduce WebMediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expect no platform implementation on !ANDROID Created 5 years, 2 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "modules/mediasession/MediaSessionError.h"
7
8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9
10 namespace blink {
11
12 // static
13 v8::Local<v8::Value> MediaSessionError::take(ScriptPromiseResolver* resolver, co nst WebMediaSessionError& webError)
14 {
15 v8::Isolate* isolate = resolver->scriptState()->isolate();
16
17 if (webError.errorType == WebMediaSessionError::ErrorTypeActivate)
18 return v8::Exception::TypeError(v8String(isolate, "The media session act ivation failed."));
mlamouri (slow - plz ping) 2015/09/28 15:16:03 TypeError... Let's see how the discussion on the s
davve 2015/10/06 12:05:13 Yes. I'll leave it be for now.
19
20 ASSERT_NOT_REACHED();
21 return v8::Exception::Error(v8String(isolate, "An unknown error occurred.")) ;
22 }
23
24 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698