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