Fix some interleaving issues in EmbeddedWorkerInstance.
[chromium-blink-merge.git] / chrome / utility / safe_json_parser_handler.h
blob8eeaf3e7d30522107e35178caf7f27f6adb64338
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_UTILITY_SAFE_JSON_PARSER_HANDLER_H_
6 #define CHROME_UTILITY_SAFE_JSON_PARSER_HANDLER_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/utility/utility_message_handler.h"
12 namespace safe_json {
13 class SafeJsonParserMessageFilter;
14 } // namespace safe_json
16 // Dispatches IPCs for out of process JSON parsing. This is an adapter class
17 // that delegates to safe_json::SafeJsonParserMessageFilter, since the
18 // SafeJsonParserMessageFilter in //components/safe_json can't directly
19 // depend on //chrome/utility.
20 class SafeJsonParserHandler : public UtilityMessageHandler {
21 public:
22 SafeJsonParserHandler();
23 ~SafeJsonParserHandler() override;
25 // UtilityMessageHandler
26 bool OnMessageReceived(const IPC::Message& message) override;
28 private:
29 scoped_ptr<safe_json::SafeJsonParserMessageFilter> handler_;
31 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserHandler);
34 #endif // CHROME_UTILITY_SAFE_JSON_PARSER_HANDLER_H_