| Index: chrome/utility/media_router/dial_device_description_parser_impl.h
|
| diff --git a/chrome/utility/media_router/dial_device_description_parser_impl.h b/chrome/utility/media_router/dial_device_description_parser_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a07f0fdd0e19869c88c555a3f2739fdcbeb10f25
|
| --- /dev/null
|
| +++ b/chrome/utility/media_router/dial_device_description_parser_impl.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2017 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 CHROME_UTILITY_MEDIA_ROUTER_DIAL_DEVICE_DESCRIPTION_PARSER_IMPL_H_
|
| +#define CHROME_UTILITY_MEDIA_ROUTER_DIAL_DEVICE_DESCRIPTION_PARSER_IMPL_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "chrome/common/media_router/dial_device_description_parser.mojom.h"
|
| +
|
| +namespace media_router {
|
| +
|
| +// Implementation of Mojo DialDeviceDescriptionParser. It accepts device
|
| +// description parsing request from browser process, and handles it in utility
|
| +// process. Class must be created and destroyed on utility thread.
|
| +class DialDeviceDescriptionParserImpl
|
| + : public chrome::mojom::DialDeviceDescriptionParser {
|
| + public:
|
| + DialDeviceDescriptionParserImpl();
|
| + ~DialDeviceDescriptionParserImpl() override;
|
| +
|
| + static void Create(chrome::mojom::DialDeviceDescriptionParserRequest request);
|
| +
|
| + private:
|
| + friend class DialDeviceDescriptionParserImplTest;
|
| +
|
| + // extensions::mojom::DialDeviceDescriptionParser:
|
| + void ParseDialDeviceDescription(
|
| + const std::string& device_description_xml_data,
|
| + const ParseDialDeviceDescriptionCallback& callback) override;
|
| +
|
| + // Processes the result of getting device description. Returns valid
|
| + // DialDeviceDescriptionPtr if processing succeeds; otherwise returns nullptr.
|
| + // |xml|: The device description xml text.
|
| + chrome::mojom::DialDeviceDescriptionPtr Parse(const std::string& xml);
|
| +
|
| + base::ThreadChecker thread_checker_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DialDeviceDescriptionParserImpl);
|
| +};
|
| +
|
| +} // namespace media_router
|
| +
|
| +#endif // CHROME_UTILITY_MEDIA_ROUTER_DIAL_DEVICE_DESCRIPTION_PARSER_IMPL_H_
|
|
|