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

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

Issue 6990059: DevTools: devtools message plumbing between worker and page processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved worker devtools login under content/ 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) 2009 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_WEBWORKER_STUB_H_ 5 #ifndef CONTENT_WORKER_WEBWORKER_STUB_H_
6 #define CONTENT_WORKER_WEBWORKER_STUB_H_ 6 #define CONTENT_WORKER_WEBWORKER_STUB_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h"
9 #include "content/worker/webworker_stub_base.h" 10 #include "content/worker/webworker_stub_base.h"
10 #include "content/worker/webworkerclient_proxy.h" 11 #include "content/worker/webworkerclient_proxy.h"
11 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
12 13
13 namespace WebKit { 14 namespace WebKit {
14 class WebWorker; 15 class WebWorker;
15 } 16 }
16 17
18 class WorkerDevToolsAgent;
19
17 // This class creates a WebWorker, and translates incoming IPCs to the 20 // This class creates a WebWorker, and translates incoming IPCs to the
18 // appropriate WebWorker APIs. 21 // appropriate WebWorker APIs.
19 class WebWorkerStub : public WebWorkerStubBase { 22 class WebWorkerStub : public WebWorkerStubBase {
20 public: 23 public:
21 WebWorkerStub(const GURL& url, int route_id, 24 WebWorkerStub(const GURL& url, int route_id,
22 const WorkerAppCacheInitInfo& appcache_init_info); 25 const WorkerAppCacheInitInfo& appcache_init_info);
23 26
24 // IPC::Channel::Listener implementation. 27 // IPC::Channel::Listener implementation.
25 virtual bool OnMessageReceived(const IPC::Message& message); 28 virtual bool OnMessageReceived(const IPC::Message& message);
26 virtual void OnChannelError(); 29 virtual void OnChannelError();
27 30
28 virtual const GURL& url() const; 31 virtual const GURL& url() const;
29 32
30 private: 33 private:
31 virtual ~WebWorkerStub(); 34 virtual ~WebWorkerStub();
32 35
33 void OnTerminateWorkerContext(); 36 void OnTerminateWorkerContext();
34 void OnPostMessage(const string16& message, 37 void OnPostMessage(const string16& message,
35 const std::vector<int>& sent_message_port_ids, 38 const std::vector<int>& sent_message_port_ids,
36 const std::vector<int>& new_routing_ids); 39 const std::vector<int>& new_routing_ids);
37 40
38 WebKit::WebWorker* impl_; 41 WebKit::WebWorker* impl_;
39 GURL url_; 42 GURL url_;
43 scoped_ptr<WorkerDevToolsAgent> worker_devtools_agent_;
40 44
41 DISALLOW_COPY_AND_ASSIGN(WebWorkerStub); 45 DISALLOW_COPY_AND_ASSIGN(WebWorkerStub);
42 }; 46 };
43 47
44 #endif // CONTENT_WORKER_WEBWORKER_STUB_H_ 48 #endif // CONTENT_WORKER_WEBWORKER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698