Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / renderer / service_worker / embedded_worker_context_message_filter.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_MESSAGE_FILTER_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_MESSAGE_FILTER_H_
7
8 #include "content/child/child_message_filter.h"
9
10 namespace base {
11 class MessageLoopProxy;
12 }
13
14 namespace content {
15
16 class EmbeddedWorkerContextMessageFilter : public ChildMessageFilter {
17  public:
18   EmbeddedWorkerContextMessageFilter();
19
20  protected:
21   ~EmbeddedWorkerContextMessageFilter() override;
22
23   // ChildMessageFilter implementation:
24   base::TaskRunner* OverrideTaskRunnerForMessage(
25       const IPC::Message& msg) override;
26   bool OnMessageReceived(const IPC::Message& msg) override;
27
28  private:
29   scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
30   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
31
32   DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextMessageFilter);
33 };
34
35 }  // namespace content
36
37 #endif  // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_MESSAGE_FILTER_H_