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

Side by Side Diff: Source/modules/push_messaging/PushManager.cpp

Issue 213013006: Define push_messaging module with PushManager skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "modules/push_messaging/PushManager.h"
7
8 #include "RuntimeEnabledFeatures.h"
9 #include "bindings/v8/ScriptPromise.h"
10 #include "bindings/v8/ScriptPromiseResolver.h"
11 #include "core/dom/Document.h"
12 #include "core/dom/ExecutionContext.h"
13
14 namespace WebCore {
15
16 PushManager::PushManager()
17 {
18 ScriptWrappable::init(this);
19 }
20
21 PushManager::~PushManager()
22 {
23 }
24
25 ScriptPromise PushManager::registerPushMessaging(ExecutionContext* context, cons t String& senderId)
26 {
27 ASSERT(RuntimeEnabledFeatures::pushMessagingEnabled());
abarth-chromium 2014/03/27 03:38:57 We usually skip these and trust the IDL
Michael van Ouwerkerk 2014/03/27 19:15:24 Done.
28 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(conte xt);
29 ScriptPromise promise = resolver->promise();
30 return promise;
Peter Beverloo 2014/03/26 21:35:35 It looks a bit odd that we create a ScriptPromiseR
abarth-chromium 2014/03/27 03:38:57 Maybe we should reject the promise for now?
Michael van Ouwerkerk 2014/03/27 19:15:24 Done.
Michael van Ouwerkerk 2014/03/27 19:15:24 Done.
31 }
32
33 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698