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

Unified Diff: content/renderer/presentation/presentation_dispatcher.h

Issue 935083002: [PresentationAPI] Implementing start/joinSession from WebPresentationClient to PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/presentation/presentation_dispatcher.h
diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h
index caf1840f2e0b5eab0ae6dfb0b6cbbe6b6e50d779..6814aa378787d74cdcbf467272a5cbac126a4c19 100644
--- a/content/renderer/presentation/presentation_dispatcher.h
+++ b/content/renderer/presentation/presentation_dispatcher.h
@@ -5,10 +5,14 @@
#ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
#define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
+#include <vector>
+
#include "base/compiler_specific.h"
+#include "base/memory/linked_ptr.h"
#include "content/common/content_export.h"
#include "content/common/presentation/presentation_service.mojom.h"
#include "content/public/renderer/render_frame_observer.h"
+#include "content/renderer/presentation/presentation_session_dispatcher.h"
#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h"
namespace content {
@@ -27,14 +31,35 @@ class CONTENT_EXPORT PresentationDispatcher
virtual void setController(
blink::WebPresentationController* controller);
virtual void updateAvailableChangeWatched(bool watched);
+ virtual void startSession(
+ const blink::WebString& presentationUrl,
+ const blink::WebString& presentationId,
+ blink::WebPresentationSessionCreateCallback* callback);
+ virtual void joinSession(
+ const blink::WebString& presentationUrl,
+ const blink::WebString& presentationId,
+ blink::WebPresentationSessionCreateCallback* callback);
void OnScreenAvailabilityChanged(bool available);
+ void OnSessionCreated(
+ blink::WebPresentationSessionCreateCallback* callback,
+ bool success,
+ mojo::InterfaceRequest<presentation::PresentationSession> session_request,
blundell 2015/02/18 15:35:16 Why is this called session_request? The idea is th
whywhat 2015/02/19 16:32:22 I misunderstood the concept of passing a Object?&
+ const mojo::String& url,
+ const mojo::String& id,
+ const mojo::String& error);
void ConnectToPresentationServiceIfNeeded();
// Used as a weak reference. Can be null since lifetime is bound to the frame.
blink::WebPresentationController* controller_;
presentation::PresentationServicePtr presentation_service_;
+
+ // Wrappers around the PresentationSessionPtr corresponding to each Javascript
+ // PresentationSession object passed back to the frame.
+ typedef std::vector<linked_ptr<PresentationSessionDispatcher>>
blundell 2015/02/18 15:35:16 Why linked_ptr?
whywhat 2015/02/19 16:32:22 Forgot about the existence of ScopedPtr I guess.
+ PresentationSessions;
+ PresentationSessions presentation_sessions_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698