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) { | 389 const url::Origin& origin) { |
390 if (bluetooth_chooser_factory_) { | 390 if (bluetooth_chooser_factory_) { |
391 return bluetooth_chooser_factory_->RunBluetoothChooser( | 391 return bluetooth_chooser_factory_->RunBluetoothChooser(frame, event_handler, |
392 web_contents, event_handler, origin); | 392 origin); |
393 } | 393 } |
394 return nullptr; | 394 return nullptr; |
395 } | 395 } |
396 | 396 |
397 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { | 397 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { |
398 DCHECK(CalledOnValidThread()); | 398 DCHECK(CalledOnValidThread()); |
399 bool handled = true; | 399 bool handled = true; |
400 IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message) | 400 IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message) |
401 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) | 401 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) |
402 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) | 402 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 } else { | 854 } else { |
855 printer_->AddErrorMessage(base::StringPrintf( | 855 printer_->AddErrorMessage(base::StringPrintf( |
856 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 856 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
857 event_name.c_str())); | 857 event_name.c_str())); |
858 return; | 858 return; |
859 } | 859 } |
860 bluetooth_chooser_factory_->SendEvent(event, argument); | 860 bluetooth_chooser_factory_->SendEvent(event, argument); |
861 } | 861 } |
862 | 862 |
863 } // namespace content | 863 } // namespace content |
OLD | NEW |