Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | |
| 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "content/common/bluetooth/bluetooth_error.h" | |
| 10 #include "content/public/browser/browser_message_filter.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 // Dispatches and sends bluetooth related messages sent to/from a child | |
| 15 // process BluetoothDispatcher from/to the main browser process. | |
| 16 // Constructed on the main (UI) thread and receives IPC on the IO thread. | |
| 17 // Intended to be instantiated by the RenderProcessHost and installed as | |
| 18 // a filter on the channel. BrowserMessageFilter is refcounted and typically | |
| 19 // lives as long as it is installed on a channel. | |
| 20 class BluetoothDispatcherHost : public BrowserMessageFilter { | |
| 21 public: | |
| 22 BluetoothDispatcherHost(); | |
| 23 | |
| 24 // BrowserMessageFilter: | |
| 25 bool OnMessageReceived(const IPC::Message& message) override; | |
| 26 | |
| 27 protected: | |
| 28 ~BluetoothDispatcherHost() override; | |
| 29 | |
| 30 private: | |
| 31 // IPC Handlers, see definitions in bluetooth_messages.h. | |
| 32 void OnRequestDevice(int thread_id, int request_id); | |
| 33 void OnSetBluetoothMockDataSetForTesting(const std::string& name); | |
| 34 | |
| 35 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; | |
| 36 MockData bluetooth_mock_data_set_; | |
| 37 BluetoothError bluetoothRequestDeviceRejectType_; | |
|
nasko
2014/11/25 23:27:01
You still need to convert this variable to hacker_
scheib
2014/11/26 00:46:34
Done.
| |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); | |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | |
| OLD | NEW |