Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Side by Side Diff: content/public/browser/devtools_manager_delegate.h

Issue 2344753002: DevTools: return discovered targets asynchronously. (Closed)
Patch Set: for bots Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 8 #include <string>
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/devtools_agent_host.h"
11 #include "url/gurl.h" 12 #include "url/gurl.h"
12 13
13 namespace base { 14 namespace base {
14 class DictionaryValue; 15 class DictionaryValue;
15 } 16 }
16 17
17 namespace content { 18 namespace content {
18 19
19 class BrowserContext; 20 class BrowserContext;
20 class DevToolsAgentHost;
21 class RenderFrameHost; 21 class RenderFrameHost;
22 22
23 class CONTENT_EXPORT DevToolsManagerDelegate { 23 class CONTENT_EXPORT DevToolsManagerDelegate {
24 public: 24 public:
25 // Opens the inspector for |agent_host|. 25 // Opens the inspector for |agent_host|.
26 virtual void Inspect(DevToolsAgentHost* agent_host); 26 virtual void Inspect(DevToolsAgentHost* agent_host);
27 27
28 virtual void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host, 28 virtual void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host,
29 bool attached); 29 bool attached);
30 30
31 // Returns DevToolsAgentHost type to use for given |host| target. 31 // Returns DevToolsAgentHost type to use for given |host| target.
32 virtual std::string GetTargetType(RenderFrameHost* host); 32 virtual std::string GetTargetType(RenderFrameHost* host);
33 33
34 // Returns DevToolsAgentHost title to use for given |host| target. 34 // Returns DevToolsAgentHost title to use for given |host| target.
35 virtual std::string GetTargetTitle(RenderFrameHost* host); 35 virtual std::string GetTargetTitle(RenderFrameHost* host);
36 36
37 // Returns DevToolsAgentHost title to use for given |host| target. 37 // Returns DevToolsAgentHost title to use for given |host| target.
38 virtual std::string GetTargetDescription(RenderFrameHost* host); 38 virtual std::string GetTargetDescription(RenderFrameHost* host);
39 39
40 // Returns all targets embedder would like to report as discoverable.
41 // If returns false, all targets content is aware of and only those
42 // should be discoverable.
43 virtual bool DiscoverTargets(
44 const DevToolsAgentHost::DiscoveryCallback& callback);
45
40 // Creates new inspectable target given the |url|. 46 // Creates new inspectable target given the |url|.
41 virtual scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url); 47 virtual scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url);
42 48
43 // Result ownership is passed to the caller. 49 // Result ownership is passed to the caller.
44 virtual base::DictionaryValue* HandleCommand( 50 virtual base::DictionaryValue* HandleCommand(
45 DevToolsAgentHost* agent_host, 51 DevToolsAgentHost* agent_host,
46 base::DictionaryValue* command); 52 base::DictionaryValue* command);
47 53
48 // Should return discovery page HTML that should list available tabs 54 // Should return discovery page HTML that should list available tabs
49 // and provide attach links. 55 // and provide attach links.
50 virtual std::string GetDiscoveryPageHTML(); 56 virtual std::string GetDiscoveryPageHTML();
51 57
52 // Returns frontend resource data by |path|. 58 // Returns frontend resource data by |path|.
53 virtual std::string GetFrontendResource(const std::string& path); 59 virtual std::string GetFrontendResource(const std::string& path);
54 60
55 virtual ~DevToolsManagerDelegate(); 61 virtual ~DevToolsManagerDelegate();
56 }; 62 };
57 63
58 } // namespace content 64 } // namespace content
59 65
60 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ 66 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/devtools_agent_host.h ('k') | content/public/browser/devtools_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698