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

Side by Side Diff: mojo/public/cpp/bindings/lib/native_enum_data.h

Issue 2064903002: Mojo: Report bindings validation errors via MojoNotifyBadMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
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 MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_ENUM_DATA_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_ENUM_DATA_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_ENUM_DATA_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_ENUM_DATA_H_
7 7
8 namespace mojo { 8 namespace mojo {
9 namespace internal { 9 namespace internal {
10 10
11 class ValidationContext;
12
11 class NativeEnum_Data { 13 class NativeEnum_Data {
12 public: 14 public:
13 static bool const kIsExtensible = true; 15 static bool const kIsExtensible = true;
14 16
15 static bool IsKnownValue(int32_t value) { return false; } 17 static bool IsKnownValue(int32_t value) { return false; }
16 18
17 static bool Validate(int32_t value) { return true; } 19 static bool Validate(int32_t value,
20 ValidationContext* validation_context) { return true; }
18 }; 21 };
19 22
20 } // namespace internal 23 } // namespace internal
21 } // namespace mojo 24 } // namespace mojo
22 25
23 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_ENUM_DATA_H_ 26 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_NATIVE_ENUM_DATA_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/lib/native_struct_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698