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

Side by Side Diff: Source/modules/bluetooth/Bluetooth.h

Issue 1066933008: bluetooth: Refactor Bluetooth and Stub out BluetoothInteraction. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-uuids-fix-casing-2
Patch Set: Refactor to use BluetoothDiscovery and BluetoothInteraction as members Created 5 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 | « no previous file | Source/modules/bluetooth/Bluetooth.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Bluetooth_h 5 #ifndef Bluetooth_h
6 #define Bluetooth_h 6 #define Bluetooth_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/bluetooth/BluetoothDiscovery.h" 10 #include "modules/bluetooth/BluetoothDiscovery.h"
11 #include "modules/bluetooth/BluetoothInteraction.h"
12 #include "platform/heap/Handle.h"
10 13
11 namespace blink { 14 namespace blink {
12 15
13 class Bluetooth final 16 class ScriptPromise;
14 : public BluetoothDiscovery { 17 class ScriptState;
18
19 class Bluetooth
20 : public GarbageCollected<Bluetooth>
21 , public ScriptWrappable {
15 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
16 public: 23 public:
17 static Bluetooth* create() 24 static Bluetooth* create()
18 { 25 {
19 return new Bluetooth(); 26 return new Bluetooth();
20 } 27 }
28
29 // BluetoothDiscovery interface
30 ScriptPromise requestDevice(ScriptState*);
31
32 DEFINE_INLINE_TRACE()
33 {
34 visitor->trace(m_bluetoothDiscovery);
35 visitor->trace(m_bluetoothInteraction);
36 }
37 private:
38 Member<BluetoothDiscovery> m_bluetoothDiscovery;
scheib 2015/04/25 04:01:01 I think these can be direct members, not requiring
ortuno 2015/04/27 22:22:01 Done.
39 Member<BluetoothInteraction> m_bluetoothInteraction;
40 BluetoothDiscovery* bluetoothDiscovery();
41
21 }; 42 };
22 43
23 } // namespace blink 44 } // namespace blink
24 45
25 #endif // Bluetooth_h 46 #endif // Bluetooth_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/bluetooth/Bluetooth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698