OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ | 5 #ifndef CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ |
6 #define CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ | 6 #define CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "ipc/ipc_channel.h" | 10 #include "ipc/ipc_channel.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // implementation (after the data types have been converted by glue code). It | 25 // implementation (after the data types have been converted by glue code). It |
26 // is also called by the worker code and converts these function calls into | 26 // is also called by the worker code and converts these function calls into |
27 // IPCs that are sent to the renderer, where they're converted back to function | 27 // IPCs that are sent to the renderer, where they're converted back to function |
28 // calls by WebWorkerProxy. | 28 // calls by WebWorkerProxy. |
29 class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient { | 29 class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient { |
30 public: | 30 public: |
31 WebSharedWorkerClientProxy(int route_id, WebSharedWorkerStub* stub); | 31 WebSharedWorkerClientProxy(int route_id, WebSharedWorkerStub* stub); |
32 virtual ~WebSharedWorkerClientProxy(); | 32 virtual ~WebSharedWorkerClientProxy(); |
33 | 33 |
34 // WebSharedWorkerClient implementation. | 34 // WebSharedWorkerClient implementation. |
35 virtual void postMessageToWorkerObject( | |
36 const WebKit::WebString& message, | |
37 const WebKit::WebMessagePortChannelArray& channel); | |
38 virtual void postExceptionToWorkerObject( | |
39 const WebKit::WebString& error_message, | |
40 int line_number, | |
41 const WebKit::WebString& source_url); | |
42 // TODO(caseq): The overload before is obsolete and is preserved for | |
43 // WebKit/chromium compatibility only (pure virtual is base class). | |
44 // Should be removed once WebKit part is updated. | |
45 virtual void postConsoleMessageToWorkerObject( | |
46 int destination, | |
47 int source, | |
48 int type, | |
49 int level, | |
50 const WebKit::WebString& message, | |
51 int line_number, | |
52 const WebKit::WebString& source_url) { | |
53 } | |
54 virtual void postConsoleMessageToWorkerObject( | |
55 int source, | |
56 int type, | |
57 int level, | |
58 const WebKit::WebString& message, | |
59 int line_number, | |
60 const WebKit::WebString& source_url); | |
61 virtual void confirmMessageFromWorkerObject(bool has_pending_activity); | |
62 virtual void reportPendingActivity(bool has_pending_activity); | |
63 virtual void workerContextClosed(); | 35 virtual void workerContextClosed(); |
64 virtual void workerContextDestroyed(); | 36 virtual void workerContextDestroyed(); |
65 | 37 |
66 virtual WebKit::WebNotificationPresenter* notificationPresenter(); | 38 virtual WebKit::WebNotificationPresenter* notificationPresenter(); |
67 | 39 |
68 virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( | 40 virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( |
69 WebKit::WebApplicationCacheHostClient* client); | 41 WebKit::WebApplicationCacheHostClient* client); |
70 | 42 |
71 virtual bool allowDatabase(WebKit::WebFrame* frame, | 43 virtual bool allowDatabase(WebKit::WebFrame* frame, |
72 const WebKit::WebString& name, | 44 const WebKit::WebString& name, |
(...skipping 18 matching lines...) Expand all Loading... |
91 WebSharedWorkerStub* stub_; | 63 WebSharedWorkerStub* stub_; |
92 base::WeakPtrFactory<WebSharedWorkerClientProxy> weak_factory_; | 64 base::WeakPtrFactory<WebSharedWorkerClientProxy> weak_factory_; |
93 SharedWorkerDevToolsAgent* devtools_agent_; | 65 SharedWorkerDevToolsAgent* devtools_agent_; |
94 | 66 |
95 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerClientProxy); | 67 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerClientProxy); |
96 }; | 68 }; |
97 | 69 |
98 } // namespace content | 70 } // namespace content |
99 | 71 |
100 #endif // CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ | 72 #endif // CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ |
OLD | NEW |