| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #include "web/WebPopupMenuImpl.h" | 100 #include "web/WebPopupMenuImpl.h" |
| 101 #include "web/WebSettingsImpl.h" | 101 #include "web/WebSettingsImpl.h" |
| 102 #include "web/WebViewImpl.h" | 102 #include "web/WebViewImpl.h" |
| 103 #include "wtf/text/CString.h" | 103 #include "wtf/text/CString.h" |
| 104 #include "wtf/text/StringBuilder.h" | 104 #include "wtf/text/StringBuilder.h" |
| 105 #include "wtf/text/StringConcatenate.h" | 105 #include "wtf/text/StringConcatenate.h" |
| 106 #include "wtf/unicode/CharacterNames.h" | 106 #include "wtf/unicode/CharacterNames.h" |
| 107 | 107 |
| 108 namespace blink { | 108 namespace blink { |
| 109 | 109 |
| 110 class WebCompositorAnimationTimeline; |
| 111 |
| 110 // Converts a AXObjectCache::AXNotification to a WebAXEvent | 112 // Converts a AXObjectCache::AXNotification to a WebAXEvent |
| 111 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) | 113 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
| 112 { | 114 { |
| 113 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 115 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 114 return static_cast<WebAXEvent>(notification); | 116 return static_cast<WebAXEvent>(notification); |
| 115 } | 117 } |
| 116 | 118 |
| 117 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
nd) | 119 static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
nd) |
| 118 { | 120 { |
| 119 ASSERT(bound.layer); | 121 ASSERT(bound.layer); |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 // lands that instantiates a WebFrameWidget. | 703 // lands that instantiates a WebFrameWidget. |
| 702 if (!webFrame->frameWidget()) { | 704 if (!webFrame->frameWidget()) { |
| 703 m_webView->setRootGraphicsLayer(rootLayer); | 705 m_webView->setRootGraphicsLayer(rootLayer); |
| 704 return; | 706 return; |
| 705 } | 707 } |
| 706 ASSERT(webFrame && webFrame->frameWidget()); | 708 ASSERT(webFrame && webFrame->frameWidget()); |
| 707 webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); | 709 webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); |
| 708 } | 710 } |
| 709 } | 711 } |
| 710 | 712 |
| 713 void ChromeClientImpl::attachCompositorAnimationTimeline(WebCompositorAnimationT
imeline* compositorTimeline, LocalFrame* localRoot) |
| 714 { |
| 715 // FIXME: For top-level frames we still use the WebView as a WebWidget. This
special |
| 716 // case will be removed when top-level frames get WebFrameWidgets. |
| 717 if (localRoot->isMainFrame()) { |
| 718 m_webView->attachCompositorAnimationTimeline(compositorTimeline); |
| 719 } else { |
| 720 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); |
| 721 // FIXME: The following conditional is only needed for staging until the
Chromium patch |
| 722 // lands that instantiates a WebFrameWidget. |
| 723 if (!webFrame->frameWidget()) { |
| 724 m_webView->attachCompositorAnimationTimeline(compositorTimeline); |
| 725 return; |
| 726 } |
| 727 ASSERT(webFrame && webFrame->frameWidget()); |
| 728 webFrame->frameWidget()->attachCompositorAnimationTimeline(compositorTim
eline); |
| 729 } |
| 730 } |
| 731 |
| 732 void ChromeClientImpl::detachCompositorAnimationTimeline(WebCompositorAnimationT
imeline* compositorTimeline, LocalFrame* localRoot) |
| 733 { |
| 734 // FIXME: For top-level frames we still use the WebView as a WebWidget. This
special |
| 735 // case will be removed when top-level frames get WebFrameWidgets. |
| 736 if (localRoot->isMainFrame()) { |
| 737 m_webView->detachCompositorAnimationTimeline(compositorTimeline); |
| 738 } else { |
| 739 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); |
| 740 // FIXME: The following conditional is only needed for staging until the
Chromium patch |
| 741 // lands that instantiates a WebFrameWidget. |
| 742 if (!webFrame->frameWidget()) { |
| 743 m_webView->detachCompositorAnimationTimeline(compositorTimeline); |
| 744 return; |
| 745 } |
| 746 ASSERT(webFrame && webFrame->frameWidget()); |
| 747 webFrame->frameWidget()->detachCompositorAnimationTimeline(compositorTim
eline); |
| 748 } |
| 749 } |
| 750 |
| 711 void ChromeClientImpl::enterFullScreenForElement(Element* element) | 751 void ChromeClientImpl::enterFullScreenForElement(Element* element) |
| 712 { | 752 { |
| 713 m_webView->enterFullScreenForElement(element); | 753 m_webView->enterFullScreenForElement(element); |
| 714 } | 754 } |
| 715 | 755 |
| 716 void ChromeClientImpl::exitFullScreenForElement(Element* element) | 756 void ChromeClientImpl::exitFullScreenForElement(Element* element) |
| 717 { | 757 { |
| 718 m_webView->exitFullScreenForElement(element); | 758 m_webView->exitFullScreenForElement(element); |
| 719 } | 759 } |
| 720 | 760 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) | 931 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) |
| 892 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); | 932 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); |
| 893 } | 933 } |
| 894 | 934 |
| 895 void ChromeClientImpl::didUpdateTopControls() const | 935 void ChromeClientImpl::didUpdateTopControls() const |
| 896 { | 936 { |
| 897 m_webView->didUpdateTopControls(); | 937 m_webView->didUpdateTopControls(); |
| 898 } | 938 } |
| 899 | 939 |
| 900 } // namespace blink | 940 } // namespace blink |
| OLD | NEW |