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

Side by Side Diff: Source/modules/webusb/USBController.h

Issue 1262163003: Add WebUSB bindings and client interface [part 1] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 4 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 USBController_h
6 #define USBController_h
7
8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/LocalFrameLifecycleObserver.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13 class WebUSBClient;
14
15 class USBController final
16 : public NoBaseWillBeGarbageCollectedFinalized<USBController>
17 , public WillBeHeapSupplement<LocalFrame>
18 , public LocalFrameLifecycleObserver {
19 WTF_MAKE_NONCOPYABLE(USBController);
20 public:
21 virtual ~USBController();
22
23 WebUSBClient* client() { return m_client; }
24
25 static void provideTo(LocalFrame&, WebUSBClient*);
26 static USBController* from(LocalFrame&);
27 static const char* supplementName();
28
29 DECLARE_VIRTUAL_TRACE();
30
31 private:
32 USBController(LocalFrame&, WebUSBClient*);
33
34 // Inherited from LocalFrameLifecycleObserver.
35 void willDetachFrameHost() override;
36
37 WebUSBClient* m_client;
38 };
39
40 } // namespace blink
41
42 #endif // USBController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698