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

Side by Side Diff: third_party/WebKit/Source/web/UserMediaClientImpl.cpp

Issue 2206533003: Refactor lifetime management of UserMediaController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "public/web/WebFrameClient.h" 34 #include "public/web/WebFrameClient.h"
35 #include "public/web/WebMediaDeviceChangeObserver.h" 35 #include "public/web/WebMediaDeviceChangeObserver.h"
36 #include "public/web/WebMediaDevicesRequest.h" 36 #include "public/web/WebMediaDevicesRequest.h"
37 #include "public/web/WebUserMediaClient.h" 37 #include "public/web/WebUserMediaClient.h"
38 #include "public/web/WebUserMediaRequest.h" 38 #include "public/web/WebUserMediaRequest.h"
39 #include "web/WebLocalFrameImpl.h" 39 #include "web/WebLocalFrameImpl.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 UserMediaClientImpl::UserMediaClientImpl(WebLocalFrameImpl* webFrame) 44 UserMediaClientImpl::UserMediaClientImpl(WebUserMediaClient* client)
45 : m_client(webFrame->client() ? webFrame->client()->userMediaClient() : 0) 45 : m_client(client)
46 { 46 {
47 } 47 }
48 48
49 void UserMediaClientImpl::requestUserMedia(UserMediaRequest* request) 49 void UserMediaClientImpl::requestUserMedia(UserMediaRequest* request)
50 { 50 {
51 if (m_client) 51 if (m_client)
52 m_client->requestUserMedia(request); 52 m_client->requestUserMedia(request);
53 } 53 }
54 54
55 void UserMediaClientImpl::cancelUserMediaRequest(UserMediaRequest* request) 55 void UserMediaClientImpl::cancelUserMediaRequest(UserMediaRequest* request)
(...skipping 20 matching lines...) Expand all
76 m_client->requestSources(request); 76 m_client->requestSources(request);
77 } 77 }
78 78
79 void UserMediaClientImpl::setMediaDeviceChangeObserver(MediaDevices* observer) 79 void UserMediaClientImpl::setMediaDeviceChangeObserver(MediaDevices* observer)
80 { 80 {
81 if (m_client) 81 if (m_client)
82 m_client->setMediaDeviceChangeObserver(WebMediaDeviceChangeObserver(obse rver)); 82 m_client->setMediaDeviceChangeObserver(WebMediaDeviceChangeObserver(obse rver));
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698