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

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

Issue 2833213002: DevTools: retain DTAH in all the targets to match their life time. (Closed)
Patch Set: Created 3 years, 8 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 // Returns DevToolsAgentHost type to use for given |host| target. 29 // Returns DevToolsAgentHost type to use for given |host| target.
30 virtual std::string GetTargetType(RenderFrameHost* host); 30 virtual std::string GetTargetType(RenderFrameHost* host);
31 31
32 // Returns DevToolsAgentHost title to use for given |host| target. 32 // Returns DevToolsAgentHost title to use for given |host| target.
33 virtual std::string GetTargetTitle(RenderFrameHost* host); 33 virtual std::string GetTargetTitle(RenderFrameHost* host);
34 34
35 // Returns DevToolsAgentHost title to use for given |host| target. 35 // Returns DevToolsAgentHost title to use for given |host| target.
36 virtual std::string GetTargetDescription(RenderFrameHost* host); 36 virtual std::string GetTargetDescription(RenderFrameHost* host);
37 37
38 // Returns whether embedder wants to be responsible for targets.
dgozman 2017/04/22 00:00:45 nit: extra dot at the end..
39 // discovery. If yes, DiscoverTargets is called.
40 virtual bool CanDiscoverTargets();
41
38 // Returns all targets embedder would like to report as discoverable. 42 // Returns all targets embedder would like to report as discoverable.
39 // If returns false, all targets content is aware of and only those 43 // If returns false, all targets content is aware of and only those
40 // should be discoverable. 44 // should be discoverable.
41 virtual bool DiscoverTargets( 45 virtual DevToolsAgentHost::List DiscoverTargets();
42 const DevToolsAgentHost::DiscoveryCallback& callback);
43 46
44 // Creates new inspectable target given the |url|. 47 // Creates new inspectable target given the |url|.
45 virtual scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url); 48 virtual scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url);
46 49
47 // Result ownership is passed to the caller. 50 // Result ownership is passed to the caller.
48 virtual base::DictionaryValue* HandleCommand( 51 virtual base::DictionaryValue* HandleCommand(
49 DevToolsAgentHost* agent_host, 52 DevToolsAgentHost* agent_host,
50 base::DictionaryValue* command); 53 base::DictionaryValue* command);
51 54
52 using CommandCallback = 55 using CommandCallback =
53 base::Callback<void(std::unique_ptr<base::DictionaryValue> response)>; 56 base::Callback<void(std::unique_ptr<base::DictionaryValue> response)>;
54 // Handle async command, feed response to CommandCallback when it is ready.
55 virtual bool HandleAsyncCommand(DevToolsAgentHost* agent_host, 57 virtual bool HandleAsyncCommand(DevToolsAgentHost* agent_host,
56 base::DictionaryValue* command, 58 base::DictionaryValue* command,
57 const CommandCallback& callback); 59 const CommandCallback& callback);
58
59 // Should return discovery page HTML that should list available tabs 60 // Should return discovery page HTML that should list available tabs
60 // and provide attach links. 61 // and provide attach links.
61 virtual std::string GetDiscoveryPageHTML(); 62 virtual std::string GetDiscoveryPageHTML();
62 63
63 // Returns frontend resource data by |path|. 64 // Returns frontend resource data by |path|.
64 virtual std::string GetFrontendResource(const std::string& path); 65 virtual std::string GetFrontendResource(const std::string& path);
65 66
66 virtual ~DevToolsManagerDelegate(); 67 virtual ~DevToolsManagerDelegate();
67 }; 68 };
68 69
69 } // namespace content 70 } // namespace content
70 71
71 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ 72 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698