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

Side by Side Diff: Source/modules/bluetooth/BluetoothGATTService.cpp

Issue 1152393002: bluetooth: Blink side implementation of getPrimaryService (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-get-primary-service-interface
Patch Set: Address scheib's comments Created 5 years, 6 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "modules/bluetooth/BluetoothGATTService.h"
7
8 #include "public/platform/modules/bluetooth/WebBluetoothGATTRemoteServer.h"
9 #include "wtf/OwnPtr.h"
10
11 namespace blink {
12
13 BluetoothGATTService::BluetoothGATTService(const WebBluetoothGATTService& webSer vice)
14 : m_webService(webService)
haraken 2015/06/03 03:45:38 We're deep-copying the webService here. Is this in
ortuno 2015/06/03 17:02:18 No. This pattern slipped under in all of our class
15 {
16 }
17
18 BluetoothGATTService* BluetoothGATTService::take(ScriptPromiseResolver*, WebBlue toothGATTService* webServiceRawPointer)
19 {
20 if (!webServiceRawPointer) {
21 return nullptr;
22 }
23 OwnPtr<WebBluetoothGATTService> webService = adoptPtr(webServiceRawPointer);
24 return new BluetoothGATTService(*webService);
haraken 2015/06/03 03:45:38 Maybe you want to pass in webService.learPtr() her
Jeffrey Yasskin 2015/06/03 15:10:04 I mentioned this in https://codereview.chromium.or
ortuno 2015/06/03 17:02:19 We've been mistakenly following this pattern in al
25 }
26
27 void BluetoothGATTService::dispose(WebBluetoothGATTService* webService)
28 {
29 delete webService;
30 }
31
32 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/bluetooth/BluetoothGATTService.h ('k') | Source/modules/bluetooth/BluetoothGATTService.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698