Chromium Code Reviews| Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| index 17c5196c58af0da104f2b2db6c66d934216c04b5..f28521197e3537525b78dc6acf7cb4b530d1fb58 100644 |
| --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| @@ -1131,11 +1131,9 @@ void ChromeClientImpl::installSupplements(LocalFrame& frame) |
| { |
| WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(&frame); |
| WebFrameClient* client = webFrame->client(); |
|
esprehn
2016/09/29 04:28:42
we should make client() return a reference
dcheng
2016/09/29 04:42:38
Unfortunately, that's not easy, because it can leg
|
| - if (client) { |
| - providePushControllerTo(frame, client->pushClient()); |
| - provideUserMediaTo(frame, UserMediaClientImpl::create(client->userMediaClient())); |
| - } |
| - |
| + DCHECK(client); |
|
dcheng
2016/09/29 04:13:27
The main goal of this patch is to remove these str
|
| + providePushControllerTo(frame, client->pushClient()); |
| + provideUserMediaTo(frame, UserMediaClientImpl::create(client->userMediaClient())); |
| provideIndexedDBClientTo(frame, IndexedDBClientImpl::create()); |
| provideLocalFileSystemTo(frame, LocalFileSystemClient::create()); |
| provideNavigatorContentUtilsTo(frame, NavigatorContentUtilsClientImpl::create(webFrame)); |
| @@ -1145,15 +1143,15 @@ void ChromeClientImpl::installSupplements(LocalFrame& frame) |
| enableWebBluetooth = true; |
| #endif |
| if (enableWebBluetooth) |
| - BluetoothSupplement::provideTo(frame, client ? client->bluetooth() : nullptr); |
| + BluetoothSupplement::provideTo(frame, client->bluetooth()); |
| - ScreenOrientationController::provideTo(frame, client ? client->webScreenOrientationClient() : nullptr); |
| + ScreenOrientationController::provideTo(frame, client->webScreenOrientationClient()); |
| if (RuntimeEnabledFeatures::presentationEnabled()) |
| - PresentationController::provideTo(frame, client ? client->presentationClient() : nullptr); |
| + PresentationController::provideTo(frame, client->presentationClient()); |
| if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::create()); |
| if (RuntimeEnabledFeatures::installedAppEnabled()) |
| - InstalledAppController::provideTo(frame, client ? client->installedAppClient() : nullptr); |
| + InstalledAppController::provideTo(frame, client->installedAppClient()); |
| } |
| } // namespace blink |