Index: content/browser/shared_worker/shared_worker_host.h |
diff --git a/content/child/webfallbackthemeengine_impl.h b/content/browser/shared_worker/shared_worker_host.h |
similarity index 23% |
copy from content/child/webfallbackthemeengine_impl.h |
copy to content/browser/shared_worker/shared_worker_host.h |
index 032c3a0bd7dd8962b3c509cdd8246401cccf02d3..b12487c7fd392391815f7cab383e4bff60bf1037 100644 |
--- a/content/child/webfallbackthemeengine_impl.h |
+++ b/content/browser/shared_worker/shared_worker_host.h |
@@ -2,38 +2,37 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_ |
-#define CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_ |
+#ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
+#define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
-#include "base/memory/scoped_ptr.h" |
-#include "third_party/WebKit/public/platform/WebFallbackThemeEngine.h" |
+#include <vector> |
-namespace ui { |
-class FallbackTheme; |
-} |
+#include "base/memory/scoped_ptr.h" |
namespace content { |
+class SharedWorkerMessageFilter; |
+class SharedWorkerInstance; |
-class WebFallbackThemeEngineImpl : public blink::WebFallbackThemeEngine { |
+// The SharedWorkerHost is the interface that represents the browser side of |
+// the browser <-> worker communication channel. |
+class SharedWorkerHost { |
public: |
- WebFallbackThemeEngineImpl(); |
- virtual ~WebFallbackThemeEngineImpl(); |
- |
- // WebFallbackThemeEngine methods: |
- virtual blink::WebSize getSize(blink::WebFallbackThemeEngine::Part); |
- virtual void paint( |
- blink::WebCanvas* canvas, |
- blink::WebFallbackThemeEngine::Part part, |
- blink::WebFallbackThemeEngine::State state, |
- const blink::WebRect& rect, |
- const blink::WebFallbackThemeEngine::ExtraParams* extra_params); |
+ explicit SharedWorkerHost(SharedWorkerInstance* instance); |
+ ~SharedWorkerHost(); |
+ |
+ // Starts the SharedWorker in the renderer process which is associated with |
+ // |filter|. |
+ void Init(SharedWorkerMessageFilter* filter); |
+ |
+ SharedWorkerInstance* instance() { return instance_.get(); } |
+ int worker_route_id() const { return worker_route_id_; } |
private: |
- scoped_ptr<ui::FallbackTheme> theme_; |
+ scoped_ptr<SharedWorkerInstance> instance_; |
+ int worker_route_id_; |
- DISALLOW_COPY_AND_ASSIGN(WebFallbackThemeEngineImpl); |
+ DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); |
}; |
- |
} // namespace content |
-#endif // CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_ |
+#endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |