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 10namespace base { 11class MessageLoopProxy; 12} 13 14namespace content { 15 16class EmbeddedWorkerContextMessageFilter : public ChildMessageFilter { 17 public: 18 EmbeddedWorkerContextMessageFilter(); 19 20 protected: 21 virtual ~EmbeddedWorkerContextMessageFilter(); 22 23 // ChildMessageFilter implementation: 24 virtual base::TaskRunner* OverrideTaskRunnerForMessage( 25 const IPC::Message& msg) OVERRIDE; 26 virtual 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_ 38