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

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

Issue 17351003: Rename ContextDestructionObserver to ContextLifecycleObserver (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reapplied Created 7 years, 6 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 | Annotate | Revision Log
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 class Dictionary; 46 class Dictionary;
47 class Document; 47 class Document;
48 class MediaConstraints; 48 class MediaConstraints;
49 class MediaConstraintsImpl; 49 class MediaConstraintsImpl;
50 class MediaStreamDescriptor; 50 class MediaStreamDescriptor;
51 class UserMediaController; 51 class UserMediaController;
52 52
53 class UserMediaRequest : public MediaStreamSourcesQueryClient, public ContextDes tructionObserver { 53 class UserMediaRequest : public MediaStreamSourcesQueryClient, public ContextLif ecycleObserver {
54 public: 54 public:
55 static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMedi aController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCal lback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&); 55 static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMedi aController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCal lback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&);
56 ~UserMediaRequest(); 56 ~UserMediaRequest();
57 57
58 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); } 58 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); }
59 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); } 59 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); }
60 Document* ownerDocument(); 60 Document* ownerDocument();
61 61
62 void start(); 62 void start();
63 63
64 void succeed(PassRefPtr<MediaStreamDescriptor>); 64 void succeed(PassRefPtr<MediaStreamDescriptor>);
65 void fail(const String& description); 65 void fail(const String& description);
66 void failConstraint(const String& constraintName, const String& description) ; 66 void failConstraint(const String& constraintName, const String& description) ;
67 67
68 MediaConstraints* audioConstraints() const; 68 MediaConstraints* audioConstraints() const;
69 MediaConstraints* videoConstraints() const; 69 MediaConstraints* videoConstraints() const;
70 70
71 // MediaStreamSourcesQueryClient 71 // MediaStreamSourcesQueryClient
72 virtual bool audio() const; 72 virtual bool audio() const;
73 virtual bool video() const; 73 virtual bool video() const;
74 virtual void didCompleteQuery(const MediaStreamSourceVector& audioSources, c onst MediaStreamSourceVector& videoSources); 74 virtual void didCompleteQuery(const MediaStreamSourceVector& audioSources, c onst MediaStreamSourceVector& videoSources);
75 75
76 // ContextDestructionObserver 76 // ContextLifecycleObserver
77 virtual void contextDestroyed(); 77 virtual void contextDestroyed();
78 78
79 private: 79 private:
80 UserMediaRequest(ScriptExecutionContext*, UserMediaController*, PassRefPtr<M ediaConstraintsImpl> audio, PassRefPtr<MediaConstraintsImpl> video, PassRefPtr<N avigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>); 80 UserMediaRequest(ScriptExecutionContext*, UserMediaController*, PassRefPtr<M ediaConstraintsImpl> audio, PassRefPtr<MediaConstraintsImpl> video, PassRefPtr<N avigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>);
81 81
82 RefPtr<MediaConstraintsImpl> m_audio; 82 RefPtr<MediaConstraintsImpl> m_audio;
83 RefPtr<MediaConstraintsImpl> m_video; 83 RefPtr<MediaConstraintsImpl> m_video;
84 84
85 UserMediaController* m_controller; 85 UserMediaController* m_controller;
86 86
87 RefPtr<NavigatorUserMediaSuccessCallback> m_successCallback; 87 RefPtr<NavigatorUserMediaSuccessCallback> m_successCallback;
88 RefPtr<NavigatorUserMediaErrorCallback> m_errorCallback; 88 RefPtr<NavigatorUserMediaErrorCallback> m_errorCallback;
89 }; 89 };
90 90
91 } // namespace WebCore 91 } // namespace WebCore
92 92
93 #endif // UserMediaRequest_h 93 #endif // UserMediaRequest_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStream.cpp ('k') | Source/modules/mediastream/UserMediaRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698