| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "core/layout/HitTestResult.h" | 49 #include "core/layout/HitTestResult.h" |
| 50 #include "core/layout/LayoutPart.h" | 50 #include "core/layout/LayoutPart.h" |
| 51 #include "core/layout/compositing/CompositedSelection.h" | 51 #include "core/layout/compositing/CompositedSelection.h" |
| 52 #include "core/loader/DocumentLoader.h" | 52 #include "core/loader/DocumentLoader.h" |
| 53 #include "core/loader/FrameLoadRequest.h" | 53 #include "core/loader/FrameLoadRequest.h" |
| 54 #include "core/page/Page.h" | 54 #include "core/page/Page.h" |
| 55 #include "core/page/PopupOpeningObserver.h" | 55 #include "core/page/PopupOpeningObserver.h" |
| 56 #include "modules/accessibility/AXObject.h" | 56 #include "modules/accessibility/AXObject.h" |
| 57 #include "platform/Cursor.h" | 57 #include "platform/Cursor.h" |
| 58 #include "platform/FileChooser.h" | 58 #include "platform/FileChooser.h" |
| 59 #include "platform/Histogram.h" |
| 59 #include "platform/KeyboardCodes.h" | 60 #include "platform/KeyboardCodes.h" |
| 60 #include "platform/RuntimeEnabledFeatures.h" | 61 #include "platform/RuntimeEnabledFeatures.h" |
| 61 #include "platform/exported/WrappedResourceRequest.h" | 62 #include "platform/exported/WrappedResourceRequest.h" |
| 62 #include "platform/geometry/IntRect.h" | 63 #include "platform/geometry/IntRect.h" |
| 63 #include "platform/graphics/GraphicsLayer.h" | 64 #include "platform/graphics/GraphicsLayer.h" |
| 64 #include "platform/weborigin/SecurityOrigin.h" | 65 #include "platform/weborigin/SecurityOrigin.h" |
| 65 #include "public/platform/Platform.h" | |
| 66 #include "public/platform/WebCursorInfo.h" | 66 #include "public/platform/WebCursorInfo.h" |
| 67 #include "public/platform/WebFloatRect.h" | 67 #include "public/platform/WebFloatRect.h" |
| 68 #include "public/platform/WebFrameScheduler.h" | 68 #include "public/platform/WebFrameScheduler.h" |
| 69 #include "public/platform/WebRect.h" | 69 #include "public/platform/WebRect.h" |
| 70 #include "public/platform/WebURLRequest.h" | 70 #include "public/platform/WebURLRequest.h" |
| 71 #include "public/platform/WebViewScheduler.h" | 71 #include "public/platform/WebViewScheduler.h" |
| 72 #include "public/web/WebAXObject.h" | 72 #include "public/web/WebAXObject.h" |
| 73 #include "public/web/WebAutofillClient.h" | 73 #include "public/web/WebAutofillClient.h" |
| 74 #include "public/web/WebColorChooser.h" | 74 #include "public/web/WebColorChooser.h" |
| 75 #include "public/web/WebColorSuggestion.h" | 75 #include "public/web/WebColorSuggestion.h" |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 const char* const kDialogs[] = { "alert", "confirm", "prompt" }; | 861 const char* const kDialogs[] = { "alert", "confirm", "prompt" }; |
| 862 int dialog = static_cast<int>(dialogType); | 862 int dialog = static_cast<int>(dialogType); |
| 863 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog); | 863 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog); |
| 864 ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(WTF_ARRAY_LENGTH(
kDialogs))); | 864 ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(WTF_ARRAY_LENGTH(
kDialogs))); |
| 865 | 865 |
| 866 const char* const kDismissals[] = { "beforeunload", "pagehide", "unload" }; | 866 const char* const kDismissals[] = { "beforeunload", "pagehide", "unload" }; |
| 867 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal. | 867 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal. |
| 868 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal); | 868 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal); |
| 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 DEFINE_STATIC_LOCAL(EnumerationHistogram, dialogDismissalHistogram, ("Render
er.ModalDialogsDuringPageDismissal", WTF_ARRAY_LENGTH(kDialogs) * WTF_ARRAY_LENG
TH(kDismissals))); |
| 872 dialogDismissalHistogram.count(dismissal * WTF_ARRAY_LENGTH(kDialogs) + dial
og); |
| 872 | 873 |
| 873 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag
e + "') during " + kDismissals[dismissal] + "."; | 874 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag
e + "') during " + kDismissals[dismissal] + "."; |
| 874 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess
age::LevelError, message)); | 875 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess
age::LevelError, message)); |
| 875 | 876 |
| 876 return false; | 877 return false; |
| 877 } | 878 } |
| 878 | 879 |
| 879 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents) | 880 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents) |
| 880 { | 881 { |
| 881 m_webView->hasTouchEventHandlers(needsTouchEvents); | 882 m_webView->hasTouchEventHandlers(needsTouchEvents); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 if (m_webView->pageImportanceSignals()) | 1059 if (m_webView->pageImportanceSignals()) |
| 1059 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); | 1060 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); |
| 1060 } | 1061 } |
| 1061 | 1062 |
| 1062 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() | 1063 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() |
| 1063 { | 1064 { |
| 1064 return m_webView->scheduler()->createFrameScheduler().release(); | 1065 return m_webView->scheduler()->createFrameScheduler().release(); |
| 1065 } | 1066 } |
| 1066 | 1067 |
| 1067 } // namespace blink | 1068 } // namespace blink |
| OLD | NEW |