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

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

Issue 1302793002: Refactor "options" argument to getUserMedia to be a dictionary (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 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 27 matching lines...) Expand all
38 #include "platform/mediastream/MediaStreamSource.h" 38 #include "platform/mediastream/MediaStreamSource.h"
39 #include "public/platform/WebMediaConstraints.h" 39 #include "public/platform/WebMediaConstraints.h"
40 #include "wtf/Forward.h" 40 #include "wtf/Forward.h"
41 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class Dictionary; 45 class Dictionary;
46 class Document; 46 class Document;
47 class ExceptionState; 47 class ExceptionState;
48 class MediaStreamConstraints;
48 class MediaStreamDescriptor; 49 class MediaStreamDescriptor;
49 class UserMediaController; 50 class UserMediaController;
50 51
51 class MODULES_EXPORT UserMediaRequest final : public GarbageCollectedFinalized<U serMediaRequest>, public ContextLifecycleObserver { 52 class MODULES_EXPORT UserMediaRequest final : public GarbageCollectedFinalized<U serMediaRequest>, public ContextLifecycleObserver {
52 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UserMediaRequest); 53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UserMediaRequest);
53 public: 54 public:
54 static UserMediaRequest* create(ExecutionContext*, UserMediaController*, con st Dictionary& options, NavigatorUserMediaSuccessCallback*, NavigatorUserMediaEr rorCallback*, ExceptionState&); 55 static UserMediaRequest* create(ExecutionContext*, UserMediaController*, con st MediaStreamConstraints& options, NavigatorUserMediaSuccessCallback*, Navigato rUserMediaErrorCallback*, ExceptionState&);
55 virtual ~UserMediaRequest(); 56 virtual ~UserMediaRequest();
56 57
57 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); } 58 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); }
58 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); } 59 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); }
59 Document* ownerDocument(); 60 Document* ownerDocument();
60 61
61 void start(); 62 void start();
62 63
63 void succeed(PassRefPtr<MediaStreamDescriptor>); 64 void succeed(PassRefPtr<MediaStreamDescriptor>);
64 void failPermissionDenied(const String& message); 65 void failPermissionDenied(const String& message);
(...skipping 18 matching lines...) Expand all
83 84
84 RawPtrWillBeMember<UserMediaController> m_controller; 85 RawPtrWillBeMember<UserMediaController> m_controller;
85 86
86 Member<NavigatorUserMediaSuccessCallback> m_successCallback; 87 Member<NavigatorUserMediaSuccessCallback> m_successCallback;
87 Member<NavigatorUserMediaErrorCallback> m_errorCallback; 88 Member<NavigatorUserMediaErrorCallback> m_errorCallback;
88 }; 89 };
89 90
90 } // namespace blink 91 } // namespace blink
91 92
92 #endif // UserMediaRequest_h 93 #endif // UserMediaRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698