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

Side by Side Diff: content/shell/browser/blink_test_controller.cc

Issue 1353053002: Handle RESCAN events from the Bluetooth chooser by starting or extending a discovery session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Sync 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/blink_test_controller.h" 5 #include "content/shell/browser/blink_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 printer_->AddErrorMessage( 746 printer_->AddErrorMessage(
747 "FAIL: Must call setBluetoothManualChooser before " 747 "FAIL: Must call setBluetoothManualChooser before "
748 "sendBluetoothManualChooserEvent."); 748 "sendBluetoothManualChooserEvent.");
749 return; 749 return;
750 } 750 }
751 BluetoothChooser::Event event; 751 BluetoothChooser::Event event;
752 if (event_name == "cancelled") { 752 if (event_name == "cancelled") {
753 event = BluetoothChooser::Event::CANCELLED; 753 event = BluetoothChooser::Event::CANCELLED;
754 } else if (event_name == "selected") { 754 } else if (event_name == "selected") {
755 event = BluetoothChooser::Event::SELECTED; 755 event = BluetoothChooser::Event::SELECTED;
756 } else if (event_name == "rescan") {
757 event = BluetoothChooser::Event::RESCAN;
756 } else { 758 } else {
757 printer_->AddErrorMessage(base::StringPrintf( 759 printer_->AddErrorMessage(base::StringPrintf(
758 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", 760 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.",
759 event_name.c_str())); 761 event_name.c_str()));
760 return; 762 return;
761 } 763 }
762 bluetooth_chooser_factory_->SendEvent(event, argument); 764 bluetooth_chooser_factory_->SendEvent(event, argument);
763 } 765 }
764 766
765 } // namespace content 767 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698