| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 10 |
| 9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 11 #include "content/public/browser/devtools_agent_host.h" | 13 #include "content/public/browser/devtools_agent_host.h" |
| 12 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 13 | 15 |
| 14 namespace base { | 16 namespace base { |
| 15 class DictionaryValue; | 17 class DictionaryValue; |
| 16 } | 18 } |
| 17 | 19 |
| 18 namespace content { | 20 namespace content { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 40 const DevToolsAgentHost::DiscoveryCallback& callback); | 42 const DevToolsAgentHost::DiscoveryCallback& callback); |
| 41 | 43 |
| 42 // Creates new inspectable target given the |url|. | 44 // Creates new inspectable target given the |url|. |
| 43 virtual scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url); | 45 virtual scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url); |
| 44 | 46 |
| 45 // Result ownership is passed to the caller. | 47 // Result ownership is passed to the caller. |
| 46 virtual base::DictionaryValue* HandleCommand( | 48 virtual base::DictionaryValue* HandleCommand( |
| 47 DevToolsAgentHost* agent_host, | 49 DevToolsAgentHost* agent_host, |
| 48 base::DictionaryValue* command); | 50 base::DictionaryValue* command); |
| 49 | 51 |
| 52 using CommandCallback = |
| 53 base::Callback<void(std::unique_ptr<base::DictionaryValue> response)>; |
| 54 virtual bool HandleAsyncCommand(DevToolsAgentHost* agent_host, |
| 55 base::DictionaryValue* command, |
| 56 CommandCallback callback); |
| 50 // Should return discovery page HTML that should list available tabs | 57 // Should return discovery page HTML that should list available tabs |
| 51 // and provide attach links. | 58 // and provide attach links. |
| 52 virtual std::string GetDiscoveryPageHTML(); | 59 virtual std::string GetDiscoveryPageHTML(); |
| 53 | 60 |
| 54 // Returns frontend resource data by |path|. | 61 // Returns frontend resource data by |path|. |
| 55 virtual std::string GetFrontendResource(const std::string& path); | 62 virtual std::string GetFrontendResource(const std::string& path); |
| 56 | 63 |
| 57 virtual ~DevToolsManagerDelegate(); | 64 virtual ~DevToolsManagerDelegate(); |
| 58 }; | 65 }; |
| 59 | 66 |
| 60 } // namespace content | 67 } // namespace content |
| 61 | 68 |
| 62 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ | 69 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ |
| OLD | NEW |