| 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); |
| 812 } | 817 } |
| 813 | 818 |
| 814 void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTime
line* compositorTimeline, LocalFrame* localFrame) | 819 void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTime
line* compositorTimeline, LocalFrame* localFrame) |
| 815 { | 820 { |
| 816 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca
lRoot(); | 821 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->loca
lRoot(); |
| 817 webFrame->frameWidget()->attachCompositorAnimationTimeline(compositorTimelin
e); | 822 webFrame->frameWidget()->attachCompositorAnimationTimeline(compositorTimelin
e); |
| 818 } | 823 } |
| 819 | 824 |
| 820 void ChromeClientImpl::detachCompositorAnimationTimeline(CompositorAnimationTime
line* compositorTimeline, LocalFrame* localFrame) | 825 void ChromeClientImpl::detachCompositorAnimationTimeline(CompositorAnimationTime
line* compositorTimeline, LocalFrame* localFrame) |
| 821 { | 826 { |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie
ntationClient() : nullptr); | 1139 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie
ntationClient() : nullptr); |
| 1135 if (RuntimeEnabledFeatures::presentationEnabled()) | 1140 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1136 PresentationController::provideTo(frame, client ? client->presentationCl
ient() : nullptr); | 1141 PresentationController::provideTo(frame, client ? client->presentationCl
ient() : nullptr); |
| 1137 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1142 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| 1138 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre
ate()); | 1143 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre
ate()); |
| 1139 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1144 if (RuntimeEnabledFeatures::installedAppEnabled()) |
| 1140 InstalledAppController::provideTo(frame, client ? client->installedAppCl
ient() : nullptr); | 1145 InstalledAppController::provideTo(frame, client ? client->installedAppCl
ient() : nullptr); |
| 1141 } | 1146 } |
| 1142 | 1147 |
| 1143 } // namespace blink | 1148 } // namespace blink |
| OLD | NEW |