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

Unified Diff: chrome/worker/webworker_context_stub.cc

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/worker/webworker_context_stub.h ('k') | chrome/worker/worker.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/worker/webworker_context_stub.cc
===================================================================
--- chrome/worker/webworker_context_stub.cc (revision 0)
+++ chrome/worker/webworker_context_stub.cc (revision 0)
@@ -0,0 +1,33 @@
+// 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.
+
+#include "chrome/worker/webworker_context_stub.h"
+
+#include "chrome/common/ipc_logging.h"
+#include "chrome/common/worker_messages.h"
+#include "chrome/worker/worker_thread.h"
+#include "webkit/glue/webworker.h"
+
+
+WebWorkerContextStub::WebWorkerContextStub(const GURL& url, int route_id)
+ : url_(url),
+ route_id_(route_id),
+ wrapper_(CreateWebWorkerContextWrapper()) {
+}
+
+WebWorkerContextStub::~WebWorkerContextStub() {
+ thread_->OnWorkerDestruction(this);
+}
+
+void WebWorkerContextStub::OnMessageReceived(const IPC::Message& message) {
+ IPC_BEGIN_MESSAGE_MAP(WebWorkerContextStub, message)
+ IPC_MESSAGE_HANDLER(WorkerMsg_StartContext, OnStartContext)
+ IPC_END_MESSAGE_MAP()
+}
+
+void WebWorkerContextStub::OnStartContext(const std::string& user_agent,
+ const std::string& source_code) {
+ wrapper_->StartWorkerContext(url_, user_agent, source_code);
+
+}
« no previous file with comments | « chrome/worker/webworker_context_stub.h ('k') | chrome/worker/worker.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698