Chromium Code Reviews| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 // |request|: The instance will be bound to this request's pipe. | 54 // |request|: The instance will be bound to this request's pipe. |
| 55 WebBluetoothServiceImpl(RenderFrameHost* render_frame_host, | 55 WebBluetoothServiceImpl(RenderFrameHost* render_frame_host, |
| 56 blink::mojom::WebBluetoothServiceRequest request); | 56 blink::mojom::WebBluetoothServiceRequest request); |
| 57 ~WebBluetoothServiceImpl() override; | 57 ~WebBluetoothServiceImpl() override; |
| 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 bool IsDevicePaired(const std::string& device_address); | |
|
Jeffrey Yasskin
2016/09/14 23:52:03
Comment that this returns whether the device is pa
juncai
2016/09/15 01:00:02
Done.
| |
| 65 | |
| 64 private: | 66 private: |
| 65 friend class FrameConnectedBluetoothDevicesTest; | 67 friend class FrameConnectedBluetoothDevicesTest; |
| 66 typedef base::Callback<void(device::BluetoothDevice*)> | 68 typedef base::Callback<void(device::BluetoothDevice*)> |
| 67 PrimaryServicesRequestCallback; | 69 PrimaryServicesRequestCallback; |
| 68 | 70 |
| 69 // WebContentsObserver: | 71 // WebContentsObserver: |
| 70 // These functions should always check that the affected RenderFrameHost | 72 // These functions should always check that the affected RenderFrameHost |
| 71 // is this->render_frame_host_ and not some other frame in the same tab. | 73 // is this->render_frame_host_ and not some other frame in the same tab. |
| 72 void DidFinishNavigation(NavigationHandle* navigation_handle) override; | 74 void DidFinishNavigation(NavigationHandle* navigation_handle) override; |
| 73 | 75 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 mojo::Binding<blink::mojom::WebBluetoothService> binding_; | 251 mojo::Binding<blink::mojom::WebBluetoothService> binding_; |
| 250 | 252 |
| 251 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; | 253 base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_; |
| 252 | 254 |
| 253 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); | 255 DISALLOW_COPY_AND_ASSIGN(WebBluetoothServiceImpl); |
| 254 }; | 256 }; |
| 255 | 257 |
| 256 } // namespace content | 258 } // namespace content |
| 257 | 259 |
| 258 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ | 260 #endif // CONTENT_BROWSER_BLUETOOTH_WEB_BLUETOOTH_SERVICE_IMPL_H_ |
| OLD | NEW |