| 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_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ | 5 #ifndef CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ |
| 6 #define CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ | 6 #define CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" |
| 8 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 9 #include "third_party/WebKit/public/platform/WebBluetooth.h" | 10 #include "third_party/WebKit/public/platform/WebBluetooth.h" |
| 10 #include "third_party/WebKit/public/platform/WebBluetoothError.h" | 11 #include "third_party/WebKit/public/platform/WebBluetoothError.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 // Mock implementation of blink::WebBluetooth until a more complete | 15 // Mock implementation of blink::WebBluetooth until a more complete |
| 15 // implementation is built out. | 16 // implementation is built out. |
| 16 class CONTENT_EXPORT WebBluetoothImpl | 17 class CONTENT_EXPORT WebBluetoothImpl |
| 17 : NON_EXPORTED_BASE(public blink::WebBluetooth) { | 18 : NON_EXPORTED_BASE(public blink::WebBluetooth) { |
| 18 public: | 19 public: |
| 19 WebBluetoothImpl(); | 20 WebBluetoothImpl(); |
| 20 | 21 |
| 21 // WebBluetooth interface: | 22 // WebBluetooth interface: |
| 22 void requestDevice(blink::WebBluetoothRequestDeviceCallbacks*) override; | 23 void requestDevice(blink::WebBluetoothRequestDeviceCallbacks*) override; |
| 23 | 24 |
| 24 // Testing interface: | 25 // Testing interface: |
| 25 void SetBluetoothMockDataSetForTesting(const std::string& name); | 26 void SetBluetoothMockDataSetForTesting(const std::string& name); |
| 26 | 27 |
| 27 private: | 28 private: |
| 28 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; | 29 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; |
| 29 MockData m_bluetoothMockDataSet; | 30 MockData m_bluetoothMockDataSet; |
| 30 blink::WebBluetoothError::ErrorType m_bluetoothRequestDeviceRejectType; | 31 blink::WebBluetoothError::ErrorType m_bluetoothRequestDeviceRejectType; |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 } // namespace content | 34 } // namespace content |
| 34 | 35 |
| 35 #endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ | 36 #endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ |
| OLD | NEW |