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

Side by Side Diff: content/public/browser/presentation_service_delegate.h

Issue 887563006: [Reland] Support listening for available screens for multiple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed non_export_base from RenderFrameObserver Created 5 years, 10 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 CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
7 7
8 #include "content/common/content_export.h"
9
8 namespace content { 10 namespace content {
9 11
10 class PresentationScreenAvailabilityListener; 12 class PresentationScreenAvailabilityListener;
11 13
12 // An interface implemented by embedders to handle presentation API calls 14 // An interface implemented by embedders to handle presentation API calls
13 // forwarded from PresentationServiceImpl. 15 // forwarded from PresentationServiceImpl.
14 class PresentationServiceDelegate { 16 class CONTENT_EXPORT PresentationServiceDelegate {
15 public: 17 public:
16 // Observer interface to listen for changes to PresentationServiceDelegate. 18 // Observer interface to listen for changes to PresentationServiceDelegate.
17 class Observer { 19 class CONTENT_EXPORT Observer {
18 public: 20 public:
19 // Called when the PresentationServiceDelegate is being destroyed. 21 // Called when the PresentationServiceDelegate is being destroyed.
20 virtual void OnDelegateDestroyed() = 0; 22 virtual void OnDelegateDestroyed() = 0;
21 23
22 protected: 24 protected:
23 virtual ~Observer() {} 25 virtual ~Observer() {}
24 }; 26 };
25 27
28 virtual ~PresentationServiceDelegate() {}
29
26 // Registers an observer with this class to listen for updates to this class. 30 // Registers an observer with this class to listen for updates to this class.
27 // This class does not own the observer. 31 // This class does not own the observer.
28 // It is an error to add an observer if it has already been added before. 32 // It is an error to add an observer if it has already been added before.
29 virtual void AddObserver(Observer* observer) = 0; 33 virtual void AddObserver(Observer* observer) = 0;
30 // Unregisters an observer with this class. 34 // Unregisters an observer with this class.
31 virtual void RemoveObserver(Observer* observer) = 0; 35 virtual void RemoveObserver(Observer* observer) = 0;
32 36
33 // Registers |listener| to continuously listen for 37 // Registers |listener| to continuously listen for
34 // availability updates for a presentation URL, originated from the frame 38 // availability updates for a presentation URL, originated from the frame
35 // given by |render_process_id| and |render_frame_id|. 39 // given by |render_process_id| and |render_frame_id|.
(...skipping 12 matching lines...) Expand all
48 virtual void RemoveScreenAvailabilityListener( 52 virtual void RemoveScreenAvailabilityListener(
49 int render_process_id, 53 int render_process_id,
50 int render_frame_id, 54 int render_frame_id,
51 PresentationScreenAvailabilityListener* listener) = 0; 55 PresentationScreenAvailabilityListener* listener) = 0;
52 56
53 // Unregisters all listeners associated with the frame given by 57 // Unregisters all listeners associated with the frame given by
54 // |render_process_id| and |render_frame_id|. 58 // |render_process_id| and |render_frame_id|.
55 virtual void RemoveAllScreenAvailabilityListeners( 59 virtual void RemoveAllScreenAvailabilityListeners(
56 int render_process_id, 60 int render_process_id,
57 int render_frame_id) = 0; 61 int render_frame_id) = 0;
58
59 protected:
60 virtual ~PresentationServiceDelegate() {}
61 }; 62 };
62 63
63 } // namespace content 64 } // namespace content
64 65
65 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ 66 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698