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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(WTF_ARRAY_LENG
TH(kDismissals))); | 869 ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(WTF_ARRAY_LENG
TH(kDismissals))); |
870 | 870 |
871 Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDi
smissal", dismissal * WTF_ARRAY_LENGTH(kDialogs) + dialog, WTF_ARRAY_LENGTH(kDia
logs) * WTF_ARRAY_LENGTH(kDismissals)); | 871 Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDi
smissal", dismissal * WTF_ARRAY_LENGTH(kDialogs) + dialog, WTF_ARRAY_LENGTH(kDia
logs) * WTF_ARRAY_LENGTH(kDismissals)); |
872 | 872 |
873 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag
e + "') during " + kDismissals[dismissal] + "."; | 873 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag
e + "') during " + kDismissals[dismissal] + "."; |
874 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess
age::LevelError, message)); | 874 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess
age::LevelError, message)); |
875 | 875 |
876 return false; | 876 return false; |
877 } | 877 } |
878 | 878 |
879 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents) | 879 void ChromeClientImpl::setEventListenerProperties(WebEventListenerClass eventCla
ss, WebEventListenerProperties properties) |
880 { | 880 { |
881 m_webView->hasTouchEventHandlers(needsTouchEvents); | 881 if (eventClass == WebEventListenerClass::Touch) |
| 882 m_webView->hasTouchEventHandlers(properties != WebEventListenerPropertie
s::Nothing); |
| 883 |
| 884 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) |
| 885 treeView->setEventListenerProperties(eventClass, properties); |
882 } | 886 } |
883 | 887 |
884 void ChromeClientImpl::setHaveWheelEventHandlers(bool hasEventHandlers) | 888 WebEventListenerProperties ChromeClientImpl::eventListenerProperties(WebEventLis
tenerClass eventClass) const |
885 { | 889 { |
886 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) | 890 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) |
887 treeView->setHaveWheelEventHandlers(hasEventHandlers); | 891 return treeView->eventListenerProperties(eventClass); |
888 } | 892 return WebEventListenerProperties::Nothing; |
889 | |
890 bool ChromeClientImpl::haveWheelEventHandlers() const | |
891 { | |
892 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) | |
893 return treeView->haveWheelEventHandlers(); | |
894 return false; | |
895 } | 893 } |
896 | 894 |
897 void ChromeClientImpl::setHaveScrollEventHandlers(bool hasEventHandlers) | 895 void ChromeClientImpl::setHaveScrollEventHandlers(bool hasEventHandlers) |
898 { | 896 { |
899 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) | 897 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) |
900 treeView->setHaveScrollEventHandlers(hasEventHandlers); | 898 treeView->setHaveScrollEventHandlers(hasEventHandlers); |
901 } | 899 } |
902 | 900 |
903 bool ChromeClientImpl::haveScrollEventHandlers() const | 901 bool ChromeClientImpl::haveScrollEventHandlers() const |
904 { | 902 { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 if (m_webView->pageImportanceSignals()) | 1056 if (m_webView->pageImportanceSignals()) |
1059 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); | 1057 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); |
1060 } | 1058 } |
1061 | 1059 |
1062 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() | 1060 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() |
1063 { | 1061 { |
1064 return m_webView->scheduler()->createFrameScheduler().release(); | 1062 return m_webView->scheduler()->createFrameScheduler().release(); |
1065 } | 1063 } |
1066 | 1064 |
1067 } // namespace blink | 1065 } // namespace blink |
OLD | NEW |