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

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

Issue 1671553004: Enable WebUSB through the Experimental Framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove RuntimeEnabled=WebUSB. 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
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 providePushControllerTo(*m_frame, m_client->pushClient()); 1512 providePushControllerTo(*m_frame, m_client->pushClient());
1513 1513
1514 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient Impl::create()); 1514 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient Impl::create());
1515 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1515 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1516 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); 1516 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1517 m_geolocationClientProxy->setController(GeolocationController::from(m_frame. get())); 1517 m_geolocationClientProxy->setController(GeolocationController::from(m_frame. get()));
1518 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDI Client() : nullptr)); 1518 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDI Client() : nullptr));
1519 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); 1519 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
1520 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr eate(this)); 1520 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr eate(this));
1521 1521
1522 // Always provided so that availability of the API can be controlled by
1523 // OriginTrials::webUSBEnabled().
1524 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullpt r);
1525
1522 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); 1526 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled();
1523 #if OS(CHROMEOS) || OS(ANDROID) 1527 #if OS(CHROMEOS) || OS(ANDROID)
1524 enableWebBluetooth = true; 1528 enableWebBluetooth = true;
1525 #endif 1529 #endif
1526 1530
1527 if (enableWebBluetooth) 1531 if (enableWebBluetooth)
1528 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth( ) : nullptr); 1532 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth( ) : nullptr);
1529 1533
1530 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1534 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1531 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->we bScreenOrientationClient() : nullptr); 1535 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->we bScreenOrientationClient() : nullptr);
1532 if (RuntimeEnabledFeatures::presentationEnabled()) 1536 if (RuntimeEnabledFeatures::presentationEnabled())
1533 PresentationController::provideTo(*m_frame, m_client ? m_client->present ationClient() : nullptr); 1537 PresentationController::provideTo(*m_frame, m_client ? m_client->present ationClient() : nullptr);
1534 if (RuntimeEnabledFeatures::permissionsEnabled()) 1538 if (RuntimeEnabledFeatures::permissionsEnabled())
1535 PermissionController::provideTo(*m_frame, m_client ? m_client->permissio nClient() : nullptr); 1539 PermissionController::provideTo(*m_frame, m_client ? m_client->permissio nClient() : nullptr);
1536 if (RuntimeEnabledFeatures::webUSBEnabled())
1537 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nu llptr);
1538 if (RuntimeEnabledFeatures::webVREnabled()) 1540 if (RuntimeEnabledFeatures::webVREnabled())
1539 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : n ullptr); 1541 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : n ullptr);
1540 if (RuntimeEnabledFeatures::wakeLockEnabled()) 1542 if (RuntimeEnabledFeatures::wakeLockEnabled())
1541 ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockClient( ) : nullptr); 1543 ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockClient( ) : nullptr);
1542 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) 1544 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled())
1543 provideAudioOutputDeviceClientTo(*m_frame, AudioOutputDeviceClientImpl:: create()); 1545 provideAudioOutputDeviceClientTo(*m_frame, AudioOutputDeviceClientImpl:: create());
1544 if (RuntimeEnabledFeatures::installedAppEnabled()) 1546 if (RuntimeEnabledFeatures::installedAppEnabled())
1545 InstalledAppController::provideTo(*m_frame, m_client ? m_client->install edAppClient() : nullptr); 1547 InstalledAppController::provideTo(*m_frame, m_client ? m_client->install edAppClient() : nullptr);
1546 } 1548 }
1547 1549
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 return WebSandboxFlags::None; 2170 return WebSandboxFlags::None;
2169 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2171 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2170 } 2172 }
2171 2173
2172 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2174 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2173 { 2175 {
2174 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2176 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2175 } 2177 }
2176 2178
2177 } // namespace blink 2179 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698