| 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 #include <utility> | 10 #include <utility> |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 main_window_->web_contents()->GetRenderViewHost(); | 377 main_window_->web_contents()->GetRenderViewHost(); |
| 378 render_view_host->Send( | 378 render_view_host->Send( |
| 379 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID())); | 379 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID())); |
| 380 } | 380 } |
| 381 | 381 |
| 382 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { | 382 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { |
| 383 return main_window_ && web_contents == main_window_->web_contents(); | 383 return main_window_ && web_contents == main_window_->web_contents(); |
| 384 } | 384 } |
| 385 | 385 |
| 386 scoped_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( | 386 scoped_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( |
| 387 WebContents* web_contents, | 387 RenderFrameHost* frame, |
| 388 const BluetoothChooser::EventHandler& event_handler, | 388 const BluetoothChooser::EventHandler& event_handler) { |
| 389 const url::Origin& origin) { | |
| 390 if (bluetooth_chooser_factory_) { | 389 if (bluetooth_chooser_factory_) { |
| 391 return bluetooth_chooser_factory_->RunBluetoothChooser( | 390 return bluetooth_chooser_factory_->RunBluetoothChooser(frame, |
| 392 web_contents, event_handler, origin); | 391 event_handler); |
| 393 } | 392 } |
| 394 return nullptr; | 393 return nullptr; |
| 395 } | 394 } |
| 396 | 395 |
| 397 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { | 396 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { |
| 398 DCHECK(CalledOnValidThread()); | 397 DCHECK(CalledOnValidThread()); |
| 399 bool handled = true; | 398 bool handled = true; |
| 400 IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message) | 399 IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message) |
| 401 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) | 400 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) |
| 402 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) | 401 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 } else { | 853 } else { |
| 855 printer_->AddErrorMessage(base::StringPrintf( | 854 printer_->AddErrorMessage(base::StringPrintf( |
| 856 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 855 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
| 857 event_name.c_str())); | 856 event_name.c_str())); |
| 858 return; | 857 return; |
| 859 } | 858 } |
| 860 bluetooth_chooser_factory_->SendEvent(event, argument); | 859 bluetooth_chooser_factory_->SendEvent(event, argument); |
| 861 } | 860 } |
| 862 | 861 |
| 863 } // namespace content | 862 } // namespace content |
| OLD | NEW |