OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 if (layout_test_mode_ && !layout_test_controller_->CanOpenWindows()) | 576 if (layout_test_mode_ && !layout_test_controller_->CanOpenWindows()) |
577 return NULL; | 577 return NULL; |
578 | 578 |
579 TestShell* new_win; | 579 TestShell* new_win; |
580 if (!CreateNewWindow(GURL(), &new_win)) | 580 if (!CreateNewWindow(GURL(), &new_win)) |
581 return NULL; | 581 return NULL; |
582 | 582 |
583 return new_win->webView(); | 583 return new_win->webView(); |
584 } | 584 } |
585 | 585 |
| 586 void TestShell::InitializeDevToolsAgent(WebView* webView) { |
| 587 DCHECK(!dev_tools_agent_.get()); |
| 588 dev_tools_agent_.reset(new TestShellDevToolsAgent(webView)); |
| 589 } |
| 590 |
586 void TestShell::ShowDevTools() { | 591 void TestShell::ShowDevTools() { |
587 if (!devtools_shell_) { | 592 if (!devtools_shell_) { |
588 FilePath dir_exe; | 593 FilePath dir_exe; |
589 PathService::Get(base::DIR_EXE, &dir_exe); | 594 PathService::Get(base::DIR_EXE, &dir_exe); |
590 FilePath devtools_path = | 595 FilePath devtools_path = |
591 dir_exe.AppendASCII("resources/inspector/devtools.html"); | 596 dir_exe.AppendASCII("resources/inspector/devtools.html"); |
592 TestShell* devtools_shell; | 597 TestShell* devtools_shell; |
593 TestShell::CreateNewWindow(GURL(devtools_path.value()), | 598 TestShell::CreateNewWindow(GURL(devtools_path.value()), |
594 &devtools_shell); | 599 &devtools_shell); |
595 devtools_shell_ = devtools_shell->AsWeakPtr(); | 600 devtools_shell_ = devtools_shell->AsWeakPtr(); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 809 |
805 void ClearCache() { | 810 void ClearCache() { |
806 // Used in benchmarking, Ignored for test_shell. | 811 // Used in benchmarking, Ignored for test_shell. |
807 } | 812 } |
808 | 813 |
809 std::string GetProductVersion() { | 814 std::string GetProductVersion() { |
810 return std::string("Chrome/0.0.0.0"); | 815 return std::string("Chrome/0.0.0.0"); |
811 } | 816 } |
812 | 817 |
813 } // namespace webkit_glue | 818 } // namespace webkit_glue |
OLD | NEW |