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

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

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/ColorChooserPopupUIController.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #include "public/platform/WebRect.h" 99 #include "public/platform/WebRect.h"
100 #include "public/platform/WebURLRequest.h" 100 #include "public/platform/WebURLRequest.h"
101 #include "weborigin/SecurityOrigin.h" 101 #include "weborigin/SecurityOrigin.h"
102 #include "wtf/text/CString.h" 102 #include "wtf/text/CString.h"
103 #include "wtf/text/StringBuilder.h" 103 #include "wtf/text/StringBuilder.h"
104 #include "wtf/text/StringConcatenate.h" 104 #include "wtf/text/StringConcatenate.h"
105 #include "wtf/unicode/CharacterNames.h" 105 #include "wtf/unicode/CharacterNames.h"
106 106
107 using namespace WebCore; 107 using namespace WebCore;
108 108
109 namespace WebKit { 109 namespace blink {
110 110
111 // Converts a WebCore::PopupContainerType to a WebKit::WebPopupType. 111 // Converts a WebCore::PopupContainerType to a blink::WebPopupType.
112 static WebPopupType convertPopupType(PopupContainer::PopupType type) 112 static WebPopupType convertPopupType(PopupContainer::PopupType type)
113 { 113 {
114 switch (type) { 114 switch (type) {
115 case PopupContainer::Select: 115 case PopupContainer::Select:
116 return WebPopupTypeSelect; 116 return WebPopupTypeSelect;
117 case PopupContainer::Suggestion: 117 case PopupContainer::Suggestion:
118 return WebPopupTypeSuggestion; 118 return WebPopupTypeSuggestion;
119 default: 119 default:
120 ASSERT_NOT_REACHED(); 120 ASSERT_NOT_REACHED();
121 return WebPopupTypeNone; 121 return WebPopupTypeNone;
122 } 122 }
123 } 123 }
124 124
125 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAXEvent 125 // Converts a WebCore::AXObjectCache::AXNotification to a blink::WebAXEvent
126 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) 126 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification)
127 { 127 {
128 // These enums have the same values; enforced in AssertMatchingEnums.cpp. 128 // These enums have the same values; enforced in AssertMatchingEnums.cpp.
129 return static_cast<WebAXEvent>(notification); 129 return static_cast<WebAXEvent>(notification);
130 } 130 }
131 131
132 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) 132 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView)
133 : m_webView(webView) 133 : m_webView(webView)
134 , m_toolbarsVisible(true) 134 , m_toolbarsVisible(true)
135 , m_statusbarVisible(true) 135 , m_statusbarVisible(true)
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, Document::PageDismissalType dismissalT ype) const 915 bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, Document::PageDismissalType dismissalT ype) const
916 { 916 {
917 const char* kDialogs[] = {"alert", "confirm", "prompt", "showModalDialog"}; 917 const char* kDialogs[] = {"alert", "confirm", "prompt", "showModalDialog"};
918 int dialog = static_cast<int>(dialogType); 918 int dialog = static_cast<int>(dialogType);
919 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog && dialog < static_cast<int>(ar raysize(kDialogs))); 919 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog && dialog < static_cast<int>(ar raysize(kDialogs)));
920 920
921 const char* kDismissals[] = {"beforeunload", "pagehide", "unload"}; 921 const char* kDismissals[] = {"beforeunload", "pagehide", "unload"};
922 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal. 922 int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal.
923 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal && dismissal < static_cast<i nt>(arraysize(kDismissals))); 923 ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal && dismissal < static_cast<i nt>(arraysize(kDismissals)));
924 924
925 WebKit::Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuri ngPageDismissal", dismissal * arraysize(kDialogs) + dialog, arraysize(kDialogs) * arraysize(kDismissals)); 925 blink::Platform::current()->histogramEnumeration("Renderer.ModalDialogsDurin gPageDismissal", dismissal * arraysize(kDialogs) + dialog, arraysize(kDialogs) * arraysize(kDismissals));
926 926
927 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag e + "') during " + kDismissals[dismissal] + "."; 927 String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessag e + "') during " + kDismissals[dismissal] + ".";
928 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess age::LevelError, message)); 928 m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMess age::LevelError, message));
929 929
930 return false; 930 return false;
931 } 931 }
932 932
933 bool ChromeClientImpl::shouldRubberBandInDirection(WebCore::ScrollDirection dire ction) const 933 bool ChromeClientImpl::shouldRubberBandInDirection(WebCore::ScrollDirection dire ction) const
934 { 934 {
935 ASSERT(direction != WebCore::ScrollUp && direction != WebCore::ScrollDown); 935 ASSERT(direction != WebCore::ScrollUp && direction != WebCore::ScrollDown);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 : m_webView(webView) 999 : m_webView(webView)
1000 { 1000 {
1001 } 1001 }
1002 1002
1003 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) 1003 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title)
1004 { 1004 {
1005 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 1005 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
1006 } 1006 }
1007 #endif 1007 #endif
1008 1008
1009 } // namespace WebKit 1009 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/ColorChooserPopupUIController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698