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" |
11 #include "AXObjectCache.h" | 11 #include "AXObjectCache.h" |
12 #include "Console.h" | 12 #include "Console.h" |
13 #include "Cursor.h" | 13 #include "Cursor.h" |
14 #include "Document.h" | 14 #include "Document.h" |
15 #include "DocumentLoader.h" | 15 #include "DocumentLoader.h" |
16 #include "FloatRect.h" | 16 #include "FloatRect.h" |
17 #include "FileChooser.h" | 17 #include "FileChooser.h" |
18 #include "FrameLoadRequest.h" | 18 #include "FrameLoadRequest.h" |
19 #include "FrameView.h" | 19 #include "FrameView.h" |
20 #include "HitTestResult.h" | 20 #include "HitTestResult.h" |
21 #include "IntRect.h" | 21 #include "IntRect.h" |
22 #include "Node.h" | 22 #include "Node.h" |
23 #include "Page.h" | 23 #include "Page.h" |
24 #include "PopupMenuChromium.h" | 24 #include "PopupMenuChromium.h" |
25 #include "ScriptController.h" | 25 #include "ScriptController.h" |
26 #include "WindowFeatures.h" | 26 #include "WindowFeatures.h" |
27 #if USE(V8) | 27 #if USE(V8) |
28 #include "v8_proxy.h" | 28 #include "V8Proxy.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 "base/logging.h" |
38 #include "googleurl/src/gurl.h" | 38 #include "googleurl/src/gurl.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // Although a WebCore::Frame is passed in, we don't actually use it, since we | 354 // Although a WebCore::Frame is passed in, we don't actually use it, since we |
355 // already know our own webview_. | 355 // already know our own webview_. |
356 void ChromeClientImpl::runJavaScriptAlert(WebCore::Frame* frame, | 356 void ChromeClientImpl::runJavaScriptAlert(WebCore::Frame* frame, |
357 const WebCore::String& message) { | 357 const WebCore::String& message) { |
358 // Pass the request on to the WebView delegate, for more control. | 358 // Pass the request on to the WebView delegate, for more control. |
359 WebViewDelegate* delegate = webview_->delegate(); | 359 WebViewDelegate* delegate = webview_->delegate(); |
360 if (delegate) { | 360 if (delegate) { |
361 #if USE(V8) | 361 #if USE(V8) |
362 // Before showing the JavaScript dialog, we give the proxy implementation | 362 // Before showing the JavaScript dialog, we give the proxy implementation |
363 // a chance to process any pending console messages. | 363 // a chance to process any pending console messages. |
364 WebCore::V8Proxy::ProcessConsoleMessages(); | 364 WebCore::V8Proxy::processConsoleMessages(); |
365 #endif | 365 #endif |
366 | 366 |
367 std::wstring wstr = webkit_glue::StringToStdWString(message); | 367 std::wstring wstr = webkit_glue::StringToStdWString(message); |
368 delegate->RunJavaScriptAlert(WebFrameImpl::FromFrame(frame), wstr); | 368 delegate->RunJavaScriptAlert(WebFrameImpl::FromFrame(frame), wstr); |
369 } | 369 } |
370 } | 370 } |
371 | 371 |
372 // See comments for runJavaScriptAlert(). | 372 // See comments for runJavaScriptAlert(). |
373 bool ChromeClientImpl::runJavaScriptConfirm(WebCore::Frame* frame, | 373 bool ChromeClientImpl::runJavaScriptConfirm(WebCore::Frame* frame, |
374 const WebCore::String& message) { | 374 const WebCore::String& message) { |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 // EventHandler.cpp and since we don't want that we set a flag indicating | 620 // EventHandler.cpp and since we don't want that we set a flag indicating |
621 // that the next SetCursor call is to be ignored. | 621 // that the next SetCursor call is to be ignored. |
622 ignore_next_set_cursor_ = true; | 622 ignore_next_set_cursor_ = true; |
623 } | 623 } |
624 | 624 |
625 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { | 625 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { |
626 WebViewDelegate* delegate = webview_->delegate(); | 626 WebViewDelegate* delegate = webview_->delegate(); |
627 if (delegate) | 627 if (delegate) |
628 delegate->OnNavStateChanged(webview_); | 628 delegate->OnNavStateChanged(webview_); |
629 } | 629 } |
OLD | NEW |