| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 | 10 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID())); | 371 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID())); |
| 372 } | 372 } |
| 373 | 373 |
| 374 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { | 374 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { |
| 375 return main_window_ && web_contents == main_window_->web_contents(); | 375 return main_window_ && web_contents == main_window_->web_contents(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 scoped_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( | 378 scoped_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( |
| 379 WebContents* web_contents, | 379 WebContents* web_contents, |
| 380 const BluetoothChooser::EventHandler& event_handler, | 380 const BluetoothChooser::EventHandler& event_handler, |
| 381 const GURL& origin) { | 381 const url::Origin& origin) { |
| 382 if (bluetooth_chooser_factory_) { | 382 if (bluetooth_chooser_factory_) { |
| 383 return bluetooth_chooser_factory_->RunBluetoothChooser( | 383 return bluetooth_chooser_factory_->RunBluetoothChooser( |
| 384 web_contents, event_handler, origin); | 384 web_contents, event_handler, origin); |
| 385 } | 385 } |
| 386 return nullptr; | 386 return nullptr; |
| 387 } | 387 } |
| 388 | 388 |
| 389 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { | 389 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { |
| 390 DCHECK(CalledOnValidThread()); | 390 DCHECK(CalledOnValidThread()); |
| 391 bool handled = true; | 391 bool handled = true; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 } else { | 769 } else { |
| 770 printer_->AddErrorMessage(base::StringPrintf( | 770 printer_->AddErrorMessage(base::StringPrintf( |
| 771 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 771 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
| 772 event_name.c_str())); | 772 event_name.c_str())); |
| 773 return; | 773 return; |
| 774 } | 774 } |
| 775 bluetooth_chooser_factory_->SendEvent(event, argument); | 775 bluetooth_chooser_factory_->SendEvent(event, argument); |
| 776 } | 776 } |
| 777 | 777 |
| 778 } // namespace content | 778 } // namespace content |
| OLD | NEW |