OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_
PARSER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_
PARSER_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_
PARSER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_
PARSER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 using DeviceDescriptionCallback = chrome::mojom::DialDeviceDescriptionParser:: | 29 using DeviceDescriptionCallback = chrome::mojom::DialDeviceDescriptionParser:: |
30 ParseDialDeviceDescriptionCallback; | 30 ParseDialDeviceDescriptionCallback; |
31 | 31 |
32 SafeDialDeviceDescriptionParser(); | 32 SafeDialDeviceDescriptionParser(); |
33 virtual ~SafeDialDeviceDescriptionParser(); | 33 virtual ~SafeDialDeviceDescriptionParser(); |
34 | 34 |
35 // Start parsing device description XML file in utility process. | 35 // Start parsing device description XML file in utility process. |
36 // TODO(crbug.com/702766): Add an enum type describing why utility process | 36 // TODO(crbug.com/702766): Add an enum type describing why utility process |
37 // fails to parse device description xml. | 37 // fails to parse device description xml. |
38 virtual void Start(const std::string& xml_text, | 38 virtual void Start(const std::string& xml_text, |
39 const DeviceDescriptionCallback& callback); | 39 DeviceDescriptionCallback callback); |
40 | 40 |
41 private: | 41 private: |
42 // Utility client used to send device description parsing task to the utility | 42 // Utility client used to send device description parsing task to the utility |
43 // process. | 43 // process. |
44 std::unique_ptr<content::UtilityProcessMojoClient< | 44 std::unique_ptr<content::UtilityProcessMojoClient< |
45 chrome::mojom::DialDeviceDescriptionParser>> | 45 chrome::mojom::DialDeviceDescriptionParser>> |
46 utility_process_mojo_client_; | 46 utility_process_mojo_client_; |
47 | 47 |
48 base::ThreadChecker thread_checker_; | 48 base::ThreadChecker thread_checker_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(SafeDialDeviceDescriptionParser); | 50 DISALLOW_COPY_AND_ASSIGN(SafeDialDeviceDescriptionParser); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace media_router | 53 } // namespace media_router |
54 | 54 |
55 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTI
ON_PARSER_H_ | 55 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTI
ON_PARSER_H_ |
OLD | NEW |