OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 class WebURL; | 58 class WebURL; |
59 class WebView; | 59 class WebView; |
60 class WebWorker; | 60 class WebWorker; |
61 class WebSharedWorkerClient; | 61 class WebSharedWorkerClient; |
62 class WorkerInspectorProxy; | 62 class WorkerInspectorProxy; |
63 | 63 |
64 // This class is used by the worker process code to talk to the SharedWorker imp
lementation. | 64 // This class is used by the worker process code to talk to the SharedWorker imp
lementation. |
65 // It can't use it directly since it uses WebKit types, so this class converts t
he data types. | 65 // It can't use it directly since it uses WebKit types, so this class converts t
he data types. |
66 // When the SharedWorker object wants to call WorkerReportingProxy, this class w
ill | 66 // When the SharedWorker object wants to call WorkerReportingProxy, this class w
ill |
67 // convert to Chrome data types first and then call the supplied WebCommonWorker
Client. | 67 // convert to Chrome data types first and then call the supplied WebCommonWorker
Client. |
68 class WebSharedWorkerImpl FINAL | 68 class WebSharedWorkerImpl final |
69 : public WorkerReportingProxy | 69 : public WorkerReportingProxy |
70 , public WorkerLoaderProxy | 70 , public WorkerLoaderProxy |
71 , public WebFrameClient | 71 , public WebFrameClient |
72 , public WebSharedWorker | 72 , public WebSharedWorker |
73 , public WebDevToolsAgentClient { | 73 , public WebDevToolsAgentClient { |
74 public: | 74 public: |
75 explicit WebSharedWorkerImpl(WebSharedWorkerClient*); | 75 explicit WebSharedWorkerImpl(WebSharedWorkerClient*); |
76 | 76 |
77 // WorkerReportingProxy methods: | 77 // WorkerReportingProxy methods: |
78 virtual void reportException( | 78 virtual void reportException( |
79 const WTF::String&, int, int, const WTF::String&) OVERRIDE; | 79 const WTF::String&, int, int, const WTF::String&) override; |
80 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OV
ERRIDE; | 80 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov
erride; |
81 virtual void postMessageToPageInspector(const WTF::String&) OVERRIDE; | 81 virtual void postMessageToPageInspector(const WTF::String&) override; |
82 virtual void updateInspectorStateCookie(const WTF::String&) OVERRIDE; | 82 virtual void updateInspectorStateCookie(const WTF::String&) override; |
83 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) OVERRIDE; | 83 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override; |
84 virtual void workerGlobalScopeClosed() OVERRIDE; | 84 virtual void workerGlobalScopeClosed() override; |
85 virtual void workerThreadTerminated() OVERRIDE; | 85 virtual void workerThreadTerminated() override; |
86 virtual void willDestroyWorkerGlobalScope() OVERRIDE { } | 86 virtual void willDestroyWorkerGlobalScope() override { } |
87 | 87 |
88 // WorkerLoaderProxy methods: | 88 // WorkerLoaderProxy methods: |
89 virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) OVERRIDE; | 89 virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) override; |
90 virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) O
VERRIDE; | 90 virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) o
verride; |
91 | 91 |
92 // WebFrameClient methods to support resource loading thru the 'shadow page'
. | 92 // WebFrameClient methods to support resource loading thru the 'shadow page'
. |
93 virtual WebApplicationCacheHost* createApplicationCacheHost(WebLocalFrame*,
WebApplicationCacheHostClient*) OVERRIDE; | 93 virtual WebApplicationCacheHost* createApplicationCacheHost(WebLocalFrame*,
WebApplicationCacheHostClient*) override; |
94 virtual void didFinishDocumentLoad(WebLocalFrame*) OVERRIDE; | 94 virtual void didFinishDocumentLoad(WebLocalFrame*) override; |
95 | 95 |
96 // WebDevToolsAgentClient overrides. | 96 // WebDevToolsAgentClient overrides. |
97 virtual void sendMessageToInspectorFrontend(const WebString&) OVERRIDE; | 97 virtual void sendMessageToInspectorFrontend(const WebString&) override; |
98 virtual void saveAgentRuntimeState(const WebString&) OVERRIDE; | 98 virtual void saveAgentRuntimeState(const WebString&) override; |
99 virtual void resumeStartup() OVERRIDE; | 99 virtual void resumeStartup() override; |
100 | 100 |
101 // WebSharedWorker methods: | 101 // WebSharedWorker methods: |
102 virtual void startWorkerContext(const WebURL&, const WebString& name, const
WebString& contentSecurityPolicy, WebContentSecurityPolicyType) OVERRIDE; | 102 virtual void startWorkerContext(const WebURL&, const WebString& name, const
WebString& contentSecurityPolicy, WebContentSecurityPolicyType) override; |
103 virtual void connect(WebMessagePortChannel*) OVERRIDE; | 103 virtual void connect(WebMessagePortChannel*) override; |
104 virtual void terminateWorkerContext() OVERRIDE; | 104 virtual void terminateWorkerContext() override; |
105 virtual void clientDestroyed() OVERRIDE; | 105 virtual void clientDestroyed() override; |
106 | 106 |
107 virtual void pauseWorkerContextOnStart() OVERRIDE; | 107 virtual void pauseWorkerContextOnStart() override; |
108 virtual void resumeWorkerContext() OVERRIDE; | 108 virtual void resumeWorkerContext() override; |
109 virtual void attachDevTools(const WebString& hostId) OVERRIDE; | 109 virtual void attachDevTools(const WebString& hostId) override; |
110 virtual void reattachDevTools(const WebString& hostId, const WebString& save
dState) OVERRIDE; | 110 virtual void reattachDevTools(const WebString& hostId, const WebString& save
dState) override; |
111 virtual void detachDevTools() OVERRIDE; | 111 virtual void detachDevTools() override; |
112 virtual void dispatchDevToolsMessage(const WebString&) OVERRIDE; | 112 virtual void dispatchDevToolsMessage(const WebString&) override; |
113 | 113 |
114 private: | 114 private: |
115 class Loader; | 115 class Loader; |
116 | 116 |
117 virtual ~WebSharedWorkerImpl(); | 117 virtual ~WebSharedWorkerImpl(); |
118 | 118 |
119 WebSharedWorkerClient* client() { return m_client->get(); } | 119 WebSharedWorkerClient* client() { return m_client->get(); } |
120 | 120 |
121 void setWorkerThread(PassRefPtr<WorkerThread> thread) { m_workerThread = thr
ead; } | 121 void setWorkerThread(PassRefPtr<WorkerThread> thread) { m_workerThread = thr
ead; } |
122 WorkerThread* workerThread() { return m_workerThread.get(); } | 122 WorkerThread* workerThread() { return m_workerThread.get(); } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 OwnPtr<Loader> m_mainScriptLoader; | 163 OwnPtr<Loader> m_mainScriptLoader; |
164 WebURL m_url; | 164 WebURL m_url; |
165 WebString m_name; | 165 WebString m_name; |
166 WebString m_contentSecurityPolicy; | 166 WebString m_contentSecurityPolicy; |
167 WebContentSecurityPolicyType m_policyType; | 167 WebContentSecurityPolicyType m_policyType; |
168 }; | 168 }; |
169 | 169 |
170 } // namespace blink | 170 } // namespace blink |
171 | 171 |
172 #endif | 172 #endif |
OLD | NEW |