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

Side by Side Diff: chrome/browser/media/router/media_router.h

Issue 1376703002: Presentation API: reject screen availability observing on Android low ram devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix and add tests 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Registers |observer| with this MediaRouter. |observer| specifies a media 126 // Registers |observer| with this MediaRouter. |observer| specifies a media
127 // source and will receive updates with media sinks that are compatible with 127 // source and will receive updates with media sinks that are compatible with
128 // that source. The initial update may happen synchronously. 128 // that source. The initial update may happen synchronously.
129 // NOTE: This class does not assume ownership of |observer|. Callers must 129 // NOTE: This class does not assume ownership of |observer|. Callers must
130 // manage |observer| and make sure |UnregisterObserver()| is called 130 // manage |observer| and make sure |UnregisterObserver()| is called
131 // before the observer is destroyed. 131 // before the observer is destroyed.
132 // It is invalid to register the same observer more than once and will result 132 // It is invalid to register the same observer more than once and will result
133 // in undefined behavior. 133 // in undefined behavior.
134 // If the MRPM Host is not available, the registration request will fail 134 // If the MRPM Host is not available, the registration request will fail
135 // immediately. 135 // immediately.
136 virtual void RegisterMediaSinksObserver(MediaSinksObserver* observer) = 0; 136 // The implementation can reject the request to observe in which case it will
137 // notify the caller by returning |false|.
138 virtual bool RegisterMediaSinksObserver(MediaSinksObserver* observer) = 0;
137 139
138 // Removes a previously added MediaSinksObserver. |observer| will stop 140 // Removes a previously added MediaSinksObserver. |observer| will stop
139 // receiving further updates. 141 // receiving further updates.
140 virtual void UnregisterMediaSinksObserver(MediaSinksObserver* observer) = 0; 142 virtual void UnregisterMediaSinksObserver(MediaSinksObserver* observer) = 0;
141 143
142 // Adds a MediaRoutesObserver to listen for updates on MediaRoutes. 144 // Adds a MediaRoutesObserver to listen for updates on MediaRoutes.
143 // The initial update may happen synchronously. 145 // The initial update may happen synchronously.
144 // MediaRouter does not own |observer|. |UnregisterMediaRoutesObserver| should 146 // MediaRouter does not own |observer|. |UnregisterMediaRoutesObserver| should
145 // be called before |observer| is destroyed. 147 // be called before |observer| is destroyed.
146 // It is invalid to register the same observer more than once and will result 148 // It is invalid to register the same observer more than once and will result
(...skipping 23 matching lines...) Expand all
170 172
171 // Unregisters a previously registered PresentationSessionMessagesObserver. 173 // Unregisters a previously registered PresentationSessionMessagesObserver.
172 // |observer| will stop receiving further updates. 174 // |observer| will stop receiving further updates.
173 virtual void UnregisterPresentationSessionMessagesObserver( 175 virtual void UnregisterPresentationSessionMessagesObserver(
174 PresentationSessionMessagesObserver* observer) = 0; 176 PresentationSessionMessagesObserver* observer) = 0;
175 }; 177 };
176 178
177 } // namespace media_router 179 } // namespace media_router
178 180
179 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 181 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/android/router/media_router_android.cc ('k') | chrome/browser/media/router/media_router_mojo_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698