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/webkit_test_controller.h" | 5 #include "content/shell/browser/webkit_test_controller.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "content/public/browser/devtools_manager.h" | 15 #include "content/public/browser/devtools_agent_host.h" |
16 #include "content/public/browser/dom_storage_context.h" | 16 #include "content/public/browser/dom_storage_context.h" |
17 #include "content/public/browser/gpu_data_manager.h" | 17 #include "content/public/browser/gpu_data_manager.h" |
18 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
19 #include "content/public/browser/navigation_entry.h" | 19 #include "content/public/browser/navigation_entry.h" |
20 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
21 #include "content/public/browser/notification_types.h" | 21 #include "content/public/browser/notification_types.h" |
22 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" |
23 #include "content/public/browser/render_view_host.h" | 23 #include "content/public/browser/render_view_host.h" |
24 #include "content/public/browser/render_widget_host_view.h" | 24 #include "content/public/browser/render_widget_host_view.h" |
25 #include "content/public/browser/storage_partition.h" | 25 #include "content/public/browser/storage_partition.h" |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 session_histories.push_back(history); | 646 session_histories.push_back(history); |
647 } | 647 } |
648 | 648 |
649 Send(new ShellViewMsg_SessionHistory(render_view_host->GetRoutingID(), | 649 Send(new ShellViewMsg_SessionHistory(render_view_host->GetRoutingID(), |
650 routing_ids, | 650 routing_ids, |
651 session_histories, | 651 session_histories, |
652 current_entry_indexes)); | 652 current_entry_indexes)); |
653 } | 653 } |
654 | 654 |
655 void WebKitTestController::OnCloseRemainingWindows() { | 655 void WebKitTestController::OnCloseRemainingWindows() { |
656 DevToolsManager::GetInstance()->CloseAllClientHosts(); | 656 DevToolsAgentHost::DetachAllClients(); |
657 std::vector<Shell*> open_windows(Shell::windows()); | 657 std::vector<Shell*> open_windows(Shell::windows()); |
658 for (size_t i = 0; i < open_windows.size(); ++i) { | 658 for (size_t i = 0; i < open_windows.size(); ++i) { |
659 if (open_windows[i] != main_window_) | 659 if (open_windows[i] != main_window_) |
660 open_windows[i]->Close(); | 660 open_windows[i]->Close(); |
661 } | 661 } |
662 base::MessageLoop::current()->RunUntilIdle(); | 662 base::MessageLoop::current()->RunUntilIdle(); |
663 } | 663 } |
664 | 664 |
665 void WebKitTestController::OnResetDone() { | 665 void WebKitTestController::OnResetDone() { |
666 if (is_leak_detection_enabled_) { | 666 if (is_leak_detection_enabled_) { |
(...skipping 20 matching lines...) Expand all Loading... |
687 | 687 |
688 printer_->AddErrorMessage( | 688 printer_->AddErrorMessage( |
689 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 689 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
690 result.detail.c_str())); | 690 result.detail.c_str())); |
691 CHECK(!crash_when_leak_found_); | 691 CHECK(!crash_when_leak_found_); |
692 | 692 |
693 DiscardMainWindow(); | 693 DiscardMainWindow(); |
694 } | 694 } |
695 | 695 |
696 } // namespace content | 696 } // namespace content |
OLD | NEW |