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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 if (test_phase_ != DURING_TEST) | 374 if (test_phase_ != DURING_TEST) |
375 return; | 375 return; |
376 | 376 |
377 Shell::CreateNewWindow(main_window_->web_contents()->GetBrowserContext(), | 377 Shell::CreateNewWindow(main_window_->web_contents()->GetBrowserContext(), |
378 url, | 378 url, |
379 main_window_->web_contents()->GetSiteInstance(), | 379 main_window_->web_contents()->GetSiteInstance(), |
380 gfx::Size()); | 380 gfx::Size()); |
381 } | 381 } |
382 | 382 |
383 void BlinkTestController::OnTestFinishedInSecondaryRenderer() { | 383 void BlinkTestController::OnTestFinishedInSecondaryRenderer() { |
384 RenderViewHost* render_view_host = | 384 RenderViewHost* main_render_view_host = |
385 main_window_->web_contents()->GetRenderViewHost(); | 385 main_window_->web_contents()->GetRenderViewHost(); |
386 render_view_host->Send( | 386 main_render_view_host->Send(new ShellViewMsg_TestFinishedInSecondaryRenderer( |
387 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID())); | 387 main_render_view_host->GetRoutingID())); |
388 } | 388 } |
389 | 389 |
390 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { | 390 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { |
391 return main_window_ && web_contents == main_window_->web_contents(); | 391 return main_window_ && web_contents == main_window_->web_contents(); |
392 } | 392 } |
393 | 393 |
394 std::unique_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( | 394 std::unique_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( |
395 RenderFrameHost* frame, | 395 RenderFrameHost* frame, |
396 const BluetoothChooser::EventHandler& event_handler) { | 396 const BluetoothChooser::EventHandler& event_handler) { |
397 if (bluetooth_chooser_factory_) { | 397 if (bluetooth_chooser_factory_) { |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 } else { | 927 } else { |
928 printer_->AddErrorMessage(base::StringPrintf( | 928 printer_->AddErrorMessage(base::StringPrintf( |
929 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 929 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
930 event_name.c_str())); | 930 event_name.c_str())); |
931 return; | 931 return; |
932 } | 932 } |
933 bluetooth_chooser_factory_->SendEvent(event, argument); | 933 bluetooth_chooser_factory_->SendEvent(event, argument); |
934 } | 934 } |
935 | 935 |
936 } // namespace content | 936 } // namespace content |
OLD | NEW |