Chromium Code Reviews| 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" | |
|
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_ | |
| OLD | NEW |