OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug_util.h" | 9 #include "base/debug_util.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 } | 464 } |
465 | 465 |
466 WebKit::WebThemeEngine* GetThemeEngine() { | 466 WebKit::WebThemeEngine* GetThemeEngine() { |
467 DCHECK(test_environment); | 467 DCHECK(test_environment); |
468 return test_environment->theme_engine(); | 468 return test_environment->theme_engine(); |
469 } | 469 } |
470 | 470 |
471 #endif | 471 #endif |
472 | 472 |
473 // DevTools | 473 // DevTools |
474 WebCString GetDevToolsInjectedScriptSource() { | |
475 base::StringPiece injectJSWebkit = webkit_glue::GetDataResource( | |
476 IDR_DEVTOOLS_INJECT_WEBKIT_JS); | |
477 return WebCString(injectJSWebkit.as_string().c_str()); | |
478 } | |
479 | |
480 WebCString GetDevToolsInjectedScriptDispatcherSource() { | |
481 return WebCString(); | |
482 } | |
483 | |
484 WebCString GetDevToolsDebuggerScriptSource() { | 474 WebCString GetDevToolsDebuggerScriptSource() { |
485 base::StringPiece debuggerScriptJS = webkit_glue::GetDataResource( | 475 base::StringPiece debuggerScriptJS = webkit_glue::GetDataResource( |
486 IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS); | 476 IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS); |
487 return WebCString(debuggerScriptJS.as_string().c_str()); | 477 return WebCString(debuggerScriptJS.as_string().c_str()); |
488 } | 478 } |
489 | 479 |
490 WebURL GetDevToolsPathAsURL() { | 480 WebURL GetDevToolsPathAsURL() { |
491 FilePath dirExe; | 481 FilePath dirExe; |
492 if (!webkit_glue::GetExeDirectory(&dirExe)) { | 482 if (!webkit_glue::GetExeDirectory(&dirExe)) { |
493 DCHECK(false); | 483 DCHECK(false); |
494 return WebURL(); | 484 return WebURL(); |
495 } | 485 } |
496 FilePath devToolsPath = dirExe.AppendASCII( | 486 FilePath devToolsPath = dirExe.AppendASCII( |
497 "resources/inspector/devtools.html"); | 487 "resources/inspector/devtools.html"); |
498 return net::FilePathToFileURL(devToolsPath); | 488 return net::FilePathToFileURL(devToolsPath); |
499 } | 489 } |
500 | 490 |
501 } // namespace webkit_support | 491 } // namespace webkit_support |
OLD | NEW |