OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WEB_BLUETOOTH_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ |
6 #define CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 void CrashRendererAndClosePipe(bad_message::BadMessageReason reason); | 59 void CrashRendererAndClosePipe(bad_message::BadMessageReason reason); |
60 | 60 |
61 // Sets the connection error handler for WebBluetoothServiceImpl's Binding. | 61 // Sets the connection error handler for WebBluetoothServiceImpl's Binding. |
62 void SetClientConnectionErrorHandler(base::Closure closure); | 62 void SetClientConnectionErrorHandler(base::Closure closure); |
63 | 63 |
64 // Returns whether the device is paired with the |render_frame_host_|'s | 64 // Returns whether the device is paired with the |render_frame_host_|'s |
65 // GetLastCommittedOrigin(). | 65 // GetLastCommittedOrigin(). |
66 bool IsDevicePaired(const std::string& device_address); | 66 bool IsDevicePaired(const std::string& device_address); |
67 | 67 |
| 68 // BluetoothAdapter::Observer: |
| 69 void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter, |
| 70 bool discovering) override; |
| 71 |
| 72 bool IsDiscoverySessionActive(); |
| 73 |
| 74 void SimulateRequestDevice(); |
| 75 |
68 private: | 76 private: |
69 friend class FrameConnectedBluetoothDevicesTest; | 77 friend class FrameConnectedBluetoothDevicesTest; |
70 typedef base::Callback<void(device::BluetoothDevice*)> | 78 typedef base::Callback<void(device::BluetoothDevice*)> |
71 PrimaryServicesRequestCallback; | 79 PrimaryServicesRequestCallback; |
72 | 80 |
73 // WebContentsObserver: | 81 // WebContentsObserver: |
74 // These functions should always check that the affected RenderFrameHost | 82 // These functions should always check that the affected RenderFrameHost |
75 // is this->render_frame_host_ and not some other frame in the same tab. | 83 // is this->render_frame_host_ and not some other frame in the same tab. |
76 void DidFinishNavigation(NavigationHandle* navigation_handle) override; | 84 void DidFinishNavigation(NavigationHandle* navigation_handle) override; |
77 | 85 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 mojo::Binding<blink::mojom::WebBluetoothService> binding_; | 286 mojo::Binding<blink::mojom::WebBluetoothService> binding_; |
279 | 287 |
280 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; | 288 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; |
281 | 289 |
282 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); | 290 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); |
283 }; | 291 }; |
284 | 292 |
285 } // namespace content | 293 } // namespace content |
286 | 294 |
287 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ | 295 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ |
OLD | NEW |