Chromium Code Reviews| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after 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) | 117 static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds& bound) |
|
mfomitchev
2015/02/17 22:25:51
This doesn't need to be changed, right?
jdduke (slow)
2015/02/17 22:28:50
Oops, yeah this was a typo, I never actually compi
| |
| 118 { | 118 { |
| 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.length = bounds.length; | |
| 133 result.isEditable = bounds.isEditable; | |
| 134 result.isUserTriggered = bounds.isUserTriggered; | |
| 135 return result; | |
| 136 } | |
| 137 | |
| 129 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 138 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| 130 : m_webView(webView) | 139 : m_webView(webView) |
| 131 { | 140 { |
| 132 } | 141 } |
| 133 | 142 |
| 134 ChromeClientImpl::~ChromeClientImpl() | 143 ChromeClientImpl::~ChromeClientImpl() |
| 135 { | 144 { |
| 136 } | 145 } |
| 137 | 146 |
| 138 void* ChromeClientImpl::webView() const | 147 void* ChromeClientImpl::webView() const |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 727 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 736 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
| 728 { | 737 { |
| 729 m_webView->exitFullScreenForElement(element); | 738 m_webView->exitFullScreenForElement(element); |
| 730 } | 739 } |
| 731 | 740 |
| 732 void ChromeClientImpl::clearCompositedSelectionBounds() | 741 void ChromeClientImpl::clearCompositedSelectionBounds() |
| 733 { | 742 { |
| 734 m_webView->clearCompositedSelectionBounds(); | 743 m_webView->clearCompositedSelectionBounds(); |
| 735 } | 744 } |
| 736 | 745 |
| 737 void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelection Bound& anchor, const CompositedSelectionBound& focus) | 746 void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelection Bounds& bounds) |
| 738 { | 747 { |
| 739 m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWe bSelectionBound(focus)); | 748 m_webView->updateCompositedSelectionBounds(toWebSelectionBounds(anchor)); |
|
mfomitchev
2015/02/17 22:25:51
anchor -> bounds
| |
| 740 } | 749 } |
| 741 | 750 |
| 742 bool ChromeClientImpl::hasOpenedPopup() const | 751 bool ChromeClientImpl::hasOpenedPopup() const |
| 743 { | 752 { |
| 744 return m_webView->hasOpenedPopup(); | 753 return m_webView->hasOpenedPopup(); |
| 745 } | 754 } |
| 746 | 755 |
| 747 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) | 756 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) |
| 748 { | 757 { |
| 749 if (WebViewImpl::useExternalPopupMenus()) | 758 if (WebViewImpl::useExternalPopupMenus()) |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 890 webframe->autofillClient()->dataListOptionsChanged(WebInputElement(&inpu t)); | 899 webframe->autofillClient()->dataListOptionsChanged(WebInputElement(&inpu t)); |
| 891 } | 900 } |
| 892 | 901 |
| 893 void ChromeClientImpl::registerViewportLayers() const | 902 void ChromeClientImpl::registerViewportLayers() const |
| 894 { | 903 { |
| 895 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie w->pinchVirtualViewportEnabled()) | 904 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie w->pinchVirtualViewportEnabled()) |
| 896 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); | 905 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); |
| 897 } | 906 } |
| 898 | 907 |
| 899 } // namespace blink | 908 } // namespace blink |
| OLD | NEW |