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

Side by Side Diff: Source/WebKit/chromium/src/ChromeClientImpl.cpp

Issue 13851023: Remove ChromeClient cruft (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // WebCore::Node. 233 // WebCore::Node.
234 HitTestResult hitTest(IntPoint(0, 0)); 234 HitTestResult hitTest(IntPoint(0, 0));
235 // This cast must be valid because of the isLink() check. 235 // This cast must be valid because of the isLink() check.
236 hitTest.setURLElement(toElement(node)); 236 hitTest.setURLElement(toElement(node));
237 if (hitTest.isLiveLink()) 237 if (hitTest.isLiveLink())
238 focusURL = hitTest.absoluteLinkURL(); 238 focusURL = hitTest.absoluteLinkURL();
239 } 239 }
240 m_webView->client()->setKeyboardFocusURL(focusURL); 240 m_webView->client()->setKeyboardFocusURL(focusURL);
241 } 241 }
242 242
243 void ChromeClientImpl::focusedFrameChanged(Frame*)
244 {
245 }
246
247 Page* ChromeClientImpl::createWindow( 243 Page* ChromeClientImpl::createWindow(
248 Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, con st NavigationAction& action) 244 Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, con st NavigationAction& action)
249 { 245 {
250 if (!m_webView->client()) 246 if (!m_webView->client())
251 return 0; 247 return 0;
252 248
253 // FrameLoaderClientImpl may have given us a policy to use for the next new 249 // FrameLoaderClientImpl may have given us a policy to use for the next new
254 // window navigation. If not, determine the policy using the same logic as 250 // window navigation. If not, determine the policy using the same logic as
255 // show(). 251 // show().
256 WebNavigationPolicy policy; 252 WebNavigationPolicy policy;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 468 }
473 return false; 469 return false;
474 } 470 }
475 471
476 void ChromeClientImpl::setStatusbarText(const String& message) 472 void ChromeClientImpl::setStatusbarText(const String& message)
477 { 473 {
478 if (m_webView->client()) 474 if (m_webView->client())
479 m_webView->client()->setStatusText(message); 475 m_webView->client()->setStatusText(message);
480 } 476 }
481 477
482 bool ChromeClientImpl::shouldInterruptJavaScript()
483 {
484 // FIXME: implement me
485 return false;
486 }
487
488 KeyboardUIMode ChromeClientImpl::keyboardUIMode() 478 KeyboardUIMode ChromeClientImpl::keyboardUIMode()
489 { 479 {
490 return m_webView->tabsToLinks() ? KeyboardAccessTabsToLinks : KeyboardAccess Default; 480 return m_webView->tabsToLinks() ? KeyboardAccessTabsToLinks : KeyboardAccess Default;
491 } 481 }
492 482
493 IntRect ChromeClientImpl::windowResizerRect() const 483 IntRect ChromeClientImpl::windowResizerRect() const
494 { 484 {
495 IntRect result; 485 IntRect result;
496 if (m_webView->client()) 486 if (m_webView->client())
497 result = m_webView->client()->windowResizerRect(); 487 result = m_webView->client()->windowResizerRect();
498 return result; 488 return result;
499 } 489 }
500 490
501 void ChromeClientImpl::invalidateRootView(const IntRect&)
502 {
503 notImplemented();
504 }
505
506 void ChromeClientImpl::invalidateContentsAndRootView(const IntRect& updateRect) 491 void ChromeClientImpl::invalidateContentsAndRootView(const IntRect& updateRect)
507 { 492 {
508 if (updateRect.isEmpty()) 493 if (updateRect.isEmpty())
509 return; 494 return;
510 m_webView->invalidateRect(updateRect); 495 m_webView->invalidateRect(updateRect);
511 } 496 }
512 497
513 void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect ) 498 void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect )
514 { 499 {
515 invalidateContentsAndRootView(updateRect); 500 invalidateContentsAndRootView(updateRect);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 m_webView->setPageScaleFactorLimits(computed.minimumScale, computed.maximumS cale); 683 m_webView->setPageScaleFactorLimits(computed.minimumScale, computed.maximumS cale);
699 #endif 684 #endif
700 } 685 }
701 686
702 void ChromeClientImpl::print(Frame* frame) 687 void ChromeClientImpl::print(Frame* frame)
703 { 688 {
704 if (m_webView->client()) 689 if (m_webView->client())
705 m_webView->client()->printPage(WebFrameImpl::fromFrame(frame)); 690 m_webView->client()->printPage(WebFrameImpl::fromFrame(frame));
706 } 691 }
707 692
708 void ChromeClientImpl::exceededDatabaseQuota(Frame* frame, const String& databas eName, DatabaseDetails)
709 {
710 // Chromium users cannot currently change the default quota
711 }
712
713 void ChromeClientImpl::reachedMaxAppCacheSize(int64_t spaceNeeded)
714 {
715 ASSERT_NOT_REACHED();
716 }
717
718 void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64 _t)
719 {
720 ASSERT_NOT_REACHED();
721 }
722
723 #if ENABLE(INPUT_TYPE_COLOR) 693 #if ENABLE(INPUT_TYPE_COLOR)
724 PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient * chooserClient, const Color&) 694 PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient * chooserClient, const Color&)
725 { 695 {
726 OwnPtr<ColorChooserUIController> controller; 696 OwnPtr<ColorChooserUIController> controller;
727 #if ENABLE(PAGE_POPUP) 697 #if ENABLE(PAGE_POPUP)
728 controller = adoptPtr(new ColorChooserPopupUIController(this, chooserClient) ); 698 controller = adoptPtr(new ColorChooserPopupUIController(this, chooserClient) );
729 #else 699 #else
730 controller = adoptPtr(new ColorChooserUIController(this, chooserClient)); 700 controller = adoptPtr(new ColorChooserUIController(this, chooserClient));
731 #endif 701 #endif
732 controller->openUI(); 702 controller->openUI();
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 if (settings->acceleratedCompositingForAnimationEnabled()) 954 if (settings->acceleratedCompositingForAnimationEnabled())
985 flags |= AnimationTrigger; 955 flags |= AnimationTrigger;
986 if (settings->acceleratedCompositingForCanvasEnabled()) 956 if (settings->acceleratedCompositingForCanvasEnabled())
987 flags |= CanvasTrigger; 957 flags |= CanvasTrigger;
988 if (settings->acceleratedCompositingForScrollableFramesEnabled()) 958 if (settings->acceleratedCompositingForScrollableFramesEnabled())
989 flags |= ScrollableInnerFrameTrigger; 959 flags |= ScrollableInnerFrameTrigger;
990 960
991 return flags; 961 return flags;
992 } 962 }
993 963
994 bool ChromeClientImpl::supportsFullscreenForNode(const Node* node)
995 {
996 return false;
997 }
998
999 void ChromeClientImpl::enterFullscreenForNode(Node* node) 964 void ChromeClientImpl::enterFullscreenForNode(Node* node)
adamk 2013/04/30 00:05:07 Actually, while I've got you here: can I remove th
darin (slow to review) 2013/04/30 03:47:46 Yes, this is all code for the old way of doing ful
adamk 2013/04/30 16:45:03 I'll take care of this in a followup deleting all
1000 { 965 {
1001 ASSERT_NOT_REACHED(); 966 ASSERT_NOT_REACHED();
1002 } 967 }
1003 968
1004 void ChromeClientImpl::exitFullscreenForNode(Node* node) 969 void ChromeClientImpl::exitFullscreenForNode(Node* node)
1005 { 970 {
1006 ASSERT_NOT_REACHED(); 971 ASSERT_NOT_REACHED();
1007 } 972 }
1008 973
1009 bool ChromeClientImpl::supportsFullScreenForElement(const Element* element, bool withKeyboard)
1010 {
1011 return true;
1012 }
1013
1014 void ChromeClientImpl::enterFullScreenForElement(Element* element) 974 void ChromeClientImpl::enterFullScreenForElement(Element* element)
1015 { 975 {
1016 m_webView->enterFullScreenForElement(element); 976 m_webView->enterFullScreenForElement(element);
1017 } 977 }
1018 978
1019 void ChromeClientImpl::exitFullScreenForElement(Element* element) 979 void ChromeClientImpl::exitFullScreenForElement(Element* element)
1020 { 980 {
1021 m_webView->exitFullScreenForElement(element); 981 m_webView->exitFullScreenForElement(element);
1022 } 982 }
1023 983
1024 void ChromeClientImpl::fullScreenRendererChanged(RenderBox*)
1025 {
1026 notImplemented();
1027 }
1028
1029 bool ChromeClientImpl::selectItemWritingDirectionIsNatural()
1030 {
1031 return false;
1032 }
1033
1034 bool ChromeClientImpl::selectItemAlignmentFollowsMenuWritingDirection()
1035 {
1036 return true;
1037 }
1038
1039 bool ChromeClientImpl::hasOpenedPopup() const 984 bool ChromeClientImpl::hasOpenedPopup() const
1040 { 985 {
1041 return m_webView->hasOpenedPopup(); 986 return m_webView->hasOpenedPopup();
1042 } 987 }
1043 988
1044 PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const 989 PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const
1045 { 990 {
1046 if (WebViewImpl::useExternalPopupMenus()) 991 if (WebViewImpl::useExternalPopupMenus())
1047 return adoptRef(new ExternalPopupMenu(client, m_webView->client())); 992 return adoptRef(new ExternalPopupMenu(client, m_webView->client()));
1048 993
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 1078
1134 ASSERT_NOT_REACHED(); 1079 ASSERT_NOT_REACHED();
1135 return true; 1080 return true;
1136 } 1081 }
1137 1082
1138 void ChromeClientImpl::numWheelEventHandlersChanged(unsigned numberOfWheelHandle rs) 1083 void ChromeClientImpl::numWheelEventHandlersChanged(unsigned numberOfWheelHandle rs)
1139 { 1084 {
1140 m_webView->numberOfWheelEventHandlersChanged(numberOfWheelHandlers); 1085 m_webView->numberOfWheelEventHandlersChanged(numberOfWheelHandlers);
1141 } 1086 }
1142 1087
1143 bool ChromeClientImpl::shouldAutoscrollForDragAndDrop(WebCore::RenderBox*) const
1144 {
1145 return true;
1146 }
1147
1148
1149 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents) 1088 void ChromeClientImpl::needTouchEvents(bool needsTouchEvents)
1150 { 1089 {
1151 m_webView->hasTouchEventHandlers(needsTouchEvents); 1090 m_webView->hasTouchEventHandlers(needsTouchEvents);
1152 } 1091 }
1153 1092
1154 bool ChromeClientImpl::requestPointerLock() 1093 bool ChromeClientImpl::requestPointerLock()
1155 { 1094 {
1156 return m_webView->requestPointerLock(); 1095 return m_webView->requestPointerLock();
1157 } 1096 }
1158 1097
(...skipping 18 matching lines...) Expand all
1177 { 1116 {
1178 if (!m_webView->autofillClient()) 1117 if (!m_webView->autofillClient())
1179 return; 1118 return;
1180 WebVector<WebNode> elementVector(static_cast<size_t>(elements.size())); 1119 WebVector<WebNode> elementVector(static_cast<size_t>(elements.size()));
1181 size_t elementsCount = elements.size(); 1120 size_t elementsCount = elements.size();
1182 for (size_t i = 0; i < elementsCount; ++i) 1121 for (size_t i = 0; i < elementsCount; ++i)
1183 elementVector[i] = elements[i]; 1122 elementVector[i] = elements[i];
1184 m_webView->autofillClient()->didAssociateFormControls(elementVector); 1123 m_webView->autofillClient()->didAssociateFormControls(elementVector);
1185 } 1124 }
1186 1125
1187 bool ChromeClientImpl::shouldNotifyOnFormChanges()
1188 {
1189 return true;
1190 }
1191
1192 #if ENABLE(NAVIGATOR_CONTENT_UTILS) 1126 #if ENABLE(NAVIGATOR_CONTENT_UTILS)
1193 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre ate(WebViewImpl* webView) 1127 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre ate(WebViewImpl* webView)
1194 { 1128 {
1195 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); 1129 return adoptPtr(new NavigatorContentUtilsClientImpl(webView));
1196 } 1130 }
1197 1131
1198 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we bView) 1132 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we bView)
1199 : m_webView(webView) 1133 : m_webView(webView)
1200 { 1134 {
1201 } 1135 }
1202 1136
1203 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) 1137 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title)
1204 { 1138 {
1205 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 1139 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
1206 } 1140 }
1207 #endif 1141 #endif
1208 1142
1209 } // namespace WebKit 1143 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/ChromeClientImpl.h ('k') | Source/WebKit/chromium/src/WebPopupMenuImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698