| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "core/frame/Settings.h" | 47 #include "core/frame/Settings.h" |
| 48 #include "core/html/HTMLInputElement.h" | 48 #include "core/html/HTMLInputElement.h" |
| 49 #include "core/loader/DocumentLoader.h" | 49 #include "core/loader/DocumentLoader.h" |
| 50 #include "core/loader/FrameLoadRequest.h" | 50 #include "core/loader/FrameLoadRequest.h" |
| 51 #include "core/page/Page.h" | 51 #include "core/page/Page.h" |
| 52 #include "core/page/PagePopupDriver.h" | 52 #include "core/page/PagePopupDriver.h" |
| 53 #include "core/page/WindowFeatures.h" | 53 #include "core/page/WindowFeatures.h" |
| 54 #include "core/rendering/HitTestResult.h" | 54 #include "core/rendering/HitTestResult.h" |
| 55 #include "core/rendering/RenderPart.h" | 55 #include "core/rendering/RenderPart.h" |
| 56 #include "core/rendering/RenderWidget.h" | 56 #include "core/rendering/RenderWidget.h" |
| 57 #include "core/rendering/compositing/CompositedSelectionBound.h" |
| 57 #include "platform/ColorChooser.h" | 58 #include "platform/ColorChooser.h" |
| 58 #include "platform/ColorChooserClient.h" | 59 #include "platform/ColorChooserClient.h" |
| 59 #include "platform/Cursor.h" | 60 #include "platform/Cursor.h" |
| 60 #include "platform/DateTimeChooser.h" | 61 #include "platform/DateTimeChooser.h" |
| 61 #include "platform/FileChooser.h" | 62 #include "platform/FileChooser.h" |
| 62 #include "platform/NotImplemented.h" | 63 #include "platform/NotImplemented.h" |
| 63 #include "platform/PlatformScreen.h" | 64 #include "platform/PlatformScreen.h" |
| 64 #include "platform/RuntimeEnabledFeatures.h" | 65 #include "platform/RuntimeEnabledFeatures.h" |
| 65 #include "platform/exported/WrappedResourceRequest.h" | 66 #include "platform/exported/WrappedResourceRequest.h" |
| 66 #include "platform/geometry/FloatRect.h" | 67 #include "platform/geometry/FloatRect.h" |
| 67 #include "platform/geometry/IntRect.h" | 68 #include "platform/geometry/IntRect.h" |
| 68 #include "platform/graphics/GraphicsLayer.h" | 69 #include "platform/graphics/GraphicsLayer.h" |
| 69 #include "platform/weborigin/SecurityOrigin.h" | 70 #include "platform/weborigin/SecurityOrigin.h" |
| 70 #include "public/platform/Platform.h" | 71 #include "public/platform/Platform.h" |
| 71 #include "public/platform/WebCursorInfo.h" | 72 #include "public/platform/WebCursorInfo.h" |
| 72 #include "public/platform/WebRect.h" | 73 #include "public/platform/WebRect.h" |
| 74 #include "public/platform/WebSelectionBound.h" |
| 73 #include "public/platform/WebURLRequest.h" | 75 #include "public/platform/WebURLRequest.h" |
| 74 #include "public/web/WebAXObject.h" | 76 #include "public/web/WebAXObject.h" |
| 75 #include "public/web/WebAutofillClient.h" | 77 #include "public/web/WebAutofillClient.h" |
| 76 #include "public/web/WebColorChooser.h" | 78 #include "public/web/WebColorChooser.h" |
| 77 #include "public/web/WebColorSuggestion.h" | 79 #include "public/web/WebColorSuggestion.h" |
| 78 #include "public/web/WebConsoleMessage.h" | 80 #include "public/web/WebConsoleMessage.h" |
| 79 #include "public/web/WebFrameClient.h" | 81 #include "public/web/WebFrameClient.h" |
| 80 #include "public/web/WebInputElement.h" | 82 #include "public/web/WebInputElement.h" |
| 81 #include "public/web/WebInputEvent.h" | 83 #include "public/web/WebInputEvent.h" |
| 82 #include "public/web/WebKit.h" | 84 #include "public/web/WebKit.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 112 | 114 |
| 113 namespace blink { | 115 namespace blink { |
| 114 | 116 |
| 115 // Converts a blink::AXObjectCache::AXNotification to a blink::WebAXEvent | 117 // Converts a blink::AXObjectCache::AXNotification to a blink::WebAXEvent |
| 116 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) | 118 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
| 117 { | 119 { |
| 118 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 120 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 119 return static_cast<WebAXEvent>(notification); | 121 return static_cast<WebAXEvent>(notification); |
| 120 } | 122 } |
| 121 | 123 |
| 124 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
nd) |
| 125 { |
| 126 ASSERT(bound.layer); |
| 127 |
| 128 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 129 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); |
| 130 result.layerId = bound.layer->platformLayer()->id(); |
| 131 result.edgeRectInLayer = bound.edgeRectInLayer; |
| 132 return result; |
| 133 } |
| 134 |
| 122 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 135 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| 123 : m_webView(webView) | 136 : m_webView(webView) |
| 124 , m_toolbarsVisible(true) | 137 , m_toolbarsVisible(true) |
| 125 , m_statusbarVisible(true) | 138 , m_statusbarVisible(true) |
| 126 , m_scrollbarsVisible(true) | 139 , m_scrollbarsVisible(true) |
| 127 , m_menubarVisible(true) | 140 , m_menubarVisible(true) |
| 128 , m_resizable(true) | 141 , m_resizable(true) |
| 129 , m_pagePopupDriver(webView) | 142 , m_pagePopupDriver(webView) |
| 130 { | 143 { |
| 131 } | 144 } |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 715 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
| 703 { | 716 { |
| 704 m_webView->exitFullScreenForElement(element); | 717 m_webView->exitFullScreenForElement(element); |
| 705 } | 718 } |
| 706 | 719 |
| 707 void ChromeClientImpl::clearCompositedSelectionBounds() | 720 void ChromeClientImpl::clearCompositedSelectionBounds() |
| 708 { | 721 { |
| 709 m_webView->clearCompositedSelectionBounds(); | 722 m_webView->clearCompositedSelectionBounds(); |
| 710 } | 723 } |
| 711 | 724 |
| 725 void ChromeClientImpl::updateCompositedSelectionBounds(const WebCore::Composited
SelectionBound& anchor, const WebCore::CompositedSelectionBound& focus) |
| 726 { |
| 727 m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWe
bSelectionBound(focus)); |
| 728 } |
| 729 |
| 712 bool ChromeClientImpl::hasOpenedPopup() const | 730 bool ChromeClientImpl::hasOpenedPopup() const |
| 713 { | 731 { |
| 714 return m_webView->hasOpenedPopup(); | 732 return m_webView->hasOpenedPopup(); |
| 715 } | 733 } |
| 716 | 734 |
| 717 PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, Popup
MenuClient* client) const | 735 PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, Popup
MenuClient* client) const |
| 718 { | 736 { |
| 719 if (WebViewImpl::useExternalPopupMenus()) | 737 if (WebViewImpl::useExternalPopupMenus()) |
| 720 return adoptRef(new ExternalPopupMenu(frame, client, *m_webView)); | 738 return adoptRef(new ExternalPopupMenu(frame, client, *m_webView)); |
| 721 | 739 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp
utElement)); | 894 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp
utElement)); |
| 877 } | 895 } |
| 878 | 896 |
| 879 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input) | 897 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input) |
| 880 { | 898 { |
| 881 if (m_webView->autofillClient()) | 899 if (m_webView->autofillClient()) |
| 882 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in
put)); | 900 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in
put)); |
| 883 } | 901 } |
| 884 | 902 |
| 885 } // namespace blink | 903 } // namespace blink |
| OLD | NEW |