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

Side by Side Diff: public/web/WebSharedWorker.h

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
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
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebSharedWorker_h 31 #ifndef WebSharedWorker_h
32 #define WebSharedWorker_h 32 #define WebSharedWorker_h
33 33
34 #include "../platform/WebCommon.h" 34 #include "../platform/WebCommon.h"
35 #include "WebContentSecurityPolicy.h" 35 #include "WebContentSecurityPolicy.h"
36 #include "WebWorkerSettings.h"
36 37
37 namespace WebCore { 38 namespace WebCore {
38 class ScriptExecutionContext; 39 class ScriptExecutionContext;
39 } 40 }
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class WebString; 44 class WebString;
44 class WebMessagePortChannel; 45 class WebMessagePortChannel;
45 class WebSharedWorkerClient; 46 class WebSharedWorkerClient;
46 class WebURL; 47 class WebURL;
47 48
48 // This is the interface to a SharedWorker thread. 49 // This is the interface to a SharedWorker thread.
49 class WebSharedWorker { 50 class WebSharedWorker {
50 public: 51 public:
51 // Invoked from the worker thread to instantiate a WebSharedWorker that inte racts with the WebKit worker components. 52 // Invoked from the worker thread to instantiate a WebSharedWorker that inte racts with the WebKit worker components.
52 BLINK_EXPORT static WebSharedWorker* create(WebSharedWorkerClient*); 53 BLINK_EXPORT static WebSharedWorker* create(WebSharedWorkerClient*);
53 54
54 virtual void startWorkerContext( 55 virtual void startWorkerContext(
55 const WebURL& scriptURL, 56 const WebURL& scriptURL,
56 const WebString& name, 57 const WebString& name,
57 const WebString& contentSecurityPolicy, 58 const WebString& contentSecurityPolicy,
58 WebContentSecurityPolicyType) = 0; 59 WebContentSecurityPolicyType,
60 const WebWorkerSettings& = WebWorkerSettings::create()) = 0;
abarth-chromium 2014/03/10 21:32:36 This function is growing many arguments. Maybe we
59 61
60 // Sends a connect event to the SharedWorker context. 62 // Sends a connect event to the SharedWorker context.
61 virtual void connect(WebMessagePortChannel*) = 0; 63 virtual void connect(WebMessagePortChannel*) = 0;
62 64
63 // Invoked to shutdown the worker when there are no more associated document s. 65 // Invoked to shutdown the worker when there are no more associated document s.
64 virtual void terminateWorkerContext() = 0; 66 virtual void terminateWorkerContext() = 0;
65 67
66 // Notification when the WebCommonWorkerClient is destroyed. 68 // Notification when the WebCommonWorkerClient is destroyed.
67 virtual void clientDestroyed() = 0; 69 virtual void clientDestroyed() = 0;
68 70
69 virtual void pauseWorkerContextOnStart() = 0; 71 virtual void pauseWorkerContextOnStart() = 0;
70 virtual void resumeWorkerContext() = 0; 72 virtual void resumeWorkerContext() = 0;
71 virtual void attachDevTools() = 0; 73 virtual void attachDevTools() = 0;
72 virtual void reattachDevTools(const WebString& savedState) = 0; 74 virtual void reattachDevTools(const WebString& savedState) = 0;
73 virtual void detachDevTools() = 0; 75 virtual void detachDevTools() = 0;
74 virtual void dispatchDevToolsMessage(const WebString&) = 0; 76 virtual void dispatchDevToolsMessage(const WebString&) = 0;
75 }; 77 };
76 78
77 } // namespace blink 79 } // namespace blink
78 80
79 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698