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

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

Issue 1864243004: Remove RawPtr from Source/modules Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/modules/webusb/USBConnectionEvent.h ('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/USBConnectionEvent.h" 5 #include "modules/webusb/USBConnectionEvent.h"
6 6
7 #include "modules/webusb/USBConnectionEventInit.h" 7 #include "modules/webusb/USBConnectionEventInit.h"
8 #include "modules/webusb/USBDevice.h" 8 #include "modules/webusb/USBDevice.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 RawPtr<USBConnectionEvent> USBConnectionEvent::create(const AtomicString& type, const USBConnectionEventInit& initializer) 12 USBConnectionEvent* USBConnectionEvent::create(const AtomicString& type, const U SBConnectionEventInit& initializer)
13 { 13 {
14 return new USBConnectionEvent(type, initializer); 14 return new USBConnectionEvent(type, initializer);
15 } 15 }
16 16
17 RawPtr<USBConnectionEvent> USBConnectionEvent::create(const AtomicString& type, USBDevice* device) 17 USBConnectionEvent* USBConnectionEvent::create(const AtomicString& type, USBDevi ce* device)
18 { 18 {
19 return new USBConnectionEvent(type, device); 19 return new USBConnectionEvent(type, device);
20 } 20 }
21 21
22 USBConnectionEvent::USBConnectionEvent(const AtomicString& type, const USBConnec tionEventInit& initializer) 22 USBConnectionEvent::USBConnectionEvent(const AtomicString& type, const USBConnec tionEventInit& initializer)
23 : Event(type, initializer) 23 : Event(type, initializer)
24 , m_device(nullptr) 24 , m_device(nullptr)
25 { 25 {
26 if (initializer.hasDevice()) 26 if (initializer.hasDevice())
27 m_device = initializer.device(); 27 m_device = initializer.device();
28 } 28 }
29 29
30 USBConnectionEvent::USBConnectionEvent(const AtomicString& type, USBDevice* devi ce) 30 USBConnectionEvent::USBConnectionEvent(const AtomicString& type, USBDevice* devi ce)
31 : Event(type, false, false) 31 : Event(type, false, false)
32 , m_device(device) 32 , m_device(device)
33 { 33 {
34 } 34 }
35 35
36 DEFINE_TRACE(USBConnectionEvent) 36 DEFINE_TRACE(USBConnectionEvent)
37 { 37 {
38 visitor->trace(m_device); 38 visitor->trace(m_device);
39 Event::trace(visitor); 39 Event::trace(visitor);
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBConnectionEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698