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

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

Issue 2577183002: Add UMA for the number of devices in the chooser when a device is paired (Closed)
Patch Set: fixed android build Created 4 years 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/layout_test/blink_test_controller.h" 5 #include "content/shell/browser/layout_test/blink_test_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <iostream> 9 #include <iostream>
10 #include <set> 10 #include <set>
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 main_render_view_host->Send(new ShellViewMsg_TestFinishedInSecondaryRenderer( 397 main_render_view_host->Send(new ShellViewMsg_TestFinishedInSecondaryRenderer(
398 main_render_view_host->GetRoutingID())); 398 main_render_view_host->GetRoutingID()));
399 } 399 }
400 400
401 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { 401 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const {
402 return main_window_ && web_contents == main_window_->web_contents(); 402 return main_window_ && web_contents == main_window_->web_contents();
403 } 403 }
404 404
405 std::unique_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( 405 std::unique_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser(
406 RenderFrameHost* frame, 406 RenderFrameHost* frame,
407 const BluetoothChooser::EventHandler& event_handler) { 407 const BluetoothChooser::EventHandler& event_handler,
408 bool accept_all_devices) {
408 if (bluetooth_chooser_factory_) { 409 if (bluetooth_chooser_factory_) {
409 return bluetooth_chooser_factory_->RunBluetoothChooser(frame, 410 return bluetooth_chooser_factory_->RunBluetoothChooser(frame, event_handler,
410 event_handler); 411 accept_all_devices);
411 } 412 }
412 return base::MakeUnique<LayoutTestFirstDeviceBluetoothChooser>(event_handler); 413 return base::MakeUnique<LayoutTestFirstDeviceBluetoothChooser>(event_handler);
413 } 414 }
414 415
415 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { 416 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) {
416 DCHECK(CalledOnValidThread()); 417 DCHECK(CalledOnValidThread());
417 bool handled = true; 418 bool handled = true;
418 IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message) 419 IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message)
419 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) 420 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage)
420 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) 421 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump)
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } else { 948 } else {
948 printer_->AddErrorMessage(base::StringPrintf( 949 printer_->AddErrorMessage(base::StringPrintf(
949 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", 950 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.",
950 event_name.c_str())); 951 event_name.c_str()));
951 return; 952 return;
952 } 953 }
953 bluetooth_chooser_factory_->SendEvent(event, argument); 954 bluetooth_chooser_factory_->SendEvent(event, argument);
954 } 955 }
955 956
956 } // namespace content 957 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698