| OLD | NEW |
| 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 ASH_PUBLIC_INTERFACES_WALLPAPER_ENUM_TRAITS_H_ | 5 #ifndef ASH_PUBLIC_INTERFACES_WALLPAPER_STRUCT_TRAITS_H_ |
| 6 #define ASH_PUBLIC_INTERFACES_WALLPAPER_ENUM_TRAITS_H_ | 6 #define ASH_PUBLIC_INTERFACES_WALLPAPER_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "ash/public/interfaces/wallpaper.mojom.h" | 8 #include "ash/public/interfaces/wallpaper.mojom.h" |
| 9 #include "components/wallpaper/wallpaper_layout.h" | 9 #include "components/wallpaper/wallpaper_layout.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 | 12 |
| 13 template <> | 13 template <> |
| 14 struct EnumTraits<ash::mojom::WallpaperLayout, wallpaper::WallpaperLayout> { | 14 struct EnumTraits<ash::mojom::WallpaperLayout, wallpaper::WallpaperLayout> { |
| 15 static ash::mojom::WallpaperLayout ToMojom(wallpaper::WallpaperLayout input) { | 15 static ash::mojom::WallpaperLayout ToMojom(wallpaper::WallpaperLayout input) { |
| 16 switch (input) { | 16 switch (input) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 45 *out = wallpaper::WALLPAPER_LAYOUT_TILE; | 45 *out = wallpaper::WALLPAPER_LAYOUT_TILE; |
| 46 return true; | 46 return true; |
| 47 } | 47 } |
| 48 NOTREACHED(); | 48 NOTREACHED(); |
| 49 return false; | 49 return false; |
| 50 } | 50 } |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace mojo | 53 } // namespace mojo |
| 54 | 54 |
| 55 #endif // ASH_PUBLIC_INTERFACES_WALLPAPER_ENUM_TRAITS_H_ | 55 #endif // ASH_PUBLIC_INTERFACES_WALLPAPER_STRUCT_TRAITS_H_ |
| OLD | NEW |