| Index: content/shell/renderer/layout_test/blink_test_runner.cc
|
| diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
|
| index bc52f3ebc3d0ec46fddee042430c975c924227d5..2233563cca55e359145d1822a985d36a1c964fef 100644
|
| --- a/content/shell/renderer/layout_test/blink_test_runner.cc
|
| +++ b/content/shell/renderer/layout_test/blink_test_runner.cc
|
| @@ -484,12 +484,13 @@ void BlinkTestRunner::SetBluetoothMockDataSet(const std::string& name) {
|
| void BlinkTestRunner::SetBluetoothManualChooser() {
|
| Send(new ShellViewHostMsg_SetBluetoothManualChooser(routing_id(), true));
|
| }
|
| -std::vector<std::string> BlinkTestRunner::GetBluetoothManualChooserEvents() {
|
| - std::vector<std::string> result;
|
| - Send(new ShellViewHostMsg_GetBluetoothManualChooserEvents(routing_id(),
|
| - &result));
|
| - return result;
|
| +
|
| +void BlinkTestRunner::GetBluetoothManualChooserEvents(
|
| + const base::Callback<void(const std::vector<std::string>&)>& callback) {
|
| + get_bluetooth_events_callbacks_.push_back(callback);
|
| + Send(new ShellViewHostMsg_GetBluetoothManualChooserEvents(routing_id()));
|
| }
|
| +
|
| void BlinkTestRunner::SendBluetoothManualChooserEvent(
|
| const std::string& event,
|
| const std::string& argument) {
|
| @@ -732,6 +733,8 @@ bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(ShellViewMsg_Reset, OnReset)
|
| IPC_MESSAGE_HANDLER(ShellViewMsg_NotifyDone, OnNotifyDone)
|
| IPC_MESSAGE_HANDLER(ShellViewMsg_TryLeakDetection, OnTryLeakDetection)
|
| + IPC_MESSAGE_HANDLER(ShellViewMsg_ReplyBluetoothManualChooserEvents,
|
| + OnReplyBluetoothManualChooserEvents)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -911,6 +914,15 @@ void BlinkTestRunner::OnTryLeakDetection() {
|
| leak_detector_->TryLeakDetection(main_frame);
|
| }
|
|
|
| +void BlinkTestRunner::OnReplyBluetoothManualChooserEvents(
|
| + const std::vector<std::string>& events) {
|
| + DCHECK(!get_bluetooth_events_callbacks_.empty());
|
| + base::Callback<void(const std::vector<std::string>&)> callback =
|
| + get_bluetooth_events_callbacks_.front();
|
| + get_bluetooth_events_callbacks_.pop_front();
|
| + callback.Run(events);
|
| +}
|
| +
|
| void BlinkTestRunner::ReportLeakDetectionResult(
|
| const LeakDetectionResult& report) {
|
| Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
|
|
|