Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: content/child/bluetooth/web_bluetooth_impl.h

Issue 702593002: bluetooth: Initial simple mock content::WebBluetoothImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/bluetooth/web_bluetooth_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/bluetooth/web_bluetooth_impl.h
diff --git a/content/child/bluetooth/web_bluetooth_impl.h b/content/child/bluetooth/web_bluetooth_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..e338cc5cf05a668a94c92b68acabf075980a88a6
--- /dev/null
+++ b/content/child/bluetooth/web_bluetooth_impl.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
+#define CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
+
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebBluetooth.h"
+#include "third_party/WebKit/public/platform/WebBluetoothError.h"
+
+namespace content {
+
+// Mock implementation of blink::WebBluetooth until a more complete
+// implementation is built out.
+class CONTENT_EXPORT WebBluetoothImpl
+ : NON_EXPORTED_BASE(public blink::WebBluetooth) {
+ public:
+ WebBluetoothImpl();
+
+ // WebBluetooth interface:
+ void requestDevice(blink::WebBluetoothRequestDeviceCallbacks*) override;
+
+ // Testing interface:
+ void SetBluetoothMockDataSetForTesting(const std::string& name);
+
+ private:
+ enum class MockData { NOT_MOCKING, REJECT, RESOLVE };
+ MockData m_bluetoothMockDataSet;
+ blink::WebBluetoothError::ErrorType m_bluetoothRequestDeviceRejectType;
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
« no previous file with comments | « no previous file | content/child/bluetooth/web_bluetooth_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698