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

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

Issue 560323005: [DevTools] Move target-related methods from DevToolsHttpHandlerDelegate to DevToolsManagerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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>
9 #include <vector>
10
11 #include "base/callback.h"
12
8 namespace base { 13 namespace base {
9 class DictionaryValue; 14 class DictionaryValue;
10 } 15 }
11 16
17 class GURL;
18
12 namespace content { 19 namespace content {
13 20
14 class BrowserContext; 21 class BrowserContext;
15 class DevToolsAgentHost; 22 class DevToolsAgentHost;
23 class DevToolsTarget;
16 24
17 class DevToolsManagerDelegate { 25 class DevToolsManagerDelegate {
18 public: 26 public:
19 virtual ~DevToolsManagerDelegate() {} 27 virtual ~DevToolsManagerDelegate() {}
20 28
21 // Opens the inspector for |agent_host|. 29 // Opens the inspector for |agent_host|.
22 virtual void Inspect(BrowserContext* browser_context, 30 virtual void Inspect(BrowserContext* browser_context,
23 DevToolsAgentHost* agent_host) = 0; 31 DevToolsAgentHost* agent_host) = 0;
24 32
25 virtual void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host, 33 virtual void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host,
26 bool attached) = 0; 34 bool attached) = 0;
27 35
28 // Result ownership is passed to the caller. 36 // Result ownership is passed to the caller.
29 virtual base::DictionaryValue* HandleCommand( 37 virtual base::DictionaryValue* HandleCommand(
30 DevToolsAgentHost* agent_host, 38 DevToolsAgentHost* agent_host,
31 base::DictionaryValue* command) = 0; 39 base::DictionaryValue* command) = 0;
40
41 // Creates new inspectable target.
42 virtual scoped_ptr<DevToolsTarget> CreateNewTarget(const GURL& url) = 0;
43
44 typedef std::vector<DevToolsTarget*> TargetList;
45 typedef base::Callback<void(const TargetList&)> TargetCallback;
46
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;
50
51 // Get a thumbnail for a given page. Returns non-empty string iff we have the
52 // thumbnail.
53 virtual std::string GetPageThumbnailData(const GURL& url) = 0;
32 }; 54 };
33 55
34 } // namespace content 56 } // namespace content
35 57
36 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_ 58 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/devtools_http_handler_delegate.h ('k') | content/shell/browser/shell_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698