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

Unified Diff: chrome/worker/webworker_context_stub.h

Issue 20413: old1 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/webworker_context_proxy.cc ('k') | chrome/worker/webworker_context_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/worker/webworker_context_stub.h
===================================================================
--- chrome/worker/webworker_context_stub.h (revision 0)
+++ chrome/worker/webworker_context_stub.h (revision 0)
@@ -0,0 +1,43 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_WORKER_WEBWORKER_CONTEXT_STUB_H_
+#define CHROME_WORKER_WEBWORKER_CONTEXT_STUB_H_
+
+#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
+#include "chrome/common/ipc_channel.h"
+#include "googleurl/src/gurl.h"
+
+class WebWorkerContextProxy;
+class WorkerThread;
+
+// This class receives IPCs from the renderer and calls the WebKit
+// implementation of WorkerContextProxy with the data. The data
+// is converted from Chrome to WebKit types using a wrapper object.
+class WebWorkerContextStub : public IPC::Channel::Listener {
+ public:
+ WebWorkerContextStub(const GURL& url, int route_id);
+ ~WebWorkerContextStub();
+
+ // IPC::Channel::Listener implementation.
+ virtual void OnMessageReceived(const IPC::Message& message);
+
+ int route_id() { return route_id_; }
+
+ private:
+ void OnStartContext(const std::string& user_agent,
+ const std::string& source_code);
+
+ GURL url_;
+ int route_id_;
+
+ WorkerThread* thread_;
+
+ scoped_ptr<WebWorkerContextProxy> wrapper_;
+
+ DISALLOW_EVIL_CONSTRUCTORS(WebWorkerContextStub);
+};
+
+#endif // CHROME_WORKER_WEBWORKER_CONTEXT_STUB_H_
« no previous file with comments | « chrome/renderer/webworker_context_proxy.cc ('k') | chrome/worker/webworker_context_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698