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

Unified Diff: content/browser/presentation/presentation_service_impl.h

Issue 2174693004: [Presentation API] Add support to content/ for multiple URLs per PresentationRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update service, dispatcher to use Mojo URLs. Created 4 years, 4 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/browser/presentation/presentation_service_impl.h
diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h
index e6e21088ef29af26628d5b224bee06521114fb1a..af8beae57342c8a5b1ded7295cd9fc2505fdc4fc 100644
--- a/content/browser/presentation/presentation_service_impl.h
+++ b/content/browser/presentation/presentation_service_impl.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
#include <string>
+#include <vector>
#include "base/callback.h"
#include "base/compiler_specific.h"
@@ -72,11 +73,11 @@ class CONTENT_EXPORT PresentationServiceImpl
OtherRenderFrameDeleted);
FRIEND_TEST_ALL_PREFIXES(PresentationServiceImplTest, DelegateFails);
FRIEND_TEST_ALL_PREFIXES(PresentationServiceImplTest,
- SetDefaultPresentationUrl);
+ SetDefaultPresentationUrls);
FRIEND_TEST_ALL_PREFIXES(PresentationServiceImplTest,
- SetSameDefaultPresentationUrl);
+ SetSameDefaultPresentationUrls);
FRIEND_TEST_ALL_PREFIXES(PresentationServiceImplTest,
- ClearDefaultPresentationUrl);
+ ClearDefaultPresentationUrls);
FRIEND_TEST_ALL_PREFIXES(PresentationServiceImplTest,
ListenForDefaultSessionStart);
FRIEND_TEST_ALL_PREFIXES(PresentationServiceImplTest,
@@ -150,21 +151,22 @@ class CONTENT_EXPORT PresentationServiceImpl
PresentationServiceDelegate* delegate);
// PresentationService implementation.
- void SetDefaultPresentationURL(const std::string& url) override;
+ void SetDefaultPresentationUrls(
+ std::vector<url::mojom::UrlPtr> presentation_urls) override;
dcheng 2016/08/26 18:13:33 url.mojom.UrlPtr is already typemapped: does const
mark a. foltz 2016/08/29 23:54:54 Done. Oddly the generated mojom.h interface switc
void SetClient(blink::mojom::PresentationServiceClientPtr client) override;
- void ListenForScreenAvailability(const std::string& url) override;
- void StopListeningForScreenAvailability(const std::string& url) override;
- void StartSession(const std::string& presentation_url,
+ void ListenForScreenAvailability(url::mojom::UrlPtr url) override;
+ void StopListeningForScreenAvailability(url::mojom::UrlPtr url) override;
+ void StartSession(std::vector<url::mojom::UrlPtr> presentation_urls,
const NewSessionCallback& callback) override;
- void JoinSession(const std::string& presentation_url,
+ void JoinSession(std::vector<url::mojom::UrlPtr> presentation_urls,
const base::Optional<std::string>& presentation_id,
const NewSessionCallback& callback) override;
void SendSessionMessage(blink::mojom::PresentationSessionInfoPtr session_info,
blink::mojom::SessionMessagePtr session_message,
const SendSessionMessageCallback& callback) override;
- void CloseConnection(const std::string& presentation_url,
+ void CloseConnection(url::mojom::UrlPtr presentation_url,
const std::string& presentation_id) override;
- void Terminate(const std::string& presentation_url,
+ void Terminate(url::mojom::UrlPtr presentation_url,
const std::string& presentation_id) override;
void ListenForSessionMessages(
blink::mojom::PresentationSessionInfoPtr session) override;
@@ -253,7 +255,7 @@ class CONTENT_EXPORT PresentationServiceImpl
// availability) to.
blink::mojom::PresentationServiceClientPtr client_;
- std::string default_presentation_url_;
+ std::vector<std::string> default_presentation_urls_;
using ScreenAvailabilityListenerMap =
std::map<std::string, std::unique_ptr<ScreenAvailabilityListenerImpl>>;

Powered by Google App Engine
This is Rietveld 408576698