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

Side by Side Diff: Source/modules/mediastream/UserMediaController.h

Issue 791033003: Tidy up UserMediaController references from mediastream request objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix non-Oilpan compilation Created 6 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 20 matching lines...) Expand all
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class MediaDevicesRequest; 34 class MediaDevicesRequest;
35 class UserMediaRequest; 35 class UserMediaRequest;
36 36
37 class UserMediaController final : public NoBaseWillBeGarbageCollected<UserMediaC ontroller>, public WillBeHeapSupplement<LocalFrame> { 37 class UserMediaController final : public NoBaseWillBeGarbageCollected<UserMediaC ontroller>, public WillBeHeapSupplement<LocalFrame> {
38 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UserMediaController); 38 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UserMediaController);
39 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(UserMediaController); 39 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(UserMediaController);
40 public: 40 public:
41 static PassOwnPtrWillBeRawPtr<UserMediaController> create(UserMediaClient*);
41 42
42 UserMediaClient* client() const { return m_client; } 43 UserMediaClient* client() const { return m_client; }
43 44
44 void requestUserMedia(UserMediaRequest*); 45 void requestUserMedia(UserMediaRequest*);
45 void cancelUserMediaRequest(UserMediaRequest*); 46 void cancelUserMediaRequest(UserMediaRequest*);
46 47
47 void requestMediaDevices(MediaDevicesRequest*); 48 void requestMediaDevices(MediaDevicesRequest*);
48 void cancelMediaDevicesRequest(MediaDevicesRequest*); 49 void cancelMediaDevicesRequest(MediaDevicesRequest*);
49 50
50 void requestSources(MediaStreamTrackSourcesRequest*); 51 void requestSources(MediaStreamTrackSourcesRequest*);
51 52
52 static PassOwnPtrWillBeRawPtr<UserMediaController> create(UserMediaClient*);
53 static const char* supplementName(); 53 static const char* supplementName();
54 static UserMediaController* from(LocalFrame* frame) { return static_cast<Use rMediaController*>(WillBeHeapSupplement<LocalFrame>::from(frame, supplementName( ))); } 54 static UserMediaController* from(LocalFrame* frame) { return static_cast<Use rMediaController*>(WillBeHeapSupplement<LocalFrame>::from(frame, supplementName( ))); }
55 55
56 virtual void trace(Visitor* visitor) override { WillBeHeapSupplement<LocalFr ame>::trace(visitor); } 56 private:
57
58 protected:
59 explicit UserMediaController(UserMediaClient*); 57 explicit UserMediaController(UserMediaClient*);
60 58
61 private:
62 UserMediaClient* m_client; 59 UserMediaClient* m_client;
63 }; 60 };
64 61
65 inline void UserMediaController::requestUserMedia(UserMediaRequest* request) 62 inline void UserMediaController::requestUserMedia(UserMediaRequest* request)
66 { 63 {
67 m_client->requestUserMedia(request); 64 m_client->requestUserMedia(request);
68 } 65 }
69 66
70 inline void UserMediaController::cancelUserMediaRequest(UserMediaRequest* reques t) 67 inline void UserMediaController::cancelUserMediaRequest(UserMediaRequest* reques t)
71 { 68 {
(...skipping 11 matching lines...) Expand all
83 } 80 }
84 81
85 inline void UserMediaController::requestSources(MediaStreamTrackSourcesRequest* request) 82 inline void UserMediaController::requestSources(MediaStreamTrackSourcesRequest* request)
86 { 83 {
87 m_client->requestSources(request); 84 m_client->requestSources(request);
88 } 85 }
89 86
90 } // namespace blink 87 } // namespace blink
91 88
92 #endif // UserMediaController_h 89 #endif // UserMediaController_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaDevicesRequest.cpp ('k') | Source/modules/mediastream/UserMediaRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698