| 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/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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 IPC_MESSAGE_HANDLER(ShellViewHostMsg_InitiateLayoutDump, | 406 IPC_MESSAGE_HANDLER(ShellViewHostMsg_InitiateLayoutDump, |
| 407 OnInitiateLayoutDump) | 407 OnInitiateLayoutDump) |
| 408 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ImageDump, OnImageDump) | 408 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ImageDump, OnImageDump) |
| 409 IPC_MESSAGE_HANDLER(ShellViewHostMsg_AudioDump, OnAudioDump) | 409 IPC_MESSAGE_HANDLER(ShellViewHostMsg_AudioDump, OnAudioDump) |
| 410 IPC_MESSAGE_HANDLER(ShellViewHostMsg_OverridePreferences, | 410 IPC_MESSAGE_HANDLER(ShellViewHostMsg_OverridePreferences, |
| 411 OnOverridePreferences) | 411 OnOverridePreferences) |
| 412 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TestFinished, OnTestFinished) | 412 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TestFinished, OnTestFinished) |
| 413 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ClearDevToolsLocalStorage, | 413 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ClearDevToolsLocalStorage, |
| 414 OnClearDevToolsLocalStorage) | 414 OnClearDevToolsLocalStorage) |
| 415 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowDevTools, OnShowDevTools) | 415 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowDevTools, OnShowDevTools) |
| 416 IPC_MESSAGE_HANDLER(ShellViewHostMsg_EvaluateInDevTools, |
| 417 OnEvaluateInDevTools) |
| 416 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseDevTools, OnCloseDevTools) | 418 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseDevTools, OnCloseDevTools) |
| 417 IPC_MESSAGE_HANDLER(ShellViewHostMsg_GoToOffset, OnGoToOffset) | 419 IPC_MESSAGE_HANDLER(ShellViewHostMsg_GoToOffset, OnGoToOffset) |
| 418 IPC_MESSAGE_HANDLER(ShellViewHostMsg_Reload, OnReload) | 420 IPC_MESSAGE_HANDLER(ShellViewHostMsg_Reload, OnReload) |
| 419 IPC_MESSAGE_HANDLER(ShellViewHostMsg_LoadURLForFrame, OnLoadURLForFrame) | 421 IPC_MESSAGE_HANDLER(ShellViewHostMsg_LoadURLForFrame, OnLoadURLForFrame) |
| 420 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CaptureSessionHistory, | 422 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CaptureSessionHistory, |
| 421 OnCaptureSessionHistory) | 423 OnCaptureSessionHistory) |
| 422 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseRemainingWindows, | 424 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseRemainingWindows, |
| 423 OnCloseRemainingWindows) | 425 OnCloseRemainingWindows) |
| 424 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ResetDone, OnResetDone) | 426 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ResetDone, OnResetDone) |
| 425 IPC_MESSAGE_HANDLER(ShellViewHostMsg_LeakDetectionDone, OnLeakDetectionDone) | 427 IPC_MESSAGE_HANDLER(ShellViewHostMsg_LeakDetectionDone, OnLeakDetectionDone) |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 if (!devtools_frontend_) { | 761 if (!devtools_frontend_) { |
| 760 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( | 762 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( |
| 761 main_window_->web_contents(), settings, frontend_url); | 763 main_window_->web_contents(), settings, frontend_url); |
| 762 } else { | 764 } else { |
| 763 devtools_frontend_->ReuseFrontend(settings, frontend_url); | 765 devtools_frontend_->ReuseFrontend(settings, frontend_url); |
| 764 } | 766 } |
| 765 devtools_frontend_->Activate(); | 767 devtools_frontend_->Activate(); |
| 766 devtools_frontend_->Focus(); | 768 devtools_frontend_->Focus(); |
| 767 } | 769 } |
| 768 | 770 |
| 771 void BlinkTestController::OnEvaluateInDevTools( |
| 772 int call_id, const std::string& script) { |
| 773 if (devtools_frontend_) |
| 774 devtools_frontend_->EvaluateInFrontend(call_id, script); |
| 775 } |
| 776 |
| 769 void BlinkTestController::OnCloseDevTools() { | 777 void BlinkTestController::OnCloseDevTools() { |
| 770 if (devtools_frontend_) | 778 if (devtools_frontend_) |
| 771 devtools_frontend_->DisconnectFromTarget(); | 779 devtools_frontend_->DisconnectFromTarget(); |
| 772 } | 780 } |
| 773 | 781 |
| 774 void BlinkTestController::OnGoToOffset(int offset) { | 782 void BlinkTestController::OnGoToOffset(int offset) { |
| 775 main_window_->GoBackOrForward(offset); | 783 main_window_->GoBackOrForward(offset); |
| 776 } | 784 } |
| 777 | 785 |
| 778 void BlinkTestController::OnReload() { | 786 void BlinkTestController::OnReload() { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 } else { | 915 } else { |
| 908 printer_->AddErrorMessage(base::StringPrintf( | 916 printer_->AddErrorMessage(base::StringPrintf( |
| 909 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 917 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
| 910 event_name.c_str())); | 918 event_name.c_str())); |
| 911 return; | 919 return; |
| 912 } | 920 } |
| 913 bluetooth_chooser_factory_->SendEvent(event, argument); | 921 bluetooth_chooser_factory_->SendEvent(event, argument); |
| 914 } | 922 } |
| 915 | 923 |
| 916 } // namespace content | 924 } // namespace content |
| OLD | NEW |