| 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 18 matching lines...) Expand all Loading... |
| 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" |
| 39 #include "webkit/api/public/WebCursorInfo.h" |
| 39 #include "webkit/api/public/WebInputEvent.h" | 40 #include "webkit/api/public/WebInputEvent.h" |
| 40 #include "webkit/api/public/WebKit.h" | 41 #include "webkit/api/public/WebKit.h" |
| 41 #include "webkit/api/public/WebRect.h" | 42 #include "webkit/api/public/WebRect.h" |
| 42 #include "webkit/api/public/WebURLRequest.h" | 43 #include "webkit/api/public/WebURLRequest.h" |
| 43 #include "webkit/api/src/WrappedResourceRequest.h" | 44 #include "webkit/api/src/WrappedResourceRequest.h" |
| 44 #include "webkit/glue/glue_util.h" | 45 #include "webkit/glue/glue_util.h" |
| 45 #include "webkit/glue/webframe_impl.h" | 46 #include "webkit/glue/webframe_impl.h" |
| 46 #include "webkit/glue/webkit_glue.h" | 47 #include "webkit/glue/webkit_glue.h" |
| 47 #include "webkit/glue/webview_delegate.h" | 48 #include "webkit/glue/webview_delegate.h" |
| 48 #include "webkit/glue/webview_impl.h" | 49 #include "webkit/glue/webview_impl.h" |
| 49 #include "webkit/glue/webwidget_impl.h" | 50 #include "webkit/glue/webwidget_impl.h" |
| 50 | 51 |
| 52 using WebKit::WebCursorInfo; |
| 51 using WebKit::WebInputEvent; | 53 using WebKit::WebInputEvent; |
| 52 using WebKit::WebMouseEvent; | 54 using WebKit::WebMouseEvent; |
| 53 using WebKit::WebRect; | 55 using WebKit::WebRect; |
| 54 using WebKit::WebURLRequest; | 56 using WebKit::WebURLRequest; |
| 55 using WebKit::WrappedResourceRequest; | 57 using WebKit::WrappedResourceRequest; |
| 56 | 58 |
| 57 // Callback class that's given to the WebViewDelegate during a file choose | 59 // Callback class that's given to the WebViewDelegate during a file choose |
| 58 // operation. | 60 // operation. |
| 59 class WebFileChooserCallbackImpl : public WebFileChooserCallback { | 61 class WebFileChooserCallbackImpl : public WebFileChooserCallback { |
| 60 public: | 62 public: |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 popup_items.push_back(menu_item); | 598 popup_items.push_back(menu_item); |
| 597 } | 599 } |
| 598 | 600 |
| 599 webwidget->InitWithItems(popup_container, | 601 webwidget->InitWithItems(popup_container, |
| 600 webkit_glue::IntRectToWebRect(bounds), | 602 webkit_glue::IntRectToWebRect(bounds), |
| 601 popup_container->menuItemHeight(), | 603 popup_container->menuItemHeight(), |
| 602 popup_container->selectedIndex(), | 604 popup_container->selectedIndex(), |
| 603 popup_items); | 605 popup_items); |
| 604 } | 606 } |
| 605 | 607 |
| 606 void ChromeClientImpl::SetCursor(const WebCursor& cursor) { | 608 void ChromeClientImpl::SetCursor(const WebCursorInfo& cursor) { |
| 607 if (ignore_next_set_cursor_) { | 609 if (ignore_next_set_cursor_) { |
| 608 ignore_next_set_cursor_ = false; | 610 ignore_next_set_cursor_ = false; |
| 609 return; | 611 return; |
| 610 } | 612 } |
| 611 | 613 |
| 612 WebViewDelegate* delegate = webview_->delegate(); | 614 WebViewDelegate* delegate = webview_->delegate(); |
| 613 if (delegate) | 615 if (delegate) |
| 614 delegate->SetCursor(webview_, cursor); | 616 delegate->SetCursor(webview_, cursor); |
| 615 } | 617 } |
| 616 | 618 |
| 617 void ChromeClientImpl::SetCursorForPlugin(const WebCursor& cursor) { | 619 void ChromeClientImpl::SetCursorForPlugin(const WebCursorInfo& cursor) { |
| 618 SetCursor(cursor); | 620 SetCursor(cursor); |
| 619 // Currently, Widget::setCursor is always called after this function in | 621 // Currently, Widget::setCursor is always called after this function in |
| 620 // EventHandler.cpp and since we don't want that we set a flag indicating | 622 // EventHandler.cpp and since we don't want that we set a flag indicating |
| 621 // that the next SetCursor call is to be ignored. | 623 // that the next SetCursor call is to be ignored. |
| 622 ignore_next_set_cursor_ = true; | 624 ignore_next_set_cursor_ = true; |
| 623 } | 625 } |
| 624 | 626 |
| 625 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { | 627 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { |
| 626 WebViewDelegate* delegate = webview_->delegate(); | 628 WebViewDelegate* delegate = webview_->delegate(); |
| 627 if (delegate) | 629 if (delegate) |
| 628 delegate->OnNavStateChanged(webview_); | 630 delegate->OnNavStateChanged(webview_); |
| 629 } | 631 } |
| OLD | NEW |