| 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_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/common/bluetooth/bluetooth_error.h" | 9 #include "content/common/bluetooth/bluetooth_error.h" |
| 10 #include "content/public/browser/browser_message_filter.h" | 10 #include "content/public/browser/browser_message_filter.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 ~BluetoothDispatcherHost() override; | 32 ~BluetoothDispatcherHost() override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // Set |adapter_| to a BluetoothAdapter instance and register observers, | 35 // Set |adapter_| to a BluetoothAdapter instance and register observers, |
| 36 // releasing references to previous |adapter_|. | 36 // releasing references to previous |adapter_|. |
| 37 void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter); | 37 void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter); |
| 38 | 38 |
| 39 // IPC Handlers, see definitions in bluetooth_messages.h. | 39 // IPC Handlers, see definitions in bluetooth_messages.h. |
| 40 void OnRequestDevice(int thread_id, int request_id); | 40 void OnRequestDevice(int thread_id, int request_id); |
| 41 void OnRequestDeviceOnUI(int thread_id, int request_id); | 41 void OnRequestDeviceOnUI(int thread_id, int request_id); |
| 42 void OnConnectGATT(int thread_id, int request_id, |
| 43 const std::string& device_instance_id); |
| 44 void OnConnectGATTOnUI(int thread_id, int request_id, |
| 45 const std::string& device_instance_id); |
| 42 void OnSetBluetoothMockDataSetForTesting(const std::string& name); | 46 void OnSetBluetoothMockDataSetForTesting(const std::string& name); |
| 43 | 47 |
| 44 // A BluetoothAdapter instance representing an adapter of the system. | 48 // A BluetoothAdapter instance representing an adapter of the system. |
| 45 scoped_refptr<device::BluetoothAdapter> adapter_; | 49 scoped_refptr<device::BluetoothAdapter> adapter_; |
| 46 | 50 |
| 47 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; | 51 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; |
| 48 MockData bluetooth_mock_data_set_; | 52 MockData bluetooth_mock_data_set_; |
| 49 BluetoothError bluetooth_request_device_reject_type_; | 53 BluetoothError bluetooth_request_device_reject_type_; |
| 50 | 54 |
| 51 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); | 55 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); |
| 52 }; | 56 }; |
| 53 | 57 |
| 54 } // namespace content | 58 } // namespace content |
| 55 | 59 |
| 56 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 60 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| OLD | NEW |