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

Unified Diff: content/common/presentation/presentation_message.h

Issue 1037483003: [PresentationAPI] Implementing send() from WebPresentationClient to the PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated callback handling, message invalidation and and sending generic message struct. 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/common/presentation/presentation_message.h
diff --git a/content/common/presentation/presentation_message.h b/content/common/presentation/presentation_message.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba9488bd126a78c821df2871099d00b9ae42b219
--- /dev/null
+++ b/content/common/presentation/presentation_message.h
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_PRESENTATION_PRESENTATION_MESSAGE_H_
imcheng 2015/04/22 20:12:02 This file and the .cc file should go under content
USE s.singapati at gmail.com 2015/04/23 12:39:23 presentation_message.h needs to be included both i
+#define CONTENT_COMMON_PRESENTATION_PRESENTATION_MESSAGE_H_
+
+#include <string>
+#include <vector>
+
+#include "content/common/content_export.h"
+#include "content/common/presentation/presentation_service.mojom.h"
+
+namespace content {
+
+enum CONTENT_EXPORT PresentationMessageType {
+ TEXT,
+ ARRAY_BUFFER,
+};
+
+// Message to be exchanged between presentation sessions.
+struct CONTENT_EXPORT MessageRequest {
imcheng 2015/04/22 20:12:02 Please be more specific in the class name. Perhaps
USE s.singapati at gmail.com 2015/04/27 19:28:56 In mojom file: struct "SessionMessage" would be be
+ MessageRequest(
+ const std::string& presentation_url,
+ const std::string& presentation_id,
+ const std::string& message);
+ MessageRequest(
+ const std::string& presentation_url,
+ const std::string& presentation_id,
+ const std::vector<uint8_t>& data);
+ MessageRequest(presentation::MessageRequestPtr request);
+ ~MessageRequest();
+
+ const std::string presentation_url;
+ const std::string presentation_id;
+ PresentationMessageType type;
+ const std::string message;
+ const std::vector<uint8_t> data;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_PRESENTATION_PRESENTATION_MESSAGE_H_

Powered by Google App Engine
This is Rietveld 408576698