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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
11 #include "base/callback.h"
14 class DictionaryValue
;
22 class DevToolsAgentHost
;
25 class DevToolsManagerDelegate
{
27 virtual ~DevToolsManagerDelegate() {}
29 // Opens the inspector for |agent_host|.
30 virtual void Inspect(BrowserContext
* browser_context
,
31 DevToolsAgentHost
* agent_host
) = 0;
33 virtual void DevToolsAgentStateChanged(DevToolsAgentHost
* agent_host
,
36 // Result ownership is passed to the caller.
37 virtual base::DictionaryValue
* HandleCommand(
38 DevToolsAgentHost
* agent_host
,
39 base::DictionaryValue
* command
) = 0;
41 // Creates new inspectable target.
42 virtual scoped_ptr
<DevToolsTarget
> CreateNewTarget(const GURL
& url
) = 0;
44 typedef std::vector
<DevToolsTarget
*> TargetList
;
45 typedef base::Callback
<void(const TargetList
&)> TargetCallback
;
47 // Requests the list of all inspectable targets.
48 // The caller gets the ownership of the returned targets.
49 virtual void EnumerateTargets(TargetCallback callback
) = 0;
51 // Get a thumbnail for a given page. Returns non-empty string iff we have the
53 virtual std::string
GetPageThumbnailData(const GURL
& url
) = 0;
56 } // namespace content
58 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_