| 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 30 matching lines...) Expand all Loading... |
| 41 #include "core/frame/Console.h" | 41 #include "core/frame/Console.h" |
| 42 #include "core/frame/FrameHost.h" | 42 #include "core/frame/FrameHost.h" |
| 43 #include "core/frame/FrameView.h" | 43 #include "core/frame/FrameView.h" |
| 44 #include "core/frame/Settings.h" | 44 #include "core/frame/Settings.h" |
| 45 #include "core/html/HTMLInputElement.h" | 45 #include "core/html/HTMLInputElement.h" |
| 46 #include "core/html/forms/ColorChooser.h" | 46 #include "core/html/forms/ColorChooser.h" |
| 47 #include "core/html/forms/ColorChooserClient.h" | 47 #include "core/html/forms/ColorChooserClient.h" |
| 48 #include "core/html/forms/DateTimeChooser.h" | 48 #include "core/html/forms/DateTimeChooser.h" |
| 49 #include "core/layout/HitTestResult.h" | 49 #include "core/layout/HitTestResult.h" |
| 50 #include "core/layout/LayoutPart.h" | 50 #include "core/layout/LayoutPart.h" |
| 51 #include "core/layout/compositing/CompositedSelectionBound.h" | 51 #include "core/layout/compositing/CompositedSelection.h" |
| 52 #include "core/loader/DocumentLoader.h" | 52 #include "core/loader/DocumentLoader.h" |
| 53 #include "core/loader/FrameLoadRequest.h" | 53 #include "core/loader/FrameLoadRequest.h" |
| 54 #include "core/page/Page.h" | 54 #include "core/page/Page.h" |
| 55 #include "modules/accessibility/AXObject.h" | 55 #include "modules/accessibility/AXObject.h" |
| 56 #include "platform/Cursor.h" | 56 #include "platform/Cursor.h" |
| 57 #include "platform/FileChooser.h" | 57 #include "platform/FileChooser.h" |
| 58 #include "platform/PlatformScreen.h" | 58 #include "platform/PlatformScreen.h" |
| 59 #include "platform/RuntimeEnabledFeatures.h" | 59 #include "platform/RuntimeEnabledFeatures.h" |
| 60 #include "platform/exported/WrappedResourceRequest.h" | 60 #include "platform/exported/WrappedResourceRequest.h" |
| 61 #include "platform/geometry/IntRect.h" | 61 #include "platform/geometry/IntRect.h" |
| 62 #include "platform/graphics/GraphicsLayer.h" | 62 #include "platform/graphics/GraphicsLayer.h" |
| 63 #include "platform/weborigin/SecurityOrigin.h" | 63 #include "platform/weborigin/SecurityOrigin.h" |
| 64 #include "public/platform/Platform.h" | 64 #include "public/platform/Platform.h" |
| 65 #include "public/platform/WebCursorInfo.h" | 65 #include "public/platform/WebCursorInfo.h" |
| 66 #include "public/platform/WebRect.h" | 66 #include "public/platform/WebRect.h" |
| 67 #include "public/platform/WebSelectionBound.h" | |
| 68 #include "public/platform/WebURLRequest.h" | 67 #include "public/platform/WebURLRequest.h" |
| 69 #include "public/web/WebAXObject.h" | 68 #include "public/web/WebAXObject.h" |
| 70 #include "public/web/WebAutofillClient.h" | 69 #include "public/web/WebAutofillClient.h" |
| 71 #include "public/web/WebColorChooser.h" | 70 #include "public/web/WebColorChooser.h" |
| 72 #include "public/web/WebColorSuggestion.h" | 71 #include "public/web/WebColorSuggestion.h" |
| 73 #include "public/web/WebConsoleMessage.h" | 72 #include "public/web/WebConsoleMessage.h" |
| 74 #include "public/web/WebFrameClient.h" | 73 #include "public/web/WebFrameClient.h" |
| 75 #include "public/web/WebInputElement.h" | 74 #include "public/web/WebInputElement.h" |
| 76 #include "public/web/WebInputEvent.h" | 75 #include "public/web/WebInputEvent.h" |
| 77 #include "public/web/WebKit.h" | 76 #include "public/web/WebKit.h" |
| 78 #include "public/web/WebNode.h" | 77 #include "public/web/WebNode.h" |
| 79 #include "public/web/WebPlugin.h" | 78 #include "public/web/WebPlugin.h" |
| 80 #include "public/web/WebPopupMenuInfo.h" | 79 #include "public/web/WebPopupMenuInfo.h" |
| 80 #include "public/web/WebSelection.h" |
| 81 #include "public/web/WebSettings.h" | 81 #include "public/web/WebSettings.h" |
| 82 #include "public/web/WebTextDirection.h" | 82 #include "public/web/WebTextDirection.h" |
| 83 #include "public/web/WebTouchAction.h" | 83 #include "public/web/WebTouchAction.h" |
| 84 #include "public/web/WebUserGestureIndicator.h" | 84 #include "public/web/WebUserGestureIndicator.h" |
| 85 #include "public/web/WebUserGestureToken.h" | 85 #include "public/web/WebUserGestureToken.h" |
| 86 #include "public/web/WebViewClient.h" | 86 #include "public/web/WebViewClient.h" |
| 87 #include "public/web/WebWindowFeatures.h" | 87 #include "public/web/WebWindowFeatures.h" |
| 88 #include "web/ColorChooserPopupUIController.h" | 88 #include "web/ColorChooserPopupUIController.h" |
| 89 #include "web/ColorChooserUIController.h" | 89 #include "web/ColorChooserUIController.h" |
| 90 #include "web/DateTimeChooserImpl.h" | 90 #include "web/DateTimeChooserImpl.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 109 | 109 |
| 110 class WebCompositorAnimationTimeline; | 110 class WebCompositorAnimationTimeline; |
| 111 | 111 |
| 112 // Converts a AXObjectCache::AXNotification to a WebAXEvent | 112 // Converts a AXObjectCache::AXNotification to a WebAXEvent |
| 113 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) | 113 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
| 114 { | 114 { |
| 115 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 115 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 116 return static_cast<WebAXEvent>(notification); | 116 return static_cast<WebAXEvent>(notification); |
| 117 } | 117 } |
| 118 | 118 |
| 119 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
nd) | |
| 120 { | |
| 121 ASSERT(bound.layer); | |
| 122 | |
| 123 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | |
| 124 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); | |
| 125 result.layerId = bound.layer->platformLayer()->id(); | |
| 126 result.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer); | |
| 127 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); | |
| 128 return result; | |
| 129 } | |
| 130 | |
| 131 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 119 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| 132 : m_webView(webView) | 120 : m_webView(webView) |
| 133 { | 121 { |
| 134 } | 122 } |
| 135 | 123 |
| 136 ChromeClientImpl::~ChromeClientImpl() | 124 ChromeClientImpl::~ChromeClientImpl() |
| 137 { | 125 { |
| 138 } | 126 } |
| 139 | 127 |
| 140 void* ChromeClientImpl::webView() const | 128 void* ChromeClientImpl::webView() const |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 void ChromeClientImpl::enterFullScreenForElement(Element* element) | 739 void ChromeClientImpl::enterFullScreenForElement(Element* element) |
| 752 { | 740 { |
| 753 m_webView->enterFullScreenForElement(element); | 741 m_webView->enterFullScreenForElement(element); |
| 754 } | 742 } |
| 755 | 743 |
| 756 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 744 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
| 757 { | 745 { |
| 758 m_webView->exitFullScreenForElement(element); | 746 m_webView->exitFullScreenForElement(element); |
| 759 } | 747 } |
| 760 | 748 |
| 761 void ChromeClientImpl::clearCompositedSelectionBounds() | 749 void ChromeClientImpl::clearCompositedSelection() |
| 762 { | 750 { |
| 763 m_webView->clearCompositedSelectionBounds(); | 751 m_webView->clearCompositedSelection(); |
| 764 } | 752 } |
| 765 | 753 |
| 766 void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelection
Bound& anchor, const CompositedSelectionBound& focus) | 754 void ChromeClientImpl::updateCompositedSelection(const CompositedSelection& sele
ction) |
| 767 { | 755 { |
| 768 m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWe
bSelectionBound(focus)); | 756 m_webView->updateCompositedSelection(WebSelection(selection)); |
| 769 } | 757 } |
| 770 | 758 |
| 771 bool ChromeClientImpl::hasOpenedPopup() const | 759 bool ChromeClientImpl::hasOpenedPopup() const |
| 772 { | 760 { |
| 773 return m_webView->hasOpenedPopup(); | 761 return m_webView->hasOpenedPopup(); |
| 774 } | 762 } |
| 775 | 763 |
| 776 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame&
frame, PopupMenuClient* client) | 764 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame&
frame, PopupMenuClient* client) |
| 777 { | 765 { |
| 778 if (WebViewImpl::useExternalPopupMenus()) | 766 if (WebViewImpl::useExternalPopupMenus()) |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) | 919 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) |
| 932 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); | 920 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); |
| 933 } | 921 } |
| 934 | 922 |
| 935 void ChromeClientImpl::didUpdateTopControls() const | 923 void ChromeClientImpl::didUpdateTopControls() const |
| 936 { | 924 { |
| 937 m_webView->didUpdateTopControls(); | 925 m_webView->didUpdateTopControls(); |
| 938 } | 926 } |
| 939 | 927 |
| 940 } // namespace blink | 928 } // namespace blink |
| OLD | NEW |