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

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

Issue 2477573002: [Presentation API] (3rd) (1-UA) Split PresentationServiceDelegateImpl(PSDImpl) (Closed)
Patch Set: fix windows compile error Created 3 years, 11 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_OBSERVERS_H_
5 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_OBSERVERS_H_
6
7 #include <map>
8
9 #include "chrome/browser/media/router/render_frame_host_id.h"
10 #include "content/public/browser/presentation_service_delegate.h"
11
12 namespace media_router {
13
14 class PresentationServiceDelegateObservers {
15 public:
16 PresentationServiceDelegateObservers();
17 virtual ~PresentationServiceDelegateObservers();
18
19 // Registers an observer associated with frame with |render_process_id|
20 // and |render_frame_id| with this class to listen for updates.
21 // This class does not own the observer.
22 // It is an error to add an observer if there is already an observer for that
23 // frame.
24 virtual void AddObserver(
25 int render_process_id,
26 int render_frame_id,
27 content::PresentationServiceDelegate::Observer* observer);
28
29 // Unregisters the observer associated with the frame with |render_process_id|
30 // and |render_frame_id|.
31 // The observer will no longer receive updates.
32 virtual void RemoveObserver(int render_process_id, int render_frame_id);
33
34 private:
35 std::map<RenderFrameHostId, content::PresentationServiceDelegate::Observer*>
36 observers_;
37 };
38
39 } // namespace media_router
40
41 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_OBSERVERS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698