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

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

Issue 24995003: DevTools: Extract target discovery and manipulation from DevToolsHttpHandlerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang compile and a minor bug Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h"
13 #include "content/common/content_export.h"
14 #include "content/public/browser/devtools_agent_host.h"
jam 2013/10/01 17:20:51 nit: forward declare instead
Vladislav Kaznacheev 2013/10/02 10:28:29 Done.
15 #include "url/gurl.h"
16
17 namespace content {
18
19 class CONTENT_EXPORT DevToolsTarget : public base::RefCounted<DevToolsTarget> {
jam 2013/10/01 17:20:51 1) why is this ref counted? 2) i dont think it nee
Vladislav Kaznacheev 2013/10/02 10:28:29 ref counted no longer, CONTENT_EXPORT removed, com
20 public:
21 // Returns the unique target id.
22 virtual std::string GetId() const = 0;
23
24 // Returns the target type.
25 virtual std::string GetType() const = 0;
26
27 // Returns the target title.
28 virtual std::string GetTitle() const = 0;
29
30 // Returns the target description.
31 virtual std::string GetDescription() const = 0;
32
33 // Returns the url associated with this target.
34 virtual GURL GetUrl() const = 0;
35
36 // Returns the favicon url for this target.
37 virtual GURL GetFaviconUrl() const = 0;
38
39 // Returns the time when the target was last active.
40 virtual base::TimeTicks GetLastActivityTime() const = 0;
41
42 // Returns true if the debugger is attached to the target.
43 virtual bool IsAttached() const = 0;
44
45 // Returns the agent host for this target.
46 virtual scoped_refptr<DevToolsAgentHost> GetAgentHost() const = 0;
47
48 // Activates the target. Returns false if the operation failed.
49 virtual bool Activate() const = 0;
50
51 // Closes the target. Returns false if the operation failed.
52 virtual bool Close() const = 0;
53
54 protected:
55 friend class base::RefCounted<DevToolsTarget>;
56
57 virtual ~DevToolsTarget() {}
58 };
59
60 } // namespace content
61
62 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698