OLD | NEW |
---|---|
(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" | |
15 #include "url/gurl.h" | |
16 | |
17 namespace content { | |
18 | |
19 class CONTENT_EXPORT DevToolsTarget | |
20 : public base::RefCountedThreadSafe<DevToolsTarget> { | |
pfeldman
2013/10/01 14:10:24
No need to be thread safe.
Vladislav Kaznacheev
2013/10/01 15:00:16
Done.
| |
21 public: | |
22 // Returns the unique target id. | |
23 virtual std::string GetId() const = 0; | |
24 | |
25 // Returns the target type (to be used by a client to group targets). | |
26 virtual std::string GetType() const = 0; | |
27 | |
28 // Returns the target title. | |
29 virtual std::string GetTitle() const = 0; | |
30 | |
31 // Returns the target description. | |
32 virtual std::string GetDescription() const = 0; | |
33 | |
34 // Returns the url associated with this target. | |
35 virtual GURL GetUrl() const = 0; | |
36 | |
37 // Returns the favicon url for this target. | |
38 virtual GURL GetFaviconUrl() const = 0; | |
39 | |
40 // Returns the time when the target was last active. | |
41 virtual base::TimeTicks GetLastActivityTime() const = 0; | |
42 | |
43 // Returns true if the debugger is attached to the target. | |
44 virtual bool IsAttached() const = 0; | |
45 | |
46 // Returns the agent host for this target. | |
47 virtual scoped_refptr<DevToolsAgentHost> GetAgentHost() const = 0; | |
48 | |
49 // Activates the target. Returns false if the operation failed. | |
50 virtual bool Activate() const = 0; | |
51 | |
52 // Closes the target. Returns false if the operation failed. | |
53 virtual bool Close() const = 0; | |
54 | |
55 protected: | |
56 friend class base::RefCountedThreadSafe<DevToolsTarget>; | |
57 | |
58 virtual ~DevToolsTarget() {} | |
59 }; | |
60 | |
61 } // namespace content | |
62 | |
63 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_ | |
OLD | NEW |