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

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

Issue 2658473002: Refactor BluetoothAllowedDevicesMap (Closed)
Patch Set: set --similarity=20 when did git cl upload Created 3 years, 11 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/shell.cc
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index f25b9031a76ae83d48376a88c97361fd43013c85..abd56186ed820a8863b5128cb03004cc21db43ac 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
@@ -18,6 +19,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
+#include "content/public/browser/bluetooth_allowed_devices_map_base.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -461,6 +463,17 @@ std::unique_ptr<BluetoothChooser> Shell::RunBluetoothChooser(
return nullptr;
}
+BluetoothAllowedDevicesMapBase* Shell::GetBluetoothDevicesMap(
+ RenderFrameHost* frame) {
+ if (switches::IsRunLayoutTestSwitchPresent()) {
+ auto allowed_devices_map =
+ base::MakeUnique<BluetoothAllowedDevicesMapBase>();
+ bluetooth_allowed_devices_maps_.push_back(std::move(allowed_devices_map));
+ return bluetooth_allowed_devices_maps_.back().get();
+ }
+ return nullptr;
+}
+
bool Shell::DidAddMessageToConsole(WebContents* source,
int32_t level,
const base::string16& message,

Powered by Google App Engine
This is Rietveld 408576698