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

Unified Diff: ash/public/interfaces/shelf_enum_traits.h

Issue 2642973006: Include AIDL files in the presubmit check for IPC security. (Closed)
Patch Set: Move `using` statements. Created 3 years, 11 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
« no previous file with comments | « ash/public/interfaces/shelf.typemap ('k') | ash/public/interfaces/shelf_struct_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/interfaces/shelf_enum_traits.h
diff --git a/ash/public/interfaces/shelf_enum_traits.h b/ash/public/interfaces/shelf_enum_traits.h
deleted file mode 100644
index 4765ab423b39d0c7b67bb1fa3435f8b0be0304cb..0000000000000000000000000000000000000000
--- a/ash/public/interfaces/shelf_enum_traits.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2016 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 ASH_PUBLIC_INTERFACES_SHELF_ENUM_TRAITS_H_
-#define ASH_PUBLIC_INTERFACES_SHELF_ENUM_TRAITS_H_
-
-#include "ash/public/cpp/shelf_types.h"
-#include "ash/public/interfaces/shelf.mojom.h"
-
-namespace mojo {
-
-template <>
-struct EnumTraits<ash::mojom::ShelfAlignment, ash::ShelfAlignment> {
- static ash::mojom::ShelfAlignment ToMojom(ash::ShelfAlignment input) {
- switch (input) {
- case ash::SHELF_ALIGNMENT_BOTTOM:
- return ash::mojom::ShelfAlignment::BOTTOM;
- case ash::SHELF_ALIGNMENT_LEFT:
- return ash::mojom::ShelfAlignment::LEFT;
- case ash::SHELF_ALIGNMENT_RIGHT:
- return ash::mojom::ShelfAlignment::RIGHT;
- case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED:
- return ash::mojom::ShelfAlignment::BOTTOM_LOCKED;
- }
- NOTREACHED();
- return ash::mojom::ShelfAlignment::BOTTOM;
- }
-
- static bool FromMojom(ash::mojom::ShelfAlignment input,
- ash::ShelfAlignment* out) {
- switch (input) {
- case ash::mojom::ShelfAlignment::BOTTOM:
- *out = ash::SHELF_ALIGNMENT_BOTTOM;
- return true;
- case ash::mojom::ShelfAlignment::LEFT:
- *out = ash::SHELF_ALIGNMENT_LEFT;
- return true;
- case ash::mojom::ShelfAlignment::RIGHT:
- *out = ash::SHELF_ALIGNMENT_RIGHT;
- return true;
- case ash::mojom::ShelfAlignment::BOTTOM_LOCKED:
- *out = ash::SHELF_ALIGNMENT_BOTTOM_LOCKED;
- return true;
- }
- NOTREACHED();
- return false;
- }
-};
-
-template <>
-struct EnumTraits<ash::mojom::ShelfAutoHideBehavior,
- ash::ShelfAutoHideBehavior> {
- static ash::mojom::ShelfAutoHideBehavior ToMojom(
- ash::ShelfAutoHideBehavior input) {
- switch (input) {
- case ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS:
- return ash::mojom::ShelfAutoHideBehavior::ALWAYS;
- case ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER:
- return ash::mojom::ShelfAutoHideBehavior::NEVER;
- case ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN:
- return ash::mojom::ShelfAutoHideBehavior::HIDDEN;
- }
- NOTREACHED();
- return ash::mojom::ShelfAutoHideBehavior::NEVER;
- }
-
- static bool FromMojom(ash::mojom::ShelfAutoHideBehavior input,
- ash::ShelfAutoHideBehavior* out) {
- switch (input) {
- case ash::mojom::ShelfAutoHideBehavior::ALWAYS:
- *out = ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
- return true;
- case ash::mojom::ShelfAutoHideBehavior::NEVER:
- *out = ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
- return true;
- case ash::mojom::ShelfAutoHideBehavior::HIDDEN:
- *out = ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN;
- return true;
- }
- NOTREACHED();
- return false;
- }
-};
-
-} // namespace mojo
-
-#endif // ASH_PUBLIC_INTERFACES_SHELF_ENUM_TRAITS_H_
« no previous file with comments | « ash/public/interfaces/shelf.typemap ('k') | ash/public/interfaces/shelf_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698