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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorker.h

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 #include "wtf/PassOwnPtr.h" 40 #include "wtf/PassOwnPtr.h"
41 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
42 #include "wtf/RefCounted.h" 42 #include "wtf/RefCounted.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class ScriptState; 46 class ScriptState;
47 class ScriptPromiseResolver; 47 class ScriptPromiseResolver;
48 48
49 class ServiceWorker FINAL : public AbstractWorker, public WebServiceWorkerProxy { 49 class ServiceWorker FINAL : public AbstractWorker, public WebServiceWorkerProxy {
50 DEFINE_WRAPPERTYPEINFO();
50 public: 51 public:
51 // For CallbackPromiseAdapter 52 // For CallbackPromiseAdapter
52 typedef WebServiceWorker WebType; 53 typedef WebServiceWorker WebType;
53 static PassRefPtrWillBeRawPtr<ServiceWorker> take(ScriptPromiseResolver*, We bType* worker); 54 static PassRefPtrWillBeRawPtr<ServiceWorker> take(ScriptPromiseResolver*, We bType* worker);
54 55
55 static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType *); 56 static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType *);
56 static void dispose(WebType*); 57 static void dispose(WebType*);
57 58
58 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&); 59 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&);
59 void terminate(ExceptionState&); 60 void terminate(ExceptionState&);
(...skipping 29 matching lines...) Expand all
89 virtual bool hasPendingActivity() const OVERRIDE; 90 virtual bool hasPendingActivity() const OVERRIDE;
90 virtual void stop() OVERRIDE; 91 virtual void stop() OVERRIDE;
91 92
92 OwnPtr<WebServiceWorker> m_outerWorker; 93 OwnPtr<WebServiceWorker> m_outerWorker;
93 ProxyState m_proxyState; 94 ProxyState m_proxyState;
94 }; 95 };
95 96
96 } // namespace blink 97 } // namespace blink
97 98
98 #endif // ServiceWorker_h 99 #endif // ServiceWorker_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Response.h ('k') | Source/modules/serviceworkers/ServiceWorkerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698