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

Side by Side Diff: third_party/WebKit/Source/modules/webusb/NavigatorUSB.cpp

Issue 2649073002: Use a new Supplement constructor in Navigator supplements (part 2) (Closed)
Patch Set: temp Created 3 years, 10 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 | « third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #include "modules/webusb/NavigatorUSB.h" 5 #include "modules/webusb/NavigatorUSB.h"
6 6
7 #include "core/frame/Navigator.h" 7 #include "core/frame/Navigator.h"
8 #include "modules/webusb/USB.h" 8 #include "modules/webusb/USB.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 14 matching lines...) Expand all
25 25
26 USB* NavigatorUSB::usb() { 26 USB* NavigatorUSB::usb() {
27 return m_usb; 27 return m_usb;
28 } 28 }
29 29
30 DEFINE_TRACE(NavigatorUSB) { 30 DEFINE_TRACE(NavigatorUSB) {
31 visitor->trace(m_usb); 31 visitor->trace(m_usb);
32 Supplement<Navigator>::trace(visitor); 32 Supplement<Navigator>::trace(visitor);
33 } 33 }
34 34
35 NavigatorUSB::NavigatorUSB(Navigator& navigator) { 35 NavigatorUSB::NavigatorUSB(Navigator& navigator)
36 : Supplement<Navigator>(navigator) {
36 if (navigator.frame()) 37 if (navigator.frame())
37 m_usb = USB::create(*navigator.frame()); 38 m_usb = USB::create(*navigator.frame());
38 } 39 }
39 40
40 const char* NavigatorUSB::supplementName() { 41 const char* NavigatorUSB::supplementName() {
41 return "NavigatorUSB"; 42 return "NavigatorUSB";
42 } 43 }
43 44
44 } // namespace blink 45 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698