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

Unified Diff: content/browser/shared_worker/shared_worker_host.h

Issue 177043003: Implement SharedWorkerServiceImpl::CreateWorker and SharedWorkerInstance and SharedWorkerHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test for SharedWorkerInstance Created 6 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
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_

Powered by Google App Engine
This is Rietveld 408576698