| OLD | NEW |
| 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 HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ |
| 6 #define HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "content/public/browser/devtools_manager_delegate.h" | 15 #include "content/public/browser/devtools_manager_delegate.h" |
| 16 #include "printing/features/features.h" | 16 #include "printing/features/features.h" |
| 17 | 17 |
| 18 #if BUILDFLAG(ENABLE_BASIC_PRINTING) | 18 #if BUILDFLAG(ENABLE_BASIC_PRINTING) |
| 19 #include "headless/lib/browser/headless_print_manager.h" | 19 #include "headless/lib/browser/headless_print_manager.h" |
| 20 #include "headless/public/headless_export.h" |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 namespace headless { | 23 namespace headless { |
| 23 class HeadlessBrowserImpl; | 24 class HeadlessBrowserImpl; |
| 24 | 25 |
| 25 #if BUILDFLAG(ENABLE_BASIC_PRINTING) | 26 #if BUILDFLAG(ENABLE_BASIC_PRINTING) |
| 26 std::unique_ptr<base::DictionaryValue> ParsePrintSettings( | 27 // Exported for tests. |
| 28 HEADLESS_EXPORT std::unique_ptr<base::DictionaryValue> ParsePrintSettings( |
| 27 int command_id, | 29 int command_id, |
| 28 const base::DictionaryValue* params, | 30 const base::DictionaryValue* params, |
| 29 printing::HeadlessPrintSettings* settings); | 31 printing::HeadlessPrintSettings* settings); |
| 30 #endif | 32 #endif |
| 31 | 33 |
| 32 class HeadlessDevToolsManagerDelegate | 34 class HeadlessDevToolsManagerDelegate |
| 33 : public content::DevToolsManagerDelegate { | 35 : public content::DevToolsManagerDelegate { |
| 34 public: | 36 public: |
| 35 explicit HeadlessDevToolsManagerDelegate( | 37 explicit HeadlessDevToolsManagerDelegate( |
| 36 base::WeakPtr<HeadlessBrowserImpl> browser); | 38 base::WeakPtr<HeadlessBrowserImpl> browser); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 int command_id, | 78 int command_id, |
| 77 const base::DictionaryValue* params, | 79 const base::DictionaryValue* params, |
| 78 const CommandCallback& callback)>; | 80 const CommandCallback& callback)>; |
| 79 std::map<std::string, CommandMemberCallback> command_map_; | 81 std::map<std::string, CommandMemberCallback> command_map_; |
| 80 std::map<std::string, AsyncCommandMemberCallback> async_command_map_; | 82 std::map<std::string, AsyncCommandMemberCallback> async_command_map_; |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace headless | 85 } // namespace headless |
| 84 | 86 |
| 85 #endif // HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ | 87 #endif // HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ |
| OLD | NEW |