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

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

Issue 1850023002: Consume Mojo services directly in Blink's WebUSB implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't do assignments in if statements. Created 4 years, 8 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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 #include "modules/bluetooth/BluetoothSupplement.h" 159 #include "modules/bluetooth/BluetoothSupplement.h"
160 #include "modules/geolocation/GeolocationController.h" 160 #include "modules/geolocation/GeolocationController.h"
161 #include "modules/installedapp/InstalledAppController.h" 161 #include "modules/installedapp/InstalledAppController.h"
162 #include "modules/notifications/NotificationPermissionClient.h" 162 #include "modules/notifications/NotificationPermissionClient.h"
163 #include "modules/permissions/PermissionController.h" 163 #include "modules/permissions/PermissionController.h"
164 #include "modules/presentation/PresentationController.h" 164 #include "modules/presentation/PresentationController.h"
165 #include "modules/push_messaging/PushController.h" 165 #include "modules/push_messaging/PushController.h"
166 #include "modules/screen_orientation/ScreenOrientationController.h" 166 #include "modules/screen_orientation/ScreenOrientationController.h"
167 #include "modules/vr/VRController.h" 167 #include "modules/vr/VRController.h"
168 #include "modules/wake_lock/ScreenWakeLock.h" 168 #include "modules/wake_lock/ScreenWakeLock.h"
169 #include "modules/webusb/USBController.h"
170 #include "platform/ScriptForbiddenScope.h" 169 #include "platform/ScriptForbiddenScope.h"
171 #include "platform/TraceEvent.h" 170 #include "platform/TraceEvent.h"
172 #include "platform/UserGestureIndicator.h" 171 #include "platform/UserGestureIndicator.h"
173 #include "platform/clipboard/ClipboardUtilities.h" 172 #include "platform/clipboard/ClipboardUtilities.h"
174 #include "platform/fonts/FontCache.h" 173 #include "platform/fonts/FontCache.h"
175 #include "platform/graphics/GraphicsContext.h" 174 #include "platform/graphics/GraphicsContext.h"
176 #include "platform/graphics/GraphicsLayerClient.h" 175 #include "platform/graphics/GraphicsLayerClient.h"
177 #include "platform/graphics/paint/ClipRecorder.h" 176 #include "platform/graphics/paint/ClipRecorder.h"
178 #include "platform/graphics/paint/DrawingRecorder.h" 177 #include "platform/graphics/paint/DrawingRecorder.h"
179 #include "platform/graphics/paint/SkPictureBuilder.h" 178 #include "platform/graphics/paint/SkPictureBuilder.h"
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 1470
1472 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient Impl::create()); 1471 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient Impl::create());
1473 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1472 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1474 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); 1473 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1475 m_geolocationClientProxy->setController(GeolocationController::from(m_frame. get())); 1474 m_geolocationClientProxy->setController(GeolocationController::from(m_frame. get()));
1476 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDI Client() : nullptr)); 1475 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDI Client() : nullptr));
1477 provideIndexedDBClientTo(*m_frame, IndexedDBClientImpl::create()); 1476 provideIndexedDBClientTo(*m_frame, IndexedDBClientImpl::create());
1478 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); 1477 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
1479 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr eate(this)); 1478 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr eate(this));
1480 1479
1481 // Always provided so that availability of the API can be controlled by
1482 // OriginTrials::webUSBEnabled().
1483 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullpt r);
1484
1485 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); 1480 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled();
1486 #if OS(CHROMEOS) || OS(ANDROID) 1481 #if OS(CHROMEOS) || OS(ANDROID)
1487 enableWebBluetooth = true; 1482 enableWebBluetooth = true;
1488 #endif 1483 #endif
1489 1484
1490 if (enableWebBluetooth) 1485 if (enableWebBluetooth)
1491 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth( ) : nullptr); 1486 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth( ) : nullptr);
1492 1487
1493 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1488 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1494 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->we bScreenOrientationClient() : nullptr); 1489 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->we bScreenOrientationClient() : nullptr);
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 return WebSandboxFlags::None; 2124 return WebSandboxFlags::None;
2130 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2125 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2131 } 2126 }
2132 2127
2133 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2128 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2134 { 2129 {
2135 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2130 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2136 } 2131 }
2137 2132
2138 } // namespace blink 2133 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/MojoHelper.h ('k') | third_party/WebKit/public/blink_headers.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698