| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_CHILD_BLUETOOTH_BLUETOOTH_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_CHILD_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_H_ |
| 6 #define CONTENT_CHILD_BLUETOOTH_BLUETOOTH_MESSAGE_FILTER_H_ | 6 #define CONTENT_CHILD_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "content/child/child_message_filter.h" | 8 #include "content/child/child_message_filter.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 class MessageLoopProxy; | 11 class MessageLoopProxy; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class ThreadSafeSender; | 16 class ThreadSafeSender; |
| 17 | 17 |
| 18 class BluetoothMessageFilter : public ChildMessageFilter { | 18 // Receives IPC messages from the browser process and dispatches them to the |
| 19 // correct thread specific NavigatorConnectProvider. |
| 20 class NavigatorConnectDispatcher : public ChildMessageFilter { |
| 19 public: | 21 public: |
| 20 explicit BluetoothMessageFilter(ThreadSafeSender* thread_safe_sender); | 22 explicit NavigatorConnectDispatcher(ThreadSafeSender* thread_safe_sender); |
| 21 | 23 |
| 22 private: | 24 private: |
| 23 ~BluetoothMessageFilter() override; | 25 ~NavigatorConnectDispatcher() override; |
| 24 | 26 |
| 25 // ChildMessageFilter implementation: | 27 // ChildMessageFilter implementation: |
| 26 base::TaskRunner* OverrideTaskRunnerForMessage( | 28 base::TaskRunner* OverrideTaskRunnerForMessage( |
| 27 const IPC::Message& msg) override; | 29 const IPC::Message& msg) override; |
| 28 bool OnMessageReceived(const IPC::Message& msg) override; | 30 bool OnMessageReceived(const IPC::Message& msg) override; |
| 29 | 31 |
| 30 scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_; | 32 scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_; |
| 31 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 33 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 32 | 34 |
| 33 DISALLOW_COPY_AND_ASSIGN(BluetoothMessageFilter); | 35 DISALLOW_COPY_AND_ASSIGN(NavigatorConnectDispatcher); |
| 34 }; | 36 }; |
| 35 | 37 |
| 36 } // namespace content | 38 } // namespace content |
| 37 | 39 |
| 38 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_MESSAGE_FILTER_H_ | 40 #endif // CONTENT_CHILD_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_H_ |
| OLD | NEW |