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

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, 8 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 failPermissionDenied(const String& message); 63 void failPermissionDenied(const String& message);
64 void failConstraint(const String& constraintName, const String& message); 64 void failConstraint(const String& constraintName, const String& message);
65 void failUASpecific(const String& name, const String& message, const String& constraintName); 65 void failUASpecific(const String& name, const String& message, const String& constraintName);
66 66
67 bool audio() const; 67 bool audio() const;
68 bool video() const; 68 bool video() const;
69 blink::WebMediaConstraints audioConstraints() const; 69 blink::WebMediaConstraints audioConstraints() const;
70 blink::WebMediaConstraints videoConstraints() const; 70 blink::WebMediaConstraints videoConstraints() const;
71 71
72 // ContextLifecycleObserver 72 // ContextLifecycleObserver
73 virtual void contextDestroyed() OVERRIDE; 73 virtual void contextDestroyed() OVERRIDE;
74 74
75 void trace(Visitor*) { }
76
75 private: 77 private:
76 UserMediaRequest(ExecutionContext*, UserMediaController*, blink::WebMediaCon straints audio, blink::WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaS uccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>); 78 UserMediaRequest(ExecutionContext*, UserMediaController*, blink::WebMediaCon straints audio, blink::WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaS uccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>);
77 79
78 blink::WebMediaConstraints m_audio; 80 blink::WebMediaConstraints m_audio;
79 blink::WebMediaConstraints m_video; 81 blink::WebMediaConstraints m_video;
80 82
81 UserMediaController* m_controller; 83 UserMediaController* m_controller;
82 84
83 OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback; 85 OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback;
84 OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback; 86 OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback;
85 }; 87 };
86 88
87 } // namespace WebCore 89 } // namespace WebCore
88 90
89 #endif // UserMediaRequest_h 91 #endif // UserMediaRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698