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

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

Issue 1325953002: Add functions to let tests read and control the Bluetooth chooser state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Add a forgotten semicolon. :-/ Created 5 years, 3 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
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/common/shell_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell.cc
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index a78bb4ab9a8ddc5b25fd4bea7c5f682782fdbc0c..b273931d361dd5ce9265fe85ec405473f9994df8 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -21,6 +21,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/renderer_preferences.h"
#include "content/shell/browser/blink_test_controller.h"
+#include "content/shell/browser/layout_test/layout_test_bluetooth_chooser_factory.h"
#include "content/shell/browser/layout_test/layout_test_devtools_frontend.h"
#include "content/shell/browser/layout_test/layout_test_javascript_dialog_manager.h"
#include "content/shell/browser/notify_done_forwarder.h"
@@ -358,6 +359,19 @@ JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(
return dialog_manager_.get();
}
+scoped_ptr<BluetoothChooser> Shell::RunBluetoothChooser(
+ WebContents* web_contents,
+ const BluetoothChooser::EventHandler& event_handler,
+ const GURL& origin) {
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kRunLayoutTest)) {
+ return BlinkTestController::Get()->RunBluetoothChooser(
+ web_contents, event_handler, origin);
+ }
+ return nullptr;
+}
+
bool Shell::AddMessageToConsole(WebContents* source,
int32 level,
const base::string16& message,
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/common/shell_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698