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/CompositedSelectionBounds.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" | 67 #include "public/platform/WebSelectionBounds.h" |
68 #include "public/platform/WebURLRequest.h" | 68 #include "public/platform/WebURLRequest.h" |
69 #include "public/web/WebAXObject.h" | 69 #include "public/web/WebAXObject.h" |
70 #include "public/web/WebAutofillClient.h" | 70 #include "public/web/WebAutofillClient.h" |
71 #include "public/web/WebColorChooser.h" | 71 #include "public/web/WebColorChooser.h" |
72 #include "public/web/WebColorSuggestion.h" | 72 #include "public/web/WebColorSuggestion.h" |
73 #include "public/web/WebConsoleMessage.h" | 73 #include "public/web/WebConsoleMessage.h" |
74 #include "public/web/WebFrameClient.h" | 74 #include "public/web/WebFrameClient.h" |
75 #include "public/web/WebInputElement.h" | 75 #include "public/web/WebInputElement.h" |
76 #include "public/web/WebInputEvent.h" | 76 #include "public/web/WebInputEvent.h" |
77 #include "public/web/WebKit.h" | 77 #include "public/web/WebKit.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 ASSERT(bound.layer); | 119 ASSERT(bound.layer); |
120 | 120 |
121 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 121 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
122 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); | 122 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); |
123 result.layerId = bound.layer->platformLayer()->id(); | 123 result.layerId = bound.layer->platformLayer()->id(); |
124 result.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer); | 124 result.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer); |
125 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); | 125 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); |
126 return result; | 126 return result; |
127 } | 127 } |
128 | 128 |
| 129 static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds&
bounds) |
| 130 { |
| 131 WebSelectionBounds result(toWebSelectionBound(bounds.start), toWebSelectionB
ound(bounds.end)); |
| 132 result.isEditable = bounds.isEditable; |
| 133 result.isEditableRegionEmpty = bounds.isEditableRegionEmpty; |
| 134 return result; |
| 135 } |
| 136 |
129 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 137 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
130 : m_webView(webView) | 138 : m_webView(webView) |
131 { | 139 { |
132 } | 140 } |
133 | 141 |
134 ChromeClientImpl::~ChromeClientImpl() | 142 ChromeClientImpl::~ChromeClientImpl() |
135 { | 143 { |
136 } | 144 } |
137 | 145 |
138 void* ChromeClientImpl::webView() const | 146 void* ChromeClientImpl::webView() const |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 724 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
717 { | 725 { |
718 m_webView->exitFullScreenForElement(element); | 726 m_webView->exitFullScreenForElement(element); |
719 } | 727 } |
720 | 728 |
721 void ChromeClientImpl::clearCompositedSelectionBounds() | 729 void ChromeClientImpl::clearCompositedSelectionBounds() |
722 { | 730 { |
723 m_webView->clearCompositedSelectionBounds(); | 731 m_webView->clearCompositedSelectionBounds(); |
724 } | 732 } |
725 | 733 |
726 void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelection
Bound& anchor, const CompositedSelectionBound& focus) | 734 void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelection
Bounds& bounds) |
727 { | 735 { |
728 m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWe
bSelectionBound(focus)); | 736 m_webView->updateCompositedSelectionBounds(toWebSelectionBounds(bounds)); |
729 } | 737 } |
730 | 738 |
731 bool ChromeClientImpl::hasOpenedPopup() const | 739 bool ChromeClientImpl::hasOpenedPopup() const |
732 { | 740 { |
733 return m_webView->hasOpenedPopup(); | 741 return m_webView->hasOpenedPopup(); |
734 } | 742 } |
735 | 743 |
736 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame&
frame, PopupMenuClient* client) | 744 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame&
frame, PopupMenuClient* client) |
737 { | 745 { |
738 if (WebViewImpl::useExternalPopupMenus()) | 746 if (WebViewImpl::useExternalPopupMenus()) |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie
w->pinchVirtualViewportEnabled()) | 892 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie
w->pinchVirtualViewportEnabled()) |
885 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); | 893 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); |
886 } | 894 } |
887 | 895 |
888 void ChromeClientImpl::didUpdateTopControls() const | 896 void ChromeClientImpl::didUpdateTopControls() const |
889 { | 897 { |
890 m_webView->didUpdateTopControls(); | 898 m_webView->didUpdateTopControls(); |
891 } | 899 } |
892 | 900 |
893 } // namespace blink | 901 } // namespace blink |
OLD | NEW |