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

Unified Diff: content/public/browser/presentation_service_delegate.h

Issue 1073893003: [Presentation API] Implement ondefaultsessionstart in PSImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use RunLoopFor Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/presentation_service_delegate.h
diff --git a/content/public/browser/presentation_service_delegate.h b/content/public/browser/presentation_service_delegate.h
index 817cd282a8f246eac8ac6a2e7bda0ccba940f5f7..fd82045e669888a756a16a85336eed7f723fb7fd 100644
--- a/content/public/browser/presentation_service_delegate.h
+++ b/content/public/browser/presentation_service_delegate.h
@@ -23,6 +23,13 @@ class CONTENT_EXPORT PresentationServiceDelegate {
// Called when the PresentationServiceDelegate is being destroyed.
virtual void OnDelegateDestroyed() = 0;
+ // Called when the default presentation has been started outside of a
+ // Presentation API context (e.g., browser action). This will not be called
+ // if the session was created as a result of Presentation API's
+ // StartSession()/JoinSession().
+ virtual void OnDefaultPresentationStarted(
+ const PresentationSessionInfo& session) = 0;
+
protected:
virtual ~Observer() {}
};
@@ -34,12 +41,19 @@ class CONTENT_EXPORT PresentationServiceDelegate {
virtual ~PresentationServiceDelegate() {}
- // Registers an observer with this class to listen for updates to this class.
+ // Registers an observer associated with frame with |render_process_id|
+ // and |render_frame_id| with this class to listen for updates.
// This class does not own the observer.
- // It is an error to add an observer if it has already been added before.
- virtual void AddObserver(Observer* observer) = 0;
- // Unregisters an observer with this class.
- virtual void RemoveObserver(Observer* observer) = 0;
+ // It is an error to add an observer if there is already an observer for that
+ // frame.
+ virtual void AddObserver(int render_process_id,
+ int render_frame_id,
+ Observer* observer) = 0;
+
+ // Unregisters the observer associated with the frame with |render_process_id|
+ // and |render_frame_id|.
+ // The observer will no longer receive updates.
+ virtual void RemoveObserver(int render_process_id, int render_frame_id) = 0;
// Registers |listener| to continuously listen for
// availability updates for a presentation URL, originated from the frame
« no previous file with comments | « content/common/presentation/presentation_service.mojom ('k') | content/renderer/presentation/presentation_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698