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

Side by Side Diff: webkit/glue/chrome_client_impl.cc

Issue 62050: DevTools: add basic console support. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/devtools/js/devtools.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "Cursor.h" 10 #include "Cursor.h"
(...skipping 15 matching lines...) Expand all
26 #undef LOG 26 #undef LOG
27 27
28 #include "webkit/glue/chrome_client_impl.h" 28 #include "webkit/glue/chrome_client_impl.h"
29 29
30 #include "base/logging.h" 30 #include "base/logging.h"
31 #include "base/gfx/rect.h" 31 #include "base/gfx/rect.h"
32 #include "googleurl/src/gurl.h" 32 #include "googleurl/src/gurl.h"
33 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" 33 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
34 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" 34 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
35 #include "webkit/glue/glue_util.h" 35 #include "webkit/glue/glue_util.h"
36 #include "webkit/glue/webdevtoolsagent_impl.h"
36 #include "webkit/glue/webframe_impl.h" 37 #include "webkit/glue/webframe_impl.h"
37 #include "webkit/glue/webkit_glue.h" 38 #include "webkit/glue/webkit_glue.h"
38 #include "webkit/glue/weburlrequest_impl.h" 39 #include "webkit/glue/weburlrequest_impl.h"
39 #include "webkit/glue/webview_delegate.h" 40 #include "webkit/glue/webview_delegate.h"
40 #include "webkit/glue/webview_impl.h" 41 #include "webkit/glue/webview_impl.h"
41 #include "webkit/glue/webwidget_impl.h" 42 #include "webkit/glue/webwidget_impl.h"
42 43
43 using WebKit::WebInputEvent; 44 using WebKit::WebInputEvent;
44 using WebKit::WebMouseEvent; 45 using WebKit::WebMouseEvent;
45 46
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 void ChromeClientImpl::addMessageToConsole(const WebCore::String& message, 280 void ChromeClientImpl::addMessageToConsole(const WebCore::String& message,
280 unsigned int line_no, 281 unsigned int line_no,
281 const WebCore::String& source_id) { 282 const WebCore::String& source_id) {
282 WebViewDelegate* delegate = webview_->delegate(); 283 WebViewDelegate* delegate = webview_->delegate();
283 if (delegate) { 284 if (delegate) {
284 std::wstring wstr_message = webkit_glue::StringToStdWString(message); 285 std::wstring wstr_message = webkit_glue::StringToStdWString(message);
285 std::wstring wstr_source_id = webkit_glue::StringToStdWString(source_id); 286 std::wstring wstr_source_id = webkit_glue::StringToStdWString(source_id);
286 delegate->AddMessageToConsole(webview_, wstr_message, 287 delegate->AddMessageToConsole(webview_, wstr_message,
287 line_no, wstr_source_id); 288 line_no, wstr_source_id);
288 } 289 }
290 WebDevToolsAgentImpl* devtools_agent = webview_->GetWebDevToolsAgentImpl();
291 if (devtools_agent) {
292 devtools_agent->AddMessageToConsole(message, source_id, line_no);
293 }
289 } 294 }
290 295
291 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() { 296 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() {
292 return webview_->delegate() != NULL; 297 return webview_->delegate() != NULL;
293 } 298 }
294 299
295 bool ChromeClientImpl::runBeforeUnloadConfirmPanel( 300 bool ChromeClientImpl::runBeforeUnloadConfirmPanel(
296 const WebCore::String& message, 301 const WebCore::String& message,
297 WebCore::Frame* frame) { 302 WebCore::Frame* frame) {
298 WebViewDelegate* delegate = webview_->delegate(); 303 WebViewDelegate* delegate = webview_->delegate();
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 WebViewDelegate* delegate = webview_->delegate(); 602 WebViewDelegate* delegate = webview_->delegate();
598 if (delegate) 603 if (delegate)
599 delegate->DisableSuddenTermination(); 604 delegate->DisableSuddenTermination();
600 } 605 }
601 606
602 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { 607 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) {
603 WebViewDelegate* delegate = webview_->delegate(); 608 WebViewDelegate* delegate = webview_->delegate();
604 if (delegate) 609 if (delegate)
605 delegate->OnNavStateChanged(webview_); 610 delegate->OnNavStateChanged(webview_);
606 } 611 }
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/devtools/js/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698