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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h

Issue 1375773004: Revert of [Oilpan] Move MediaStream{Source|Component|Descriptor} to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 21 matching lines...) Expand all
32 #define UserMediaRequest_h 32 #define UserMediaRequest_h
33 33
34 #include "core/dom/ActiveDOMObject.h" 34 #include "core/dom/ActiveDOMObject.h"
35 #include "core/frame/OriginsUsingFeatures.h" 35 #include "core/frame/OriginsUsingFeatures.h"
36 #include "modules/ModulesExport.h" 36 #include "modules/ModulesExport.h"
37 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h" 37 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h"
38 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h" 38 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h"
39 #include "platform/mediastream/MediaStreamSource.h" 39 #include "platform/mediastream/MediaStreamSource.h"
40 #include "public/platform/WebMediaConstraints.h" 40 #include "public/platform/WebMediaConstraints.h"
41 #include "wtf/Forward.h" 41 #include "wtf/Forward.h"
42 #include "wtf/PassRefPtr.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class Dictionary; 46 class Dictionary;
46 class Document; 47 class Document;
47 class ExceptionState; 48 class ExceptionState;
48 class MediaStreamConstraints; 49 class MediaStreamConstraints;
49 class MediaStreamDescriptor; 50 class MediaStreamDescriptor;
50 class UserMediaController; 51 class UserMediaController;
51 52
52 class MODULES_EXPORT UserMediaRequest final : public GarbageCollectedFinalized<U serMediaRequest>, public ContextLifecycleObserver { 53 class MODULES_EXPORT UserMediaRequest final : public GarbageCollectedFinalized<U serMediaRequest>, public ContextLifecycleObserver {
53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UserMediaRequest); 54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UserMediaRequest);
54 public: 55 public:
55 static UserMediaRequest* create(ExecutionContext*, UserMediaController*, con st MediaStreamConstraints& options, NavigatorUserMediaSuccessCallback*, Navigato rUserMediaErrorCallback*, ExceptionState&); 56 static UserMediaRequest* create(ExecutionContext*, UserMediaController*, con st MediaStreamConstraints& options, NavigatorUserMediaSuccessCallback*, Navigato rUserMediaErrorCallback*, ExceptionState&);
56 virtual ~UserMediaRequest(); 57 virtual ~UserMediaRequest();
57 58
58 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); } 59 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); }
59 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); } 60 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); }
60 Document* ownerDocument(); 61 Document* ownerDocument();
61 62
62 void start(); 63 void start();
63 64
64 void succeed(MediaStreamDescriptor*); 65 void succeed(PassRefPtr<MediaStreamDescriptor>);
65 void failPermissionDenied(const String& message); 66 void failPermissionDenied(const String& message);
66 void failConstraint(const String& constraintName, const String& message); 67 void failConstraint(const String& constraintName, const String& message);
67 void failUASpecific(const String& name, const String& message, const String& constraintName); 68 void failUASpecific(const String& name, const String& message, const String& constraintName);
68 69
69 bool audio() const; 70 bool audio() const;
70 bool video() const; 71 bool video() const;
71 WebMediaConstraints audioConstraints() const; 72 WebMediaConstraints audioConstraints() const;
72 WebMediaConstraints videoConstraints() const; 73 WebMediaConstraints videoConstraints() const;
73 74
74 // errorMessage is only set if requestIsPrivilegedContext() returns |false|. 75 // errorMessage is only set if requestIsPrivilegedContext() returns |false|.
(...skipping 13 matching lines...) Expand all
88 89
89 RawPtrWillBeMember<UserMediaController> m_controller; 90 RawPtrWillBeMember<UserMediaController> m_controller;
90 91
91 Member<NavigatorUserMediaSuccessCallback> m_successCallback; 92 Member<NavigatorUserMediaSuccessCallback> m_successCallback;
92 Member<NavigatorUserMediaErrorCallback> m_errorCallback; 93 Member<NavigatorUserMediaErrorCallback> m_errorCallback;
93 }; 94 };
94 95
95 } // namespace blink 96 } // namespace blink
96 97
97 #endif // UserMediaRequest_h 98 #endif // UserMediaRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698