| 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_
|
|
|