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

Unified Diff: chrome/browser/tab_contents/web_contents_view_win.cc

Issue 21540: Add developer tools message forwarding to browser (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « chrome/browser/tab_contents/web_contents_view_win.h ('k') | chrome/common/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/web_contents_view_win.cc
===================================================================
--- chrome/browser/tab_contents/web_contents_view_win.cc (revision 10454)
+++ chrome/browser/tab_contents/web_contents_view_win.cc (working copy)
@@ -9,6 +9,7 @@
#include "chrome/browser/bookmarks/bookmark_drag_data.h"
#include "chrome/browser/browser.h" // TODO(beng): this dependency is awful.
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/debugger/dev_tools_window.h"
#include "chrome/browser/download/download_request_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
@@ -212,6 +213,26 @@
WasSized(size);
}
+void WebContentsViewWin::OpenDeveloperTools() {
+ if (!dev_tools_window_.get())
+ dev_tools_window_.reset(new DevToolsWindow);
+
+ RenderViewHost* host = web_contents_->render_view_host();
+ if (!host)
+ return;
+
+ dev_tools_window_->Show(host->process()->host_id(), host->routing_id());
+}
+
+void WebContentsViewWin::ForwardMessageToDevToolsClient(
+ const IPC::Message& message) {
+ if (!dev_tools_window_.get()) {
+ NOTREACHED() << "Developer tools window is not open.";
+ return;
+ }
+ dev_tools_window_->SendDevToolsClientMessage(message);
+}
+
void WebContentsViewWin::UpdateDragCursor(bool is_drop_target) {
drop_target_->set_is_drop_target(is_drop_target);
}
« no previous file with comments | « chrome/browser/tab_contents/web_contents_view_win.h ('k') | chrome/common/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698