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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 #include "public/web/WebSettings.h" | 86 #include "public/web/WebSettings.h" |
87 #include "public/web/WebTextDirection.h" | 87 #include "public/web/WebTextDirection.h" |
88 #include "public/web/WebTouchAction.h" | 88 #include "public/web/WebTouchAction.h" |
89 #include "public/web/WebUserGestureIndicator.h" | 89 #include "public/web/WebUserGestureIndicator.h" |
90 #include "public/web/WebUserGestureToken.h" | 90 #include "public/web/WebUserGestureToken.h" |
91 #include "public/web/WebViewClient.h" | 91 #include "public/web/WebViewClient.h" |
92 #include "public/web/WebWindowFeatures.h" | 92 #include "public/web/WebWindowFeatures.h" |
93 #include "web/ColorChooserPopupUIController.h" | 93 #include "web/ColorChooserPopupUIController.h" |
94 #include "web/ColorChooserUIController.h" | 94 #include "web/ColorChooserUIController.h" |
95 #include "web/DateTimeChooserImpl.h" | 95 #include "web/DateTimeChooserImpl.h" |
| 96 #include "web/DevToolsEmulator.h" |
96 #include "web/ExternalDateTimeChooser.h" | 97 #include "web/ExternalDateTimeChooser.h" |
97 #include "web/ExternalPopupMenu.h" | 98 #include "web/ExternalPopupMenu.h" |
98 #include "web/PopupMenuImpl.h" | 99 #include "web/PopupMenuImpl.h" |
99 #include "web/WebFileChooserCompletionImpl.h" | 100 #include "web/WebFileChooserCompletionImpl.h" |
100 #include "web/WebFrameWidgetImpl.h" | 101 #include "web/WebFrameWidgetImpl.h" |
101 #include "web/WebInputEventConversion.h" | 102 #include "web/WebInputEventConversion.h" |
102 #include "web/WebLocalFrameImpl.h" | 103 #include "web/WebLocalFrameImpl.h" |
103 #include "web/WebPluginContainerImpl.h" | 104 #include "web/WebPluginContainerImpl.h" |
104 #include "web/WebSettingsImpl.h" | 105 #include "web/WebSettingsImpl.h" |
105 #include "web/WebViewImpl.h" | 106 #include "web/WebViewImpl.h" |
| 107 #include "wtf/Optional.h" |
106 #include "wtf/PtrUtil.h" | 108 #include "wtf/PtrUtil.h" |
107 #include "wtf/text/CString.h" | 109 #include "wtf/text/CString.h" |
108 #include "wtf/text/CharacterNames.h" | 110 #include "wtf/text/CharacterNames.h" |
109 #include "wtf/text/StringBuilder.h" | 111 #include "wtf/text/StringBuilder.h" |
110 #include "wtf/text/StringConcatenate.h" | 112 #include "wtf/text/StringConcatenate.h" |
111 #include <memory> | 113 #include <memory> |
112 | 114 |
113 namespace blink { | 115 namespace blink { |
114 | 116 |
115 namespace { | 117 namespace { |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 WebFloatRect viewportRect(0, 0, scalarValue, 0); | 588 WebFloatRect viewportRect(0, 0, scalarValue, 0); |
587 m_webView->client()->convertWindowToViewport(&viewportRect); | 589 m_webView->client()->convertWindowToViewport(&viewportRect); |
588 return viewportRect.width; | 590 return viewportRect.width; |
589 } | 591 } |
590 | 592 |
591 WebScreenInfo ChromeClientImpl::screenInfo() const | 593 WebScreenInfo ChromeClientImpl::screenInfo() const |
592 { | 594 { |
593 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn
fo(); | 595 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn
fo(); |
594 } | 596 } |
595 | 597 |
| 598 WTF::Optional<IntRect> ChromeClientImpl::visibleContentRectForPainting() const |
| 599 { |
| 600 return m_webView->devToolsEmulator()->visibleContentRectForPainting(); |
| 601 } |
| 602 |
596 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz
e) const | 603 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz
e) const |
597 { | 604 { |
598 m_webView->didChangeContentsSize(); | 605 m_webView->didChangeContentsSize(); |
599 | 606 |
600 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); | 607 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); |
601 webframe->didChangeContentsSize(size); | 608 webframe->didChangeContentsSize(size); |
602 } | 609 } |
603 | 610 |
604 void ChromeClientImpl::pageScaleFactorChanged() const | 611 void ChromeClientImpl::pageScaleFactorChanged() const |
605 { | 612 { |
606 m_webView->pageScaleFactorChanged(); | 613 m_webView->pageScaleFactorChanged(); |
607 } | 614 } |
608 | 615 |
| 616 void ChromeClientImpl::mainFrameScrollOffsetChanged() const |
| 617 { |
| 618 m_webView->mainFrameScrollOffsetChanged(); |
| 619 } |
| 620 |
609 float ChromeClientImpl::clampPageScaleFactorToLimits(float scale) const | 621 float ChromeClientImpl::clampPageScaleFactorToLimits(float scale) const |
610 { | 622 { |
611 return m_webView->clampPageScaleFactorToLimits(scale); | 623 return m_webView->clampPageScaleFactorToLimits(scale); |
612 } | 624 } |
613 | 625 |
614 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const | 626 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const |
615 { | 627 { |
616 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); | 628 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); |
617 } | 629 } |
618 | 630 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 { | 1106 { |
1095 return wrapUnique(m_webView->scheduler()->createFrameScheduler(blameContext)
.release()); | 1107 return wrapUnique(m_webView->scheduler()->createFrameScheduler(blameContext)
.release()); |
1096 } | 1108 } |
1097 | 1109 |
1098 double ChromeClientImpl::lastFrameTimeMonotonic() const | 1110 double ChromeClientImpl::lastFrameTimeMonotonic() const |
1099 { | 1111 { |
1100 return m_webView->lastFrameTimeMonotonic(); | 1112 return m_webView->lastFrameTimeMonotonic(); |
1101 } | 1113 } |
1102 | 1114 |
1103 } // namespace blink | 1115 } // namespace blink |
OLD | NEW |