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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
788 webframe->client()->postAccessibilityEvent(WebAXObject(obj), toWebAXEven t(notification)); | 788 webframe->client()->postAccessibilityEvent(WebAXObject(obj), toWebAXEven t(notification)); |
789 } | 789 } |
790 | 790 |
791 String ChromeClientImpl::acceptLanguages() | 791 String ChromeClientImpl::acceptLanguages() |
792 { | 792 { |
793 return m_webView->client()->acceptLanguages(); | 793 return m_webView->client()->acceptLanguages(); |
794 } | 794 } |
795 | 795 |
796 void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFr ame* localFrame) | 796 void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFr ame* localFrame) |
797 { | 797 { |
798 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | |
798 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca lRoot(); | 799 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca lRoot(); |
799 | 800 |
800 // This method can be called while the frame is being detached. In that | 801 // This method can be called while the frame is being detached. In that |
801 // case, the rootLayer is null, and the widget is already destroyed. | 802 // case, the rootLayer is null, and the widget is already destroyed. |
802 DCHECK(webFrame->frameWidget() || !rootLayer); | 803 DCHECK(webFrame->frameWidget() || !rootLayer); |
803 if (webFrame->frameWidget()) | 804 if (webFrame->frameWidget()) |
804 webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); | 805 webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); |
805 } | 806 } |
806 | 807 |
807 void ChromeClientImpl::didPaint(const PaintArtifact& paintArtifact) | 808 void ChromeClientImpl::attachRootLayer(WebLayer* rootLayer, LocalFrame* localFra me) |
808 { | 809 { |
809 // TODO(jbroman): This doesn't handle OOPIF correctly. We probably need a | 810 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca lRoot(); |
810 // branch for WebFrameWidget, like attachRootGraphicsLayer. | 811 |
811 m_webView->getPaintArtifactCompositor().update(paintArtifact); | 812 // This method can be called while the frame is being detached. In that |
813 // case, the rootLayer is null, and the widget is already destroyed. | |
814 DCHECK(webFrame->frameWidget() || !rootLayer); | |
815 if (webFrame->frameWidget()) | |
816 webFrame->frameWidget()->setRootLayer(rootLayer); | |
817 | |
pdr.
2016/09/15 20:53:08
Nit: extra space
chrishtr
2016/09/15 21:05:39
Done.
| |
812 } | 818 } |
813 | 819 |
814 void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTime line* compositorTimeline, LocalFrame* localFrame) | 820 void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTime line* compositorTimeline, LocalFrame* localFrame) |
815 { | 821 { |
816 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca lRoot(); | 822 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca lRoot(); |
817 webFrame->frameWidget()->attachCompositorAnimationTimeline(compositorTimelin e); | 823 webFrame->frameWidget()->attachCompositorAnimationTimeline(compositorTimelin e); |
818 } | 824 } |
819 | 825 |
820 void ChromeClientImpl::detachCompositorAnimationTimeline(CompositorAnimationTime line* compositorTimeline, LocalFrame* localFrame) | 826 void ChromeClientImpl::detachCompositorAnimationTimeline(CompositorAnimationTime line* compositorTimeline, LocalFrame* localFrame) |
821 { | 827 { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1134 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie ntationClient() : nullptr); | 1140 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie ntationClient() : nullptr); |
1135 if (RuntimeEnabledFeatures::presentationEnabled()) | 1141 if (RuntimeEnabledFeatures::presentationEnabled()) |
1136 PresentationController::provideTo(frame, client ? client->presentationCl ient() : nullptr); | 1142 PresentationController::provideTo(frame, client ? client->presentationCl ient() : nullptr); |
1137 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1143 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
1138 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre ate()); | 1144 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre ate()); |
1139 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1145 if (RuntimeEnabledFeatures::installedAppEnabled()) |
1140 InstalledAppController::provideTo(frame, client ? client->installedAppCl ient() : nullptr); | 1146 InstalledAppController::provideTo(frame, client ? client->installedAppCl ient() : nullptr); |
1141 } | 1147 } |
1142 | 1148 |
1143 } // namespace blink | 1149 } // namespace blink |
OLD | NEW |