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

Side by Side Diff: Source/core/workers/SharedWorker.h

Issue 111743007: Add the SharedWorker.workerStart property for high resolution timers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code style compliance Created 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef SharedWorker_h 32 #ifndef SharedWorker_h
33 #define SharedWorker_h 33 #define SharedWorker_h
34 34
35 #include "core/workers/AbstractWorker.h" 35 #include "core/workers/AbstractWorker.h"
36 #include "platform/Supplementable.h"
36 37
37 namespace WebCore { 38 namespace WebCore {
38 39
39 class ExceptionState; 40 class ExceptionState;
40 41
41 class SharedWorker : public AbstractWorker, public ScriptWrappable { 42 class SharedWorker : public AbstractWorker, public ScriptWrappable, public Suppl ementable<SharedWorker> {
42 public: 43 public:
43 static PassRefPtr<SharedWorker> create(ExecutionContext*, const String& url, const String& name, ExceptionState&); 44 static PassRefPtr<SharedWorker> create(ExecutionContext*, const String& url, const String& name, ExceptionState&);
44 virtual ~SharedWorker(); 45 virtual ~SharedWorker();
45 46
46 MessagePort* port() const { return m_port.get(); } 47 MessagePort* port() const { return m_port.get(); }
47 48
48 virtual const AtomicString& interfaceName() const OVERRIDE; 49 virtual const AtomicString& interfaceName() const OVERRIDE;
49 50
50 // Prevents this SharedWorker + JS wrapper from being garbage collected. 51 // Prevents this SharedWorker + JS wrapper from being garbage collected.
51 void setPreventGC(); 52 void setPreventGC();
52 // Allows this SharedWorker + JS wrapper to be garbage collected. 53 // Allows this SharedWorker + JS wrapper to be garbage collected.
53 void unsetPreventGC(); 54 void unsetPreventGC();
54 55
55 private: 56 private:
56 explicit SharedWorker(ExecutionContext*); 57 explicit SharedWorker(ExecutionContext*);
57 58
58 RefPtr<MessagePort> m_port; 59 RefPtr<MessagePort> m_port;
59 }; 60 };
60 61
61 } // namespace WebCore 62 } // namespace WebCore
62 63
63 #endif // SharedWorker_h 64 #endif // SharedWorker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698