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

Side by Side Diff: content/common/presentation/presentation_message.cc

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/presentation/presentation_message.h"
6
7 namespace content {
8
9 MessageRequest::MessageRequest(
10 const std::string& presentation_url,
11 const std::string& presentation_id,
12 const std::string& message)
13 : presentation_url(presentation_url),
14 presentation_id(presentation_id),
15 type(TEXT),
16 message(message) {
17 }
18
19 MessageRequest::MessageRequest(
20 const std::string& presentation_url,
21 const std::string& presentation_id,
22 const std::vector<uint8_t>& data)
23 : presentation_url(presentation_url),
24 presentation_id(presentation_id),
25 type(ARRAY_BUFFER),
26 data(data) {
27 }
28
29 MessageRequest::MessageRequest(presentation::MessageRequestPtr request)
30 : presentation_url(request->presentation_url),
31 presentation_id(request->presentation_id),
32 type(static_cast<PresentationMessageType>(request->type)),
33 message(request->message),
34 data(request->data) {
35 }
36
37 MessageRequest::~MessageRequest() {
38 }
39
40 } // namespace content
41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698