| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MOJO_IMPL_H_ | 5 #ifndef COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MOJO_IMPL_H_ | 
| 6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MOJO_IMPL_H_ | 6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MOJO_IMPL_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/macros.h" | 10 #include "base/macros.h" | 
| 11 #include "components/safe_json/public/interfaces/safe_json.mojom.h" | 11 #include "components/safe_json/public/interfaces/safe_json.mojom.h" | 
| 12 | 12 | 
|  | 13 namespace service_manager { | 
|  | 14 struct BindSourceInfo; | 
|  | 15 } | 
|  | 16 | 
| 13 namespace safe_json { | 17 namespace safe_json { | 
| 14 | 18 | 
| 15 class SafeJsonParserMojoImpl : public mojom::SafeJsonParser { | 19 class SafeJsonParserMojoImpl : public mojom::SafeJsonParser { | 
| 16  public: | 20  public: | 
| 17   SafeJsonParserMojoImpl(); | 21   SafeJsonParserMojoImpl(); | 
| 18   ~SafeJsonParserMojoImpl() override; | 22   ~SafeJsonParserMojoImpl() override; | 
| 19 | 23 | 
| 20   static void Create(mojo::InterfaceRequest<mojom::SafeJsonParser> request); | 24   static void Create(const service_manager::BindSourceInfo& source_info, | 
|  | 25                      mojom::SafeJsonParserRequest request); | 
| 21 | 26 | 
| 22  private: | 27  private: | 
| 23   // mojom::SafeJsonParser implementation. | 28   // mojom::SafeJsonParser implementation. | 
| 24   void Parse(const std::string& json, const ParseCallback& callback) override; | 29   void Parse(const std::string& json, const ParseCallback& callback) override; | 
| 25 | 30 | 
| 26   DISALLOW_COPY_AND_ASSIGN(SafeJsonParserMojoImpl); | 31   DISALLOW_COPY_AND_ASSIGN(SafeJsonParserMojoImpl); | 
| 27 }; | 32 }; | 
| 28 | 33 | 
| 29 }  // namespace safe_json | 34 }  // namespace safe_json | 
| 30 | 35 | 
| 31 #endif  // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MOJO_IMPL_H_ | 36 #endif  // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_MOJO_IMPL_H_ | 
| OLD | NEW | 
|---|