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

Unified Diff: content/child/service_worker/service_worker_message_filter.h

Issue 25008006: Flush out initial [un]registerServiceWorker roundtrip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use int64 for workers, remove policy check Created 7 years, 2 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/child/service_worker/service_worker_message_filter.h
diff --git a/content/child/service_worker/service_worker_message_filter.h b/content/child/service_worker/service_worker_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c154ba1a28700793a62a9d2f82cef63da74dfa4
--- /dev/null
+++ b/content/child/service_worker/service_worker_message_filter.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2012 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 CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_MESSAGE_FILTER_H_
+#define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_MESSAGE_FILTER_H_
+
+#include <map>
+
+#include "content/common/content_export.h"
+#include "ipc/ipc_channel_proxy.h"
+
+namespace content {
+class ThreadSafeSender;
+class MessageLoopProxy;
+
+class CONTENT_EXPORT ServiceWorkerMessageFilter
+ : public IPC::ChannelProxy::MessageFilter {
+ public:
+ explicit ServiceWorkerMessageFilter(ThreadSafeSender* thread_safe_sender);
+
+ // IPC::Listener implementation
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
+
+ protected:
+ virtual ~ServiceWorkerMessageFilter();
+
+ private:
+ void DispatchMessage(const IPC::Message& msg);
+
+ scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
+ scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+
+ DISALLOW_COPY_AND_ASSIGN(ServiceWorkerMessageFilter);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698