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

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

Issue 2515823002: Remove WebContents::GetRoutingID(). (Closed)
Patch Set: add render_view_host.h include in resource_dispatcher_host_unittest.cc 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 } 914 }
915 915
916 void BlinkTestController::OnGetBluetoothManualChooserEvents() { 916 void BlinkTestController::OnGetBluetoothManualChooserEvents() {
917 if (!bluetooth_chooser_factory_) { 917 if (!bluetooth_chooser_factory_) {
918 printer_->AddErrorMessage( 918 printer_->AddErrorMessage(
919 "FAIL: Must call setBluetoothManualChooser before " 919 "FAIL: Must call setBluetoothManualChooser before "
920 "getBluetoothManualChooserEvents."); 920 "getBluetoothManualChooserEvents.");
921 return; 921 return;
922 } 922 }
923 Send(new ShellViewMsg_ReplyBluetoothManualChooserEvents( 923 Send(new ShellViewMsg_ReplyBluetoothManualChooserEvents(
924 main_window_->web_contents()->GetRoutingID(), 924 main_window_->web_contents()->GetRenderViewHost()->GetRoutingID(),
925 bluetooth_chooser_factory_->GetAndResetEvents())); 925 bluetooth_chooser_factory_->GetAndResetEvents()));
926 } 926 }
927 927
928 void BlinkTestController::OnSendBluetoothManualChooserEvent( 928 void BlinkTestController::OnSendBluetoothManualChooserEvent(
929 const std::string& event_name, 929 const std::string& event_name,
930 const std::string& argument) { 930 const std::string& argument) {
931 if (!bluetooth_chooser_factory_) { 931 if (!bluetooth_chooser_factory_) {
932 printer_->AddErrorMessage( 932 printer_->AddErrorMessage(
933 "FAIL: Must call setBluetoothManualChooser before " 933 "FAIL: Must call setBluetoothManualChooser before "
934 "sendBluetoothManualChooserEvent."); 934 "sendBluetoothManualChooserEvent.");
935 return; 935 return;
936 } 936 }
937 BluetoothChooser::Event event; 937 BluetoothChooser::Event event;
938 if (event_name == "cancelled") { 938 if (event_name == "cancelled") {
939 event = BluetoothChooser::Event::CANCELLED; 939 event = BluetoothChooser::Event::CANCELLED;
940 } else if (event_name == "selected") { 940 } else if (event_name == "selected") {
941 event = BluetoothChooser::Event::SELECTED; 941 event = BluetoothChooser::Event::SELECTED;
942 } else if (event_name == "rescan") { 942 } else if (event_name == "rescan") {
943 event = BluetoothChooser::Event::RESCAN; 943 event = BluetoothChooser::Event::RESCAN;
944 } else { 944 } else {
945 printer_->AddErrorMessage(base::StringPrintf( 945 printer_->AddErrorMessage(base::StringPrintf(
946 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", 946 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.",
947 event_name.c_str())); 947 event_name.c_str()));
948 return; 948 return;
949 } 949 }
950 bluetooth_chooser_factory_->SendEvent(event, argument); 950 bluetooth_chooser_factory_->SendEvent(event, argument);
951 } 951 }
952 952
953 } // namespace content 953 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/visual_state_browsertest.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698