| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 #include "web/WebPluginContainerImpl.h" | 103 #include "web/WebPluginContainerImpl.h" |
| 104 #include "web/WebSettingsImpl.h" | 104 #include "web/WebSettingsImpl.h" |
| 105 #include "web/WebViewImpl.h" | 105 #include "web/WebViewImpl.h" |
| 106 #include "wtf/text/CString.h" | 106 #include "wtf/text/CString.h" |
| 107 #include "wtf/text/CharacterNames.h" | 107 #include "wtf/text/CharacterNames.h" |
| 108 #include "wtf/text/StringBuilder.h" | 108 #include "wtf/text/StringBuilder.h" |
| 109 #include "wtf/text/StringConcatenate.h" | 109 #include "wtf/text/StringConcatenate.h" |
| 110 | 110 |
| 111 namespace blink { | 111 namespace blink { |
| 112 | 112 |
| 113 class WebCompositorAnimationTimeline; | 113 class CompositorAnimationTimeline; |
| 114 | 114 |
| 115 // Converts a AXObjectCache::AXNotification to a WebAXEvent | 115 // Converts a AXObjectCache::AXNotification to a WebAXEvent |
| 116 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) | 116 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
| 117 { | 117 { |
| 118 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 118 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 119 return static_cast<WebAXEvent>(notification); | 119 return static_cast<WebAXEvent>(notification); |
| 120 } | 120 } |
| 121 | 121 |
| 122 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 122 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| 123 : m_webView(webView) | 123 : m_webView(webView) |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } | 759 } |
| 760 } | 760 } |
| 761 | 761 |
| 762 void ChromeClientImpl::didPaint(const PaintArtifact& paintArtifact) | 762 void ChromeClientImpl::didPaint(const PaintArtifact& paintArtifact) |
| 763 { | 763 { |
| 764 // TODO(jbroman): This doesn't handle OOPIF correctly. We probably need a | 764 // TODO(jbroman): This doesn't handle OOPIF correctly. We probably need a |
| 765 // branch for WebFrameWidget, like attachRootGraphicsLayer. | 765 // branch for WebFrameWidget, like attachRootGraphicsLayer. |
| 766 m_webView->paintArtifactCompositor().update(paintArtifact); | 766 m_webView->paintArtifactCompositor().update(paintArtifact); |
| 767 } | 767 } |
| 768 | 768 |
| 769 void ChromeClientImpl::attachCompositorAnimationTimeline(WebCompositorAnimationT
imeline* compositorTimeline, LocalFrame* localRoot) | 769 void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTime
line* compositorTimeline, LocalFrame* localRoot) |
| 770 { | 770 { |
| 771 // FIXME: For top-level frames we still use the WebView as a WebWidget. This | 771 // FIXME: For top-level frames we still use the WebView as a WebWidget. This |
| 772 // special case will be removed when top-level frames get WebFrameWidgets. | 772 // special case will be removed when top-level frames get WebFrameWidgets. |
| 773 if (localRoot->isMainFrame()) { | 773 if (localRoot->isMainFrame()) { |
| 774 m_webView->attachCompositorAnimationTimeline(compositorTimeline); | 774 m_webView->attachCompositorAnimationTimeline(compositorTimeline); |
| 775 } else { | 775 } else { |
| 776 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); | 776 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); |
| 777 // FIXME: The following conditional is only needed for staging until the | 777 // FIXME: The following conditional is only needed for staging until the |
| 778 // Chromium patch lands that instantiates a WebFrameWidget. | 778 // Chromium patch lands that instantiates a WebFrameWidget. |
| 779 if (!webFrame->frameWidget()) { | 779 if (!webFrame->frameWidget()) { |
| 780 m_webView->attachCompositorAnimationTimeline(compositorTimeline); | 780 m_webView->attachCompositorAnimationTimeline(compositorTimeline); |
| 781 return; | 781 return; |
| 782 } | 782 } |
| 783 ASSERT(webFrame); | 783 ASSERT(webFrame); |
| 784 ASSERT(webFrame->frameWidget()); | 784 ASSERT(webFrame->frameWidget()); |
| 785 toWebFrameWidgetImpl(webFrame->frameWidget())->attachCompositorAnimation
Timeline(compositorTimeline); | 785 toWebFrameWidgetImpl(webFrame->frameWidget())->attachCompositorAnimation
Timeline(compositorTimeline); |
| 786 } | 786 } |
| 787 } | 787 } |
| 788 | 788 |
| 789 void ChromeClientImpl::detachCompositorAnimationTimeline(WebCompositorAnimationT
imeline* compositorTimeline, LocalFrame* localRoot) | 789 void ChromeClientImpl::detachCompositorAnimationTimeline(CompositorAnimationTime
line* compositorTimeline, LocalFrame* localRoot) |
| 790 { | 790 { |
| 791 // FIXME: For top-level frames we still use the WebView as a WebWidget. This | 791 // FIXME: For top-level frames we still use the WebView as a WebWidget. This |
| 792 // special case will be removed when top-level frames get WebFrameWidgets. | 792 // special case will be removed when top-level frames get WebFrameWidgets. |
| 793 if (localRoot->isMainFrame()) { | 793 if (localRoot->isMainFrame()) { |
| 794 m_webView->detachCompositorAnimationTimeline(compositorTimeline); | 794 m_webView->detachCompositorAnimationTimeline(compositorTimeline); |
| 795 } else { | 795 } else { |
| 796 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); | 796 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); |
| 797 // FIXME: The following conditional is only needed for staging until the | 797 // FIXME: The following conditional is only needed for staging until the |
| 798 // Chromium patch lands that instantiates a WebFrameWidget. | 798 // Chromium patch lands that instantiates a WebFrameWidget. |
| 799 if (!webFrame->frameWidget()) { | 799 if (!webFrame->frameWidget()) { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 if (m_webView->pageImportanceSignals()) | 1057 if (m_webView->pageImportanceSignals()) |
| 1058 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); | 1058 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() | 1061 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() |
| 1062 { | 1062 { |
| 1063 return m_webView->scheduler()->createFrameScheduler().release(); | 1063 return m_webView->scheduler()->createFrameScheduler().release(); |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 } // namespace blink | 1066 } // namespace blink |
| OLD | NEW |