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

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

Issue 2389493002: Revert of Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: Created 4 years, 2 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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 1124
1125 double ChromeClientImpl::lastFrameTimeMonotonic() const 1125 double ChromeClientImpl::lastFrameTimeMonotonic() const
1126 { 1126 {
1127 return m_webView->lastFrameTimeMonotonic(); 1127 return m_webView->lastFrameTimeMonotonic();
1128 } 1128 }
1129 1129
1130 void ChromeClientImpl::installSupplements(LocalFrame& frame) 1130 void ChromeClientImpl::installSupplements(LocalFrame& frame)
1131 { 1131 {
1132 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(&frame); 1132 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(&frame);
1133 WebFrameClient* client = webFrame->client(); 1133 WebFrameClient* client = webFrame->client();
1134 DCHECK(client); 1134 if (client) {
1135 providePushControllerTo(frame, client->pushClient()); 1135 providePushControllerTo(frame, client->pushClient());
1136 provideUserMediaTo(frame, UserMediaClientImpl::create(client->userMediaClien t())); 1136 provideUserMediaTo(frame, UserMediaClientImpl::create(client->userMediaC lient()));
1137 }
1138
1137 provideIndexedDBClientTo(frame, IndexedDBClientImpl::create()); 1139 provideIndexedDBClientTo(frame, IndexedDBClientImpl::create());
1138 provideLocalFileSystemTo(frame, LocalFileSystemClient::create()); 1140 provideLocalFileSystemTo(frame, LocalFileSystemClient::create());
1139 provideNavigatorContentUtilsTo(frame, NavigatorContentUtilsClientImpl::creat e(webFrame)); 1141 provideNavigatorContentUtilsTo(frame, NavigatorContentUtilsClientImpl::creat e(webFrame));
1140 1142
1141 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); 1143 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled();
1142 #if OS(CHROMEOS) || OS(ANDROID) || OS(MACOSX) 1144 #if OS(CHROMEOS) || OS(ANDROID) || OS(MACOSX)
1143 enableWebBluetooth = true; 1145 enableWebBluetooth = true;
1144 #endif 1146 #endif
1145 if (enableWebBluetooth) 1147 if (enableWebBluetooth)
1146 BluetoothSupplement::provideTo(frame, client->bluetooth()); 1148 BluetoothSupplement::provideTo(frame, client ? client->bluetooth() : nul lptr);
1147 1149
1148 ScreenOrientationController::provideTo(frame, client->webScreenOrientationCl ient()); 1150 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie ntationClient() : nullptr);
1149 if (RuntimeEnabledFeatures::presentationEnabled()) 1151 if (RuntimeEnabledFeatures::presentationEnabled())
1150 PresentationController::provideTo(frame, client->presentationClient()); 1152 PresentationController::provideTo(frame, client ? client->presentationCl ient() : nullptr);
1151 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) 1153 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled())
1152 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre ate()); 1154 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre ate());
1153 if (RuntimeEnabledFeatures::installedAppEnabled()) 1155 if (RuntimeEnabledFeatures::installedAppEnabled())
1154 InstalledAppController::provideTo(frame, client->installedAppClient()); 1156 InstalledAppController::provideTo(frame, client ? client->installedAppCl ient() : nullptr);
1155 } 1157 }
1156 1158
1157 } // namespace blink 1159 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698