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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp

Issue 2565913002: [Onion Soup] Move WebBluetoothImpl from //content/renderer/bluetooth to Blink's bluetooth module (Closed)
Patch Set: renamed BluetoothUUID.typemap to Bluetooth.typemap Created 3 years, 12 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
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
deleted file mode 100644
index 699f9a64240b6dec753caf08cb6e77da150713cb..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "modules/bluetooth/BluetoothSupplement.h"
-
-#include "core/dom/Document.h"
-
-namespace blink {
-
-const char* BluetoothSupplement::supplementName() {
- return "BluetoothSupplement";
-}
-
-BluetoothSupplement::BluetoothSupplement(WebBluetooth* bluetooth)
- : m_bluetooth(bluetooth) {}
-
-void BluetoothSupplement::provideTo(LocalFrame& frame,
- WebBluetooth* bluetooth) {
- BluetoothSupplement* bluetoothSupplement = new BluetoothSupplement(bluetooth);
- Supplement<LocalFrame>::provideTo(frame, supplementName(),
- bluetoothSupplement);
-};
-
-WebBluetooth* BluetoothSupplement::from(LocalFrame* frame) {
- BluetoothSupplement* supplement = static_cast<BluetoothSupplement*>(
- Supplement<LocalFrame>::from(frame, supplementName()));
-
- ASSERT(supplement);
- ASSERT(supplement->m_bluetooth);
-
- return supplement->m_bluetooth;
-}
-
-WebBluetooth* BluetoothSupplement::fromScriptState(ScriptState* scriptState) {
- return fromExecutionContext(scriptState->getExecutionContext());
-}
-
-WebBluetooth* BluetoothSupplement::fromExecutionContext(
- ExecutionContext* executionContext) {
- if (!executionContext->isDocument()) {
- return nullptr;
- }
- return BluetoothSupplement::from(
- static_cast<Document*>(executionContext)->frame());
-}
-
-DEFINE_TRACE(BluetoothSupplement) {
- Supplement<LocalFrame>::trace(visitor);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.h ('k') | third_party/WebKit/Source/modules/bluetooth/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698