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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_struct_traits.h

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « cc/ipc/transferable_resource_struct_traits.cc ('k') | components/arc/common/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/media/router/mojo/media_router.mojom.h" 10 #include "chrome/browser/media/router/mojo/media_router.mojom.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 13
14 template <> 14 template <>
15 struct StructTraits<media_router::mojom::RouteMessage, 15 struct StructTraits<media_router::mojom::RouteMessageDataView,
16 media_router::RouteMessage> { 16 media_router::RouteMessage> {
17 static media_router::mojom::RouteMessage::Type type( 17 static media_router::mojom::RouteMessage::Type type(
18 const media_router::RouteMessage& msg) { 18 const media_router::RouteMessage& msg) {
19 switch (msg.type) { 19 switch (msg.type) {
20 case media_router::RouteMessage::TEXT: 20 case media_router::RouteMessage::TEXT:
21 return media_router::mojom::RouteMessage::Type::TEXT; 21 return media_router::mojom::RouteMessage::Type::TEXT;
22 case media_router::RouteMessage::BINARY: 22 case media_router::RouteMessage::BINARY:
23 return media_router::mojom::RouteMessage::Type::BINARY; 23 return media_router::mojom::RouteMessage::Type::BINARY;
24 } 24 }
25 NOTREACHED(); 25 NOTREACHED();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 default: 61 default:
62 return false; 62 return false;
63 } 63 }
64 return true; 64 return true;
65 } 65 }
66 }; 66 };
67 67
68 } // namespace mojo 68 } // namespace mojo
69 69
70 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ 70 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « cc/ipc/transferable_resource_struct_traits.cc ('k') | components/arc/common/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698