OLD | NEW |
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 Loading... |
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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 providePushControllerTo(*m_frame, m_client->pushClient()); | 1471 providePushControllerTo(*m_frame, m_client->pushClient()); |
1473 | 1472 |
1474 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient
Impl::create()); | 1473 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient
Impl::create()); |
1475 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); | 1474 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); |
1476 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); | 1475 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); |
1477 m_geolocationClientProxy->setController(GeolocationController::from(m_frame.
get())); | 1476 m_geolocationClientProxy->setController(GeolocationController::from(m_frame.
get())); |
1478 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDI
Client() : nullptr)); | 1477 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDI
Client() : nullptr)); |
1479 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); | 1478 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); |
1480 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr
eate(this)); | 1479 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr
eate(this)); |
1481 | 1480 |
1482 // Always provided so that availability of the API can be controlled by | |
1483 // OriginTrials::webUSBEnabled(). | |
1484 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullpt
r); | |
1485 | |
1486 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); | 1481 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); |
1487 #if OS(CHROMEOS) || OS(ANDROID) | 1482 #if OS(CHROMEOS) || OS(ANDROID) |
1488 enableWebBluetooth = true; | 1483 enableWebBluetooth = true; |
1489 #endif | 1484 #endif |
1490 | 1485 |
1491 if (enableWebBluetooth) | 1486 if (enableWebBluetooth) |
1492 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth(
) : nullptr); | 1487 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth(
) : nullptr); |
1493 | 1488 |
1494 if (RuntimeEnabledFeatures::screenOrientationEnabled()) | 1489 if (RuntimeEnabledFeatures::screenOrientationEnabled()) |
1495 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->we
bScreenOrientationClient() : nullptr); | 1490 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->we
bScreenOrientationClient() : nullptr); |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 return WebSandboxFlags::None; | 2125 return WebSandboxFlags::None; |
2131 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2126 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2132 } | 2127 } |
2133 | 2128 |
2134 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2129 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
2135 { | 2130 { |
2136 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2131 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2137 } | 2132 } |
2138 | 2133 |
2139 } // namespace blink | 2134 } // namespace blink |
OLD | NEW |