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 16 matching lines...) Expand all Loading... |
107 | 107 |
108 namespace blink { | 108 namespace blink { |
109 | 109 |
110 // Converts a AXObjectCache::AXNotification to a WebAXEvent | 110 // Converts a AXObjectCache::AXNotification to a WebAXEvent |
111 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) | 111 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
112 { | 112 { |
113 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 113 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
114 return static_cast<WebAXEvent>(notification); | 114 return static_cast<WebAXEvent>(notification); |
115 } | 115 } |
116 | 116 |
117 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
nd) | |
118 { | |
119 ASSERT(bound.layer); | |
120 | |
121 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | |
122 WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); | |
123 result.layerId = bound.layer->platformLayer()->id(); | |
124 result.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer); | |
125 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); | |
126 return result; | |
127 } | |
128 | |
129 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 117 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
130 : m_webView(webView) | 118 : m_webView(webView) |
131 { | 119 { |
132 } | 120 } |
133 | 121 |
134 ChromeClientImpl::~ChromeClientImpl() | 122 ChromeClientImpl::~ChromeClientImpl() |
135 { | 123 { |
136 } | 124 } |
137 | 125 |
138 void* ChromeClientImpl::webView() const | 126 void* ChromeClientImpl::webView() const |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 void ChromeClientImpl::enterFullScreenForElement(Element* element) | 699 void ChromeClientImpl::enterFullScreenForElement(Element* element) |
712 { | 700 { |
713 m_webView->enterFullScreenForElement(element); | 701 m_webView->enterFullScreenForElement(element); |
714 } | 702 } |
715 | 703 |
716 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 704 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
717 { | 705 { |
718 m_webView->exitFullScreenForElement(element); | 706 m_webView->exitFullScreenForElement(element); |
719 } | 707 } |
720 | 708 |
721 void ChromeClientImpl::clearCompositedSelectionBounds() | 709 void ChromeClientImpl::clearCompositedSelection() |
722 { | 710 { |
723 m_webView->clearCompositedSelectionBounds(); | 711 m_webView->clearCompositedSelection(); |
724 } | 712 } |
725 | 713 |
726 void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelection
Bound& anchor, const CompositedSelectionBound& focus) | 714 void ChromeClientImpl::updateCompositedSelection(const CompositedSelection& sele
ction) |
727 { | 715 { |
728 m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWe
bSelectionBound(focus)); | 716 m_webView->updateCompositedSelection(WebSelection(selection)); |
729 } | 717 } |
730 | 718 |
731 bool ChromeClientImpl::hasOpenedPopup() const | 719 bool ChromeClientImpl::hasOpenedPopup() const |
732 { | 720 { |
733 return m_webView->hasOpenedPopup(); | 721 return m_webView->hasOpenedPopup(); |
734 } | 722 } |
735 | 723 |
736 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame&
frame, PopupMenuClient* client) | 724 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame&
frame, PopupMenuClient* client) |
737 { | 725 { |
738 if (WebViewImpl::useExternalPopupMenus()) | 726 if (WebViewImpl::useExternalPopupMenus()) |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie
w->pinchVirtualViewportEnabled()) | 879 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie
w->pinchVirtualViewportEnabled()) |
892 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); | 880 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); |
893 } | 881 } |
894 | 882 |
895 void ChromeClientImpl::didUpdateTopControls() const | 883 void ChromeClientImpl::didUpdateTopControls() const |
896 { | 884 { |
897 m_webView->didUpdateTopControls(); | 885 m_webView->didUpdateTopControls(); |
898 } | 886 } |
899 | 887 |
900 } // namespace blink | 888 } // namespace blink |
OLD | NEW |