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

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

Issue 2613153003: [Presentation API] Replaces type converters with typemaps (Closed)
Patch Set: Add more OWNERS foo 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 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 ddcf5e6c821a2119e8576165d1dd6670d6043436..9538e90e7d645174ee744d8d5745b54f38050df4 100644
--- a/content/renderer/presentation/presentation_dispatcher.h
+++ b/content/renderer/presentation/presentation_dispatcher.h
@@ -19,6 +19,7 @@
#include "base/id_map.h"
#include "base/macros.h"
#include "content/common/content_export.h"
+#include "content/public/common/presentation_session.h"
#include "content/public/renderer/render_frame_observer.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h"
@@ -65,11 +66,11 @@ class CONTENT_EXPORT PresentationDispatcher
TestSetDefaultPresentationUrls);
struct SendMessageRequest {
- SendMessageRequest(blink::mojom::PresentationSessionInfoPtr session_info,
+ SendMessageRequest(const PresentationSessionInfo& session_info,
blink::mojom::ConnectionMessagePtr message);
~SendMessageRequest();
- blink::mojom::PresentationSessionInfoPtr session_info;
+ PresentationSessionInfo session_info;
blink::mojom::ConnectionMessagePtr message;
};
@@ -128,25 +129,23 @@ class CONTENT_EXPORT PresentationDispatcher
// blink::mojom::PresentationServiceClient
void OnScreenAvailabilityNotSupported(const GURL& url) override;
void OnScreenAvailabilityUpdated(const GURL& url, bool available) override;
- void OnConnectionStateChanged(
- blink::mojom::PresentationSessionInfoPtr session_info,
- blink::mojom::PresentationConnectionState state) override;
- void OnConnectionClosed(
- blink::mojom::PresentationSessionInfoPtr session_info,
- blink::mojom::PresentationConnectionCloseReason reason,
- const std::string& message) override;
+ void OnConnectionStateChanged(const PresentationSessionInfo& session_info,
+ PresentationConnectionState state) override;
+ void OnConnectionClosed(const PresentationSessionInfo& session_info,
+ PresentationConnectionCloseReason reason,
+ const std::string& message) override;
void OnConnectionMessagesReceived(
- blink::mojom::PresentationSessionInfoPtr session_info,
+ const PresentationSessionInfo& session_info,
std::vector<blink::mojom::ConnectionMessagePtr> messages) override;
void OnDefaultSessionStarted(
- blink::mojom::PresentationSessionInfoPtr session_info) override;
+ const PresentationSessionInfo& session_info) override;
void OnSessionCreated(
std::unique_ptr<blink::WebPresentationConnectionCallback> callback,
- blink::mojom::PresentationSessionInfoPtr session_info,
- blink::mojom::PresentationErrorPtr error);
+ const base::Optional<PresentationSessionInfo>& session_info,
+ const base::Optional<PresentationError>& error);
void OnReceiverConnectionAvailable(
- blink::mojom::PresentationSessionInfoPtr,
+ const PresentationSessionInfo& session_info,
blink::mojom::PresentationConnectionPtr,
imcheng 2017/01/24 23:31:40 nit: add names for the parameters.
nasko 2017/01/25 17:58:16 I wouldn't call this a nit, according to Chromium
mark a. foltz 2017/01/27 22:41:08 They're unused and should be commented out per sty
blink::mojom::PresentationConnectionRequest) override;

Powered by Google App Engine
This is Rietveld 408576698