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

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

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 30 matching lines...) Expand all
41 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 class Dictionary; 45 class Dictionary;
46 class Document; 46 class Document;
47 class ExceptionState; 47 class ExceptionState;
48 class MediaStreamDescriptor; 48 class MediaStreamDescriptor;
49 class UserMediaController; 49 class UserMediaController;
50 50
51 class UserMediaRequest FINAL : public RefCounted<UserMediaRequest>, public Conte xtLifecycleObserver { 51 class UserMediaRequest FINAL : public RefCountedWillBeGarbageCollectedFinalized< UserMediaRequest>, public ContextLifecycleObserver {
52 public: 52 public:
53 static PassRefPtr<UserMediaRequest> create(ExecutionContext*, UserMediaContr oller*, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> , PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&); 53 static PassRefPtrWillBeRawPtr<UserMediaRequest> create(ExecutionContext*, Us erMediaController*, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSucc essCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&);
54 virtual ~UserMediaRequest(); 54 virtual ~UserMediaRequest();
55 55
56 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); } 56 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes sCallback.get(); }
57 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); } 57 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb ack.get(); }
58 Document* ownerDocument(); 58 Document* ownerDocument();
59 59
60 void start(); 60 void start();
61 61
62 void succeed(PassRefPtr<MediaStreamDescriptor>); 62 void succeed(PassRefPtr<MediaStreamDescriptor>);
63 void fail(const String& description); 63 void fail(const String& description);
64 void failConstraint(const String& constraintName, const String& description) ; 64 void failConstraint(const String& constraintName, const String& description) ;
65 65
66 bool audio() const; 66 bool audio() const;
67 bool video() const; 67 bool video() const;
68 blink::WebMediaConstraints audioConstraints() const; 68 blink::WebMediaConstraints audioConstraints() const;
69 blink::WebMediaConstraints videoConstraints() const; 69 blink::WebMediaConstraints videoConstraints() const;
70 70
71 // ContextLifecycleObserver 71 // ContextLifecycleObserver
72 virtual void contextDestroyed() OVERRIDE; 72 virtual void contextDestroyed() OVERRIDE;
73 73
74 void trace(Visitor*) { }
75
74 private: 76 private:
75 UserMediaRequest(ExecutionContext*, UserMediaController*, blink::WebMediaCon straints audio, blink::WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaS uccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>); 77 UserMediaRequest(ExecutionContext*, UserMediaController*, blink::WebMediaCon straints audio, blink::WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaS uccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>);
76 78
77 blink::WebMediaConstraints m_audio; 79 blink::WebMediaConstraints m_audio;
78 blink::WebMediaConstraints m_video; 80 blink::WebMediaConstraints m_video;
79 81
80 UserMediaController* m_controller; 82 UserMediaController* m_controller;
81 83
82 OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback; 84 OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback;
83 OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback; 85 OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback;
84 }; 86 };
85 87
86 } // namespace WebCore 88 } // namespace WebCore
87 89
88 #endif // UserMediaRequest_h 90 #endif // UserMediaRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698