Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 DOMWindow* ChromeClientImpl::pagePopupWindowForTesting() const 849 DOMWindow* ChromeClientImpl::pagePopupWindowForTesting() const
850 { 850 {
851 return m_webView->pagePopupWindow(); 851 return m_webView->pagePopupWindow();
852 } 852 }
853 853
854 bool ChromeClientImpl::shouldOpenModalDialogDuringPageDismissal(const DialogType & dialogType, const String& dialogMessage, Document::PageDismissalType dismissal Type) const 854 bool ChromeClientImpl::shouldOpenModalDialogDuringPageDismissal(const DialogType & dialogType, const String& dialogMessage, Document::PageDismissalType dismissal Type) const
855 { 855 {
856 const char* kDialogs[] = {"alert", "confirm", "prompt"}; 856 const char* kDialogs[] = {"alert", "confirm", "prompt"};
857 int dialog = static_cast<int>(dialogType); 857 int dialog = static_cast<int>(dialogType);
858 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog); 858 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog);
859 ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(arraysize(kDialog s))); 859 ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(WTF_ARRAY_LENGTH( kDialogs)));
860 860
861 const char* kDismissals[] = {"beforeunload", "pagehide", "unload"}; 861 const char* kDismissals[] = {"beforeunload", "pagehide", "unload"};
862 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal. 862 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal.
863 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal); 863 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal);
864 ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(arraysize(kDis missals))); 864 ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(WTF_ARRAY_LENG TH(kDismissals)));
865 865
866 Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDi smissal", dismissal * arraysize(kDialogs) + dialog, arraysize(kDialogs) * arrays ize(kDismissals)); 866 Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDi smissal", dismissal * WTF_ARRAY_LENGTH(kDialogs) + dialog, WTF_ARRAY_LENGTH(kDia logs) * WTF_ARRAY_LENGTH(kDismissals));
867 867
868 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag e + "') during " + kDismissals[dismissal] + "."; 868 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag e + "') during " + kDismissals[dismissal] + ".";
869 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess age::LevelError, message)); 869 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess age::LevelError, message));
870 870
871 return false; 871 return false;
872 } 872 }
873 873
874 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents) 874 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents)
875 { 875 {
876 m_webView->hasTouchEventHandlers(needsTouchEvents); 876 m_webView->hasTouchEventHandlers(needsTouchEvents);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 if (m_webView->pageImportanceSignals()) 1027 if (m_webView->pageImportanceSignals())
1028 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); 1028 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript();
1029 } 1029 }
1030 1030
1031 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() 1031 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler()
1032 { 1032 {
1033 return m_webView->scheduler()->createFrameScheduler().release(); 1033 return m_webView->scheduler()->createFrameScheduler().release();
1034 } 1034 }
1035 1035
1036 } // namespace blink 1036 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698