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

Unified Diff: content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc

Issue 1815483003: bluetooth: Create Mojo equivalent of SetBluetoothMockDataSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo
Patch Set: MMerge with ToT Created 4 years, 9 months 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
Index: content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b97bd0ad07b50c6460f3cb5e1ea35e52cd51a6c7
--- /dev/null
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
@@ -0,0 +1,41 @@
+// Copyright 2016 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.
+
+#include "content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h"
+
+#include <string>
+
+#include "content/public/test/layouttest_support.h"
+#include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h"
+
+namespace content {
+
+// static
+void LayoutTestBluetoothFakeAdapterSetterImpl::Create(
+ int render_process_id,
+ mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) {
+ new LayoutTestBluetoothFakeAdapterSetterImpl(render_process_id,
+ std::move(request));
+}
+
+LayoutTestBluetoothFakeAdapterSetterImpl::
+ LayoutTestBluetoothFakeAdapterSetterImpl(
+ int render_process_id,
+ mojom::LayoutTestBluetoothFakeAdapterSetterRequest request)
+ : render_process_id_(render_process_id),
+ binding_(this, std::move(request)) {}
+
+LayoutTestBluetoothFakeAdapterSetterImpl::
+ ~LayoutTestBluetoothFakeAdapterSetterImpl() {}
+
+void LayoutTestBluetoothFakeAdapterSetterImpl::Set(
+ const mojo::String& adapter_name,
+ const SetCallback& callback) {
+ SetBluetoothAdapter(render_process_id_,
+ LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(
+ adapter_name));
+ callback.Run();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698