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: third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.h

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, 11 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 #ifndef BluetoothSupplement_h
6 #define BluetoothSupplement_h
7
8 #include "core/frame/LocalFrame.h"
9
10 namespace blink {
11
12 class WebBluetooth;
13
14 // This class is attached to a LocalFrame in WebLocalFrameImpl::setCoreFrame, to
15 // pass WebFrameClient::bluetooth() (accessible by web/ only) to the Bluetooth
16 // code in modules/.
17 class BLINK_EXPORT BluetoothSupplement
18 : public GarbageCollected<BluetoothSupplement>,
19 public Supplement<LocalFrame> {
20 WTF_MAKE_NONCOPYABLE(BluetoothSupplement);
21 USING_GARBAGE_COLLECTED_MIXIN(BluetoothSupplement);
22
23 public:
24 static const char* supplementName();
25
26 static void provideTo(LocalFrame&, WebBluetooth*);
27
28 // Returns the WebBluetooth attached to the frame.
29 static WebBluetooth* from(LocalFrame*);
30
31 // Returns the WebBluetooth attached to the frame if the frame exists.
32 // Otherwise returns nullptr.
33 static WebBluetooth* fromScriptState(ScriptState*);
34 // Returns the WebBluetooth attached to the execution context.
35 static WebBluetooth* fromExecutionContext(ExecutionContext*);
36
37 DECLARE_VIRTUAL_TRACE();
38
39 private:
40 explicit BluetoothSupplement(WebBluetooth*);
41
42 WebBluetooth* m_bluetooth;
43 };
44
45 } // namespace blink
46
47 #endif // BluetoothRoutingId_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698