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/mediastream/MediaDevicesRequest.cpp

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years 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
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 25 matching lines...) Expand all
36 MediaDevicesRequest* MediaDevicesRequest::create( 36 MediaDevicesRequest* MediaDevicesRequest::create(
37 ScriptState* state, 37 ScriptState* state,
38 UserMediaController* controller) { 38 UserMediaController* controller) {
39 MediaDevicesRequest* request = new MediaDevicesRequest(state, controller); 39 MediaDevicesRequest* request = new MediaDevicesRequest(state, controller);
40 request->suspendIfNeeded(); 40 request->suspendIfNeeded();
41 return request; 41 return request;
42 } 42 }
43 43
44 MediaDevicesRequest::MediaDevicesRequest(ScriptState* state, 44 MediaDevicesRequest::MediaDevicesRequest(ScriptState* state,
45 UserMediaController* controller) 45 UserMediaController* controller)
46 : ActiveDOMObject(state->getExecutionContext()), 46 : SuspendableObject(state->getExecutionContext()),
47 m_controller(controller), 47 m_controller(controller),
48 m_resolver(ScriptPromiseResolver::create(state)) {} 48 m_resolver(ScriptPromiseResolver::create(state)) {}
49 49
50 MediaDevicesRequest::~MediaDevicesRequest() {} 50 MediaDevicesRequest::~MediaDevicesRequest() {}
51 51
52 Document* MediaDevicesRequest::ownerDocument() { 52 Document* MediaDevicesRequest::ownerDocument() {
53 if (ExecutionContext* context = getExecutionContext()) { 53 if (ExecutionContext* context = getExecutionContext()) {
54 return toDocument(context); 54 return toDocument(context);
55 } 55 }
56 56
(...skipping 15 matching lines...) Expand all
72 } 72 }
73 73
74 void MediaDevicesRequest::contextDestroyed() { 74 void MediaDevicesRequest::contextDestroyed() {
75 m_controller.clear(); 75 m_controller.clear();
76 m_resolver.clear(); 76 m_resolver.clear();
77 } 77 }
78 78
79 DEFINE_TRACE(MediaDevicesRequest) { 79 DEFINE_TRACE(MediaDevicesRequest) {
80 visitor->trace(m_controller); 80 visitor->trace(m_controller);
81 visitor->trace(m_resolver); 81 visitor->trace(m_resolver);
82 ActiveDOMObject::trace(visitor); 82 SuspendableObject::trace(visitor);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698