blob: 484a772a84e6b599f2959d0e32d8267f202ee06c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright 2017 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.
#include "content/common/presentation/presentation_struct_traits.h"
#include "url/mojom/url_gurl_mojom_traits.h"
namespace mojo {
bool UnionTraits<blink::mojom::PresentationConnectionMessageDataView,
content::PresentationConnectionMessage>::
Read(blink::mojom::PresentationConnectionMessageDataView data,
content::PresentationConnectionMessage* out) {
if (data.is_message()) {
if (!data.ReadMessage(&(out->message))) {
return false;
}
} else {
if (!data.ReadData(&(out->data))) {
return false;
}
}
return true;
}
}
|