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

Side by Side Diff: content/worker/webworkerclient_proxy.h

Issue 6990059: DevTools: devtools message plumbing between worker and page processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed, WebWorkerBase::DevToolsDelegate removed Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/task.h" 10 #include "base/task.h"
11 #include "ipc/ipc_channel.h" 11 #include "ipc/ipc_channel.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h"
14 14
15 namespace WebKit { 15 namespace WebKit {
16 class WebApplicationCacheHost; 16 class WebApplicationCacheHost;
17 class WebApplicationCacheHostClient; 17 class WebApplicationCacheHostClient;
18 class WebFrame; 18 class WebFrame;
19 class WebWorker; 19 class WebWorker;
20 } 20 }
21 21
22 class WebWorkerStubBase; 22 class WebWorkerStubBase;
23 class WorkerDevToolsAgent;
23 24
24 // This class receives IPCs from the renderer and calls the WebCore::Worker 25 // This class receives IPCs from the renderer and calls the WebCore::Worker
25 // implementation (after the data types have been converted by glue code). It 26 // 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 27 // 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 28 // IPCs that are sent to the renderer, where they're converted back to function
28 // calls by WebWorkerProxy. 29 // calls by WebWorkerProxy.
29 class WebWorkerClientProxy : public WebKit::WebWorkerClient { 30 class WebWorkerClientProxy : public WebKit::WebWorkerClient {
30 public: 31 public:
31 WebWorkerClientProxy(int route_id, WebWorkerStubBase* stub); 32 WebWorkerClientProxy(int route_id, WebWorkerStubBase* stub);
32 virtual ~WebWorkerClientProxy(); 33 virtual ~WebWorkerClientProxy();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 72
72 virtual bool allowDatabase(WebKit::WebFrame* frame, 73 virtual bool allowDatabase(WebKit::WebFrame* frame,
73 const WebKit::WebString& name, 74 const WebKit::WebString& name,
74 const WebKit::WebString& display_name, 75 const WebKit::WebString& display_name,
75 unsigned long estimated_size); 76 unsigned long estimated_size);
76 virtual bool allowFileSystem(); 77 virtual bool allowFileSystem();
77 virtual void openFileSystem(WebKit::WebFileSystem::Type type, 78 virtual void openFileSystem(WebKit::WebFileSystem::Type type,
78 long long size, 79 long long size,
79 bool create, 80 bool create,
80 WebKit::WebFileSystemCallbacks* callbacks); 81 WebKit::WebFileSystemCallbacks* callbacks);
82 virtual void dispatchDevToolsMessage(const WebKit::WebString&);
81 83
82 void EnsureWorkerContextTerminates(); 84 void EnsureWorkerContextTerminates();
83 85
86 void set_devtools_agent(WorkerDevToolsAgent* devtools_agent) {
87 devtools_agent_ = devtools_agent;
88 }
89
84 private: 90 private:
85 bool Send(IPC::Message* message); 91 bool Send(IPC::Message* message);
86 92
87 int route_id_; 93 int route_id_;
88 int appcache_host_id_; 94 int appcache_host_id_;
89 WebWorkerStubBase* stub_; 95 WebWorkerStubBase* stub_;
90 ScopedRunnableMethodFactory<WebWorkerClientProxy> kill_process_factory_; 96 ScopedRunnableMethodFactory<WebWorkerClientProxy> kill_process_factory_;
97 WorkerDevToolsAgent* devtools_agent_;
91 98
92 DISALLOW_COPY_AND_ASSIGN(WebWorkerClientProxy); 99 DISALLOW_COPY_AND_ASSIGN(WebWorkerClientProxy);
93 }; 100 };
94 101
95 #endif // CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ 102 #endif // CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698