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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.h

Issue 2290233007: Move convertViewportToWindow and convertWindowToViewport from (Closed)
Patch Set: add client to WebSharedWorkerImpl Created 4 years, 2 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 24 matching lines...) Expand all
35 35
36 #include "core/dom/ExecutionContext.h" 36 #include "core/dom/ExecutionContext.h"
37 #include "core/workers/WorkerLoaderProxy.h" 37 #include "core/workers/WorkerLoaderProxy.h"
38 #include "core/workers/WorkerReportingProxy.h" 38 #include "core/workers/WorkerReportingProxy.h"
39 #include "core/workers/WorkerThread.h" 39 #include "core/workers/WorkerThread.h"
40 #include "public/platform/WebAddressSpace.h" 40 #include "public/platform/WebAddressSpace.h"
41 #include "public/web/WebContentSecurityPolicy.h" 41 #include "public/web/WebContentSecurityPolicy.h"
42 #include "public/web/WebDevToolsAgentClient.h" 42 #include "public/web/WebDevToolsAgentClient.h"
43 #include "public/web/WebFrameClient.h" 43 #include "public/web/WebFrameClient.h"
44 #include "public/web/WebSharedWorkerClient.h" 44 #include "public/web/WebSharedWorkerClient.h"
45 #include "public/web/WebWidgetClient.h"
45 #include "wtf/RefPtr.h" 46 #include "wtf/RefPtr.h"
46 #include <memory> 47 #include <memory>
47 48
48 namespace blink { 49 namespace blink {
49 50
50 class ConsoleMessage; 51 class ConsoleMessage;
51 class ParentFrameTaskRunners; 52 class ParentFrameTaskRunners;
52 class WebApplicationCacheHost; 53 class WebApplicationCacheHost;
53 class WebApplicationCacheHostClient; 54 class WebApplicationCacheHostClient;
55 class WebFrameWidget;
54 class WebLocalFrameImpl; 56 class WebLocalFrameImpl;
55 class WebServiceWorkerNetworkProvider; 57 class WebServiceWorkerNetworkProvider;
56 class WebSharedWorkerClient; 58 class WebSharedWorkerClient;
57 class WebString; 59 class WebString;
58 class WebURL; 60 class WebURL;
59 class WebView; 61 class WebView;
60 class WorkerInspectorProxy; 62 class WorkerInspectorProxy;
61 class WorkerScriptLoader; 63 class WorkerScriptLoader;
62 64
63 // This class is used by the worker process code to talk to the SharedWorker 65 // This class is used by the worker process code to talk to the SharedWorker
64 // implementation. 66 // implementation.
65 // It can't use it directly since it uses WebKit types, so this class converts 67 // It can't use it directly since it uses WebKit types, so this class converts
66 // the data types. When the SharedWorker object wants to call 68 // the data types. When the SharedWorker object wants to call
67 // WorkerReportingProxy, this class will convert to Chrome data types first and 69 // WorkerReportingProxy, this class will convert to Chrome data types first and
68 // then call the supplied WebCommonWorkerClient. 70 // then call the supplied WebCommonWorkerClient.
69 class WebSharedWorkerImpl final 71 class WebSharedWorkerImpl final
70 : public WorkerReportingProxy 72 : public WorkerReportingProxy
71 , public WebFrameClient 73 , public WebFrameClient
72 , public WebSharedWorker 74 , public WebSharedWorker
73 , public WebDevToolsAgentClient 75 , public WebDevToolsAgentClient
74 , private WorkerLoaderProxyProvider { 76 , private WorkerLoaderProxyProvider
77 // TODO(falken): Remove once worker doesn't do layout anymore. See https://c rbug/538751.
78 , private WebWidgetClient {
75 public: 79 public:
76 explicit WebSharedWorkerImpl(WebSharedWorkerClient*); 80 explicit WebSharedWorkerImpl(WebSharedWorkerClient*);
77 81
78 // WorkerReportingProxy methods: 82 // WorkerReportingProxy methods:
79 void reportException(const WTF::String&, std::unique_ptr<SourceLocation>, in t exceptionId) override; 83 void reportException(const WTF::String&, std::unique_ptr<SourceLocation>, in t exceptionId) override;
80 void reportConsoleMessage(MessageSource, MessageLevel, const String& message , SourceLocation*) override; 84 void reportConsoleMessage(MessageSource, MessageLevel, const String& message , SourceLocation*) override;
81 void postMessageToPageInspector(const WTF::String&) override; 85 void postMessageToPageInspector(const WTF::String&) override;
82 void didEvaluateWorkerScript(bool success) override { } 86 void didEvaluateWorkerScript(bool success) override { }
83 void didCloseWorkerGlobalScope() override; 87 void didCloseWorkerGlobalScope() override;
84 void willDestroyWorkerGlobalScope() override { } 88 void willDestroyWorkerGlobalScope() override { }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 135
132 void postMessageToPageInspectorOnMainThread(const String& message); 136 void postMessageToPageInspectorOnMainThread(const String& message);
133 137
134 // WorkerLoaderProxyProvider 138 // WorkerLoaderProxyProvider
135 void postTaskToLoader(const WebTraceLocation&, std::unique_ptr<ExecutionCont extTask>) override; 139 void postTaskToLoader(const WebTraceLocation&, std::unique_ptr<ExecutionCont extTask>) override;
136 void postTaskToWorkerGlobalScope(const WebTraceLocation&, std::unique_ptr<Ex ecutionContextTask>) override; 140 void postTaskToWorkerGlobalScope(const WebTraceLocation&, std::unique_ptr<Ex ecutionContextTask>) override;
137 141
138 // 'shadow page' - created to proxy loading requests from the worker. 142 // 'shadow page' - created to proxy loading requests from the worker.
139 Persistent<ExecutionContext> m_loadingDocument; 143 Persistent<ExecutionContext> m_loadingDocument;
140 WebView* m_webView; 144 WebView* m_webView;
145 WebFrameWidget* m_webFrameWidget;
141 Persistent<WebLocalFrameImpl> m_mainFrame; 146 Persistent<WebLocalFrameImpl> m_mainFrame;
142 bool m_askedToTerminate; 147 bool m_askedToTerminate;
143 148
144 // This one is bound to and used only on the main thread. 149 // This one is bound to and used only on the main thread.
145 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; 150 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider;
146 151
147 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; 152 Persistent<WorkerInspectorProxy> m_workerInspectorProxy;
148 153
149 Persistent<ParentFrameTaskRunners> m_mainThreadTaskRunners; 154 Persistent<ParentFrameTaskRunners> m_mainThreadTaskRunners;
150 155
(...skipping 10 matching lines...) Expand all
161 RefPtr<WorkerLoaderProxy> m_loaderProxy; 166 RefPtr<WorkerLoaderProxy> m_loaderProxy;
162 167
163 WebURL m_url; 168 WebURL m_url;
164 WebString m_name; 169 WebString m_name;
165 WebAddressSpace m_creationAddressSpace; 170 WebAddressSpace m_creationAddressSpace;
166 }; 171 };
167 172
168 } // namespace blink 173 } // namespace blink
169 174
170 #endif // WebSharedWorkerImpl_h 175 #endif // WebSharedWorkerImpl_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698