| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #include "public/web/WebTextDirection.h" | 97 #include "public/web/WebTextDirection.h" |
| 98 #include "public/web/WebTouchAction.h" | 98 #include "public/web/WebTouchAction.h" |
| 99 #include "public/web/WebUserGestureIndicator.h" | 99 #include "public/web/WebUserGestureIndicator.h" |
| 100 #include "public/web/WebUserGestureToken.h" | 100 #include "public/web/WebUserGestureToken.h" |
| 101 #include "public/web/WebViewClient.h" | 101 #include "public/web/WebViewClient.h" |
| 102 #include "public/web/WebWindowFeatures.h" | 102 #include "public/web/WebWindowFeatures.h" |
| 103 #include "web/AudioOutputDeviceClientImpl.h" | 103 #include "web/AudioOutputDeviceClientImpl.h" |
| 104 #include "web/ColorChooserPopupUIController.h" | 104 #include "web/ColorChooserPopupUIController.h" |
| 105 #include "web/ColorChooserUIController.h" | 105 #include "web/ColorChooserUIController.h" |
| 106 #include "web/DateTimeChooserImpl.h" | 106 #include "web/DateTimeChooserImpl.h" |
| 107 #include "web/DevToolsEmulator.h" |
| 107 #include "web/ExternalDateTimeChooser.h" | 108 #include "web/ExternalDateTimeChooser.h" |
| 108 #include "web/ExternalPopupMenu.h" | 109 #include "web/ExternalPopupMenu.h" |
| 109 #include "web/IndexedDBClientImpl.h" | 110 #include "web/IndexedDBClientImpl.h" |
| 110 #include "web/LocalFileSystemClient.h" | 111 #include "web/LocalFileSystemClient.h" |
| 111 #include "web/NavigatorContentUtilsClientImpl.h" | 112 #include "web/NavigatorContentUtilsClientImpl.h" |
| 112 #include "web/NotificationPermissionClientImpl.h" | 113 #include "web/NotificationPermissionClientImpl.h" |
| 113 #include "web/PopupMenuImpl.h" | 114 #include "web/PopupMenuImpl.h" |
| 114 #include "web/WebFileChooserCompletionImpl.h" | 115 #include "web/WebFileChooserCompletionImpl.h" |
| 115 #include "web/WebFrameWidgetImpl.h" | 116 #include "web/WebFrameWidgetImpl.h" |
| 116 #include "web/WebInputEventConversion.h" | 117 #include "web/WebInputEventConversion.h" |
| 117 #include "web/WebLocalFrameImpl.h" | 118 #include "web/WebLocalFrameImpl.h" |
| 118 #include "web/WebPluginContainerImpl.h" | 119 #include "web/WebPluginContainerImpl.h" |
| 119 #include "web/WebSettingsImpl.h" | 120 #include "web/WebSettingsImpl.h" |
| 120 #include "web/WebViewImpl.h" | 121 #include "web/WebViewImpl.h" |
| 122 #include "wtf/Optional.h" |
| 121 #include "wtf/PtrUtil.h" | 123 #include "wtf/PtrUtil.h" |
| 122 #include "wtf/text/CString.h" | 124 #include "wtf/text/CString.h" |
| 123 #include "wtf/text/CharacterNames.h" | 125 #include "wtf/text/CharacterNames.h" |
| 124 #include "wtf/text/StringBuilder.h" | 126 #include "wtf/text/StringBuilder.h" |
| 125 #include "wtf/text/StringConcatenate.h" | 127 #include "wtf/text/StringConcatenate.h" |
| 126 #include <memory> | 128 #include <memory> |
| 127 | 129 |
| 128 namespace blink { | 130 namespace blink { |
| 129 | 131 |
| 130 namespace { | 132 namespace { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 WebFloatRect viewportRect(0, 0, scalarValue, 0); | 603 WebFloatRect viewportRect(0, 0, scalarValue, 0); |
| 602 m_webView->client()->convertWindowToViewport(&viewportRect); | 604 m_webView->client()->convertWindowToViewport(&viewportRect); |
| 603 return viewportRect.width; | 605 return viewportRect.width; |
| 604 } | 606 } |
| 605 | 607 |
| 606 WebScreenInfo ChromeClientImpl::screenInfo() const | 608 WebScreenInfo ChromeClientImpl::screenInfo() const |
| 607 { | 609 { |
| 608 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn
fo(); | 610 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn
fo(); |
| 609 } | 611 } |
| 610 | 612 |
| 613 WTF::Optional<IntRect> ChromeClientImpl::visibleContentRectForPainting() const |
| 614 { |
| 615 return m_webView->devToolsEmulator()->visibleContentRectForPainting(); |
| 616 } |
| 617 |
| 611 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz
e) const | 618 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz
e) const |
| 612 { | 619 { |
| 613 m_webView->didChangeContentsSize(); | 620 m_webView->didChangeContentsSize(); |
| 614 | 621 |
| 615 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); | 622 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); |
| 616 webframe->didChangeContentsSize(size); | 623 webframe->didChangeContentsSize(size); |
| 617 } | 624 } |
| 618 | 625 |
| 619 void ChromeClientImpl::pageScaleFactorChanged() const | 626 void ChromeClientImpl::pageScaleFactorChanged() const |
| 620 { | 627 { |
| 621 m_webView->pageScaleFactorChanged(); | 628 m_webView->pageScaleFactorChanged(); |
| 622 } | 629 } |
| 623 | 630 |
| 631 void ChromeClientImpl::mainFrameScrollOffsetChanged() const |
| 632 { |
| 633 m_webView->mainFrameScrollOffsetChanged(); |
| 634 } |
| 635 |
| 624 float ChromeClientImpl::clampPageScaleFactorToLimits(float scale) const | 636 float ChromeClientImpl::clampPageScaleFactorToLimits(float scale) const |
| 625 { | 637 { |
| 626 return m_webView->clampPageScaleFactorToLimits(scale); | 638 return m_webView->clampPageScaleFactorToLimits(scale); |
| 627 } | 639 } |
| 628 | 640 |
| 629 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const | 641 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const |
| 630 { | 642 { |
| 631 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); | 643 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); |
| 632 } | 644 } |
| 633 | 645 |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie
ntationClient() : nullptr); | 1151 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie
ntationClient() : nullptr); |
| 1140 if (RuntimeEnabledFeatures::presentationEnabled()) | 1152 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1141 PresentationController::provideTo(frame, client ? client->presentationCl
ient() : nullptr); | 1153 PresentationController::provideTo(frame, client ? client->presentationCl
ient() : nullptr); |
| 1142 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1154 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| 1143 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre
ate()); | 1155 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre
ate()); |
| 1144 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1156 if (RuntimeEnabledFeatures::installedAppEnabled()) |
| 1145 InstalledAppController::provideTo(frame, client ? client->installedAppCl
ient() : nullptr); | 1157 InstalledAppController::provideTo(frame, client ? client->installedAppCl
ient() : nullptr); |
| 1146 } | 1158 } |
| 1147 | 1159 |
| 1148 } // namespace blink | 1160 } // namespace blink |
| OLD | NEW |