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 20 matching lines...) Expand all Loading... |
31 BluetoothDispatcherHost(); | 31 BluetoothDispatcherHost(); |
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 OnSetBluetoothMockDataSetForTesting(const std::string& name); | 42 void OnSetBluetoothMockDataSetForTesting(const std::string& name); |
42 | 43 |
43 // A BluetoothAdapter instance representing an adapter of the system. | 44 // A BluetoothAdapter instance representing an adapter of the system. |
44 scoped_refptr<device::BluetoothAdapter> adapter_; | 45 scoped_refptr<device::BluetoothAdapter> adapter_; |
45 | 46 |
46 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; | 47 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; |
47 MockData bluetooth_mock_data_set_; | 48 MockData bluetooth_mock_data_set_; |
48 BluetoothError bluetooth_request_device_reject_type_; | 49 BluetoothError bluetooth_request_device_reject_type_; |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); | 51 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace content | 54 } // namespace content |
54 | 55 |
55 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 56 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
OLD | NEW |