Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: webkit/support/webkit_support.cc

Issue 2810025: Add support functions for DRT DevTools to webkit_support (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/webkit_support.cc
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index f0e984af56569adfd02d49274fe1743b51c96ab2..9c9bc6e161a6401d7dd8679b2cfb6e31834f0d7b 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -13,9 +13,11 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/process_util.h"
+#include "base/string_piece.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/weak_ptr.h"
+#include "grit/webkit_chromium_resources.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
@@ -28,6 +30,7 @@
#include "webkit/glue/plugins/webplugin_impl.h"
#include "webkit/glue/plugins/webplugin_page_delegate.h"
#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h"
#include "webkit/glue/webmediaplayer_impl.h"
#include "webkit/support/platform_support.h"
@@ -36,6 +39,7 @@
#include "webkit/tools/test_shell/simple_database_system.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
+using WebKit::WebCString;
using WebKit::WebFrame;
using WebKit::WebMediaPlayerClient;
using WebKit::WebPlugin;
@@ -339,6 +343,35 @@ WebKit::WebThemeEngine* GetThemeEngine() {
return test_environment->theme_engine();
}
+// DevTools
+WebCString GetDevToolsInjectedScriptSource() {
+ base::StringPiece injectJSWebkit = webkit_glue::GetDataResource(
+ IDR_DEVTOOLS_INJECT_WEBKIT_JS);
+ return WebCString(injectJSWebkit.as_string().c_str());
+}
+
+WebCString GetDevToolsInjectedScriptDispatcherSource() {
+ base::StringPiece injectDispatchJS = webkit_glue::GetDataResource(
+ IDR_DEVTOOLS_INJECT_DISPATCH_JS);
+ return WebCString(injectDispatchJS.as_string().c_str());
+}
+
+WebCString GetDevToolsDebuggerScriptSource() {
+ base::StringPiece debuggerScriptJS = webkit_glue::GetDataResource(
+ IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS);
+ return WebCString(debuggerScriptJS.as_string().c_str());
+}
+
+WebURL GetDevToolsPathAsURL() {
+ FilePath dirExe;
+ if (!webkit_glue::GetExeDirectory(&dirExe)) {
+ DCHECK(false);
+ return WebURL();
+ }
+ FilePath devToolsPath = dirExe.AppendASCII("resources/inspector/devtools.html");
+ return GURL(devToolsPath.value());
+}
+
#endif
} // namespace webkit_support
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698