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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1228283003: Attach a WebBluetooth to the LocalFrame and use it if it's available. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@error-enum-cleanup
Patch Set: Always use BluetoothSupplement to get the WebBluetooth instance. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/modules.gypi ('k') | public/platform/modules/bluetooth/WebBluetoothError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 955a304927aa1d896258da8026cf2578d55fba48..262805881e9e6bd2a9c0974e078a4edfa2837f6f 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -154,6 +154,7 @@
#include "core/timing/DOMWindowPerformance.h"
#include "core/timing/Performance.h"
#include "modules/app_banner/AppBannerController.h"
+#include "modules/bluetooth/BluetoothSupplement.h"
#include "modules/geolocation/GeolocationController.h"
#include "modules/notifications/NotificationPermissionClient.h"
#include "modules/permissions/PermissionController.h"
@@ -1707,6 +1708,8 @@ void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::create(this));
+ if (RuntimeEnabledFeatures::webBluetoothEnabled())
+ BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth() : nullptr);
if (RuntimeEnabledFeatures::screenOrientationEnabled())
ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->webScreenOrientationClient() : nullptr);
if (RuntimeEnabledFeatures::presentationEnabled())
« no previous file with comments | « Source/modules/modules.gypi ('k') | public/platform/modules/bluetooth/WebBluetoothError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698