OLD | NEW |
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 "AccessibilityObject.h" | 10 #include "AccessibilityObject.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #if USE(V8) | 27 #if USE(V8) |
28 #include "v8_proxy.h" | 28 #include "v8_proxy.h" |
29 #endif | 29 #endif |
30 MSVC_POP_WARNING(); | 30 MSVC_POP_WARNING(); |
31 | 31 |
32 #undef LOG | 32 #undef LOG |
33 | 33 |
34 #include "webkit/glue/chrome_client_impl.h" | 34 #include "webkit/glue/chrome_client_impl.h" |
35 | 35 |
36 #include "base/gfx/rect.h" | 36 #include "base/gfx/rect.h" |
| 37 #include "base/logging.h" |
37 #include "googleurl/src/gurl.h" | 38 #include "googleurl/src/gurl.h" |
38 #include "webkit/api/public/WebInputEvent.h" | 39 #include "webkit/api/public/WebInputEvent.h" |
39 #include "webkit/api/public/WebKit.h" | 40 #include "webkit/api/public/WebKit.h" |
40 #include "webkit/glue/glue_util.h" | 41 #include "webkit/glue/glue_util.h" |
41 #include "webkit/glue/webdevtoolsagent_impl.h" | |
42 #include "webkit/glue/webframe_impl.h" | 42 #include "webkit/glue/webframe_impl.h" |
43 #include "webkit/glue/webkit_glue.h" | 43 #include "webkit/glue/webkit_glue.h" |
44 #include "webkit/glue/weburlrequest_impl.h" | 44 #include "webkit/glue/weburlrequest_impl.h" |
45 #include "webkit/glue/webview_delegate.h" | 45 #include "webkit/glue/webview_delegate.h" |
46 #include "webkit/glue/webview_impl.h" | 46 #include "webkit/glue/webview_impl.h" |
47 #include "webkit/glue/webwidget_impl.h" | 47 #include "webkit/glue/webwidget_impl.h" |
48 | 48 |
49 using WebKit::WebInputEvent; | 49 using WebKit::WebInputEvent; |
50 using WebKit::WebMouseEvent; | 50 using WebKit::WebMouseEvent; |
51 using WebKit::WebRect; | 51 using WebKit::WebRect; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 const WebCore::String& message, | 311 const WebCore::String& message, |
312 unsigned int line_no, | 312 unsigned int line_no, |
313 const WebCore::String& source_id) { | 313 const WebCore::String& source_id) { |
314 WebViewDelegate* delegate = webview_->delegate(); | 314 WebViewDelegate* delegate = webview_->delegate(); |
315 if (delegate) { | 315 if (delegate) { |
316 std::wstring wstr_message = webkit_glue::StringToStdWString(message); | 316 std::wstring wstr_message = webkit_glue::StringToStdWString(message); |
317 std::wstring wstr_source_id = webkit_glue::StringToStdWString(source_id); | 317 std::wstring wstr_source_id = webkit_glue::StringToStdWString(source_id); |
318 delegate->AddMessageToConsole(webview_, wstr_message, | 318 delegate->AddMessageToConsole(webview_, wstr_message, |
319 line_no, wstr_source_id); | 319 line_no, wstr_source_id); |
320 } | 320 } |
321 WebDevToolsAgentImpl* devtools_agent = webview_->GetWebDevToolsAgentImpl(); | |
322 if (devtools_agent) { | |
323 devtools_agent->AddMessageToConsole(source, level, message, line_no, | |
324 source_id); | |
325 } | |
326 } | 321 } |
327 | 322 |
328 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() { | 323 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() { |
329 return webview_->delegate() != NULL; | 324 return webview_->delegate() != NULL; |
330 } | 325 } |
331 | 326 |
332 bool ChromeClientImpl::runBeforeUnloadConfirmPanel( | 327 bool ChromeClientImpl::runBeforeUnloadConfirmPanel( |
333 const WebCore::String& message, | 328 const WebCore::String& message, |
334 WebCore::Frame* frame) { | 329 WebCore::Frame* frame) { |
335 WebViewDelegate* delegate = webview_->delegate(); | 330 WebViewDelegate* delegate = webview_->delegate(); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 // EventHandler.cpp and since we don't want that we set a flag indicating | 617 // EventHandler.cpp and since we don't want that we set a flag indicating |
623 // that the next SetCursor call is to be ignored. | 618 // that the next SetCursor call is to be ignored. |
624 ignore_next_set_cursor_ = true; | 619 ignore_next_set_cursor_ = true; |
625 } | 620 } |
626 | 621 |
627 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { | 622 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { |
628 WebViewDelegate* delegate = webview_->delegate(); | 623 WebViewDelegate* delegate = webview_->delegate(); |
629 if (delegate) | 624 if (delegate) |
630 delegate->OnNavStateChanged(webview_); | 625 delegate->OnNavStateChanged(webview_); |
631 } | 626 } |
OLD | NEW |