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 "url/gurl.h" |
| 15 |
| 16 namespace content { |
| 17 |
| 18 class DevToolsAgentHost; |
| 19 |
| 20 // DevToolsTarget represents an inspectable target and can be used to |
| 21 // manipulate the target and query its details. |
| 22 // Instantiation and discovery of DevToolsTarget instances is the responsibility |
| 23 // of DevToolsHttpHandlerDelegate. |
| 24 class DevToolsTarget { |
| 25 public: |
| 26 virtual ~DevToolsTarget() {} |
| 27 |
| 28 // Returns the unique target id. |
| 29 virtual std::string GetId() const = 0; |
| 30 |
| 31 // Returns the target type. |
| 32 virtual std::string GetType() const = 0; |
| 33 |
| 34 // Returns the target title. |
| 35 virtual std::string GetTitle() const = 0; |
| 36 |
| 37 // Returns the target description. |
| 38 virtual std::string GetDescription() const = 0; |
| 39 |
| 40 // Returns the url associated with this target. |
| 41 virtual GURL GetUrl() const = 0; |
| 42 |
| 43 // Returns the favicon url for this target. |
| 44 virtual GURL GetFaviconUrl() const = 0; |
| 45 |
| 46 // Returns the time when the target was last active. |
| 47 virtual base::TimeTicks GetLastActivityTime() const = 0; |
| 48 |
| 49 // Returns true if the debugger is attached to the target. |
| 50 virtual bool IsAttached() const = 0; |
| 51 |
| 52 // Returns the agent host for this target. |
| 53 virtual scoped_refptr<DevToolsAgentHost> GetAgentHost() const = 0; |
| 54 |
| 55 // Activates the target. Returns false if the operation failed. |
| 56 virtual bool Activate() const = 0; |
| 57 |
| 58 // Closes the target. Returns false if the operation failed. |
| 59 virtual bool Close() const = 0; |
| 60 }; |
| 61 |
| 62 } // namespace content |
| 63 |
| 64 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_TARGET_H_ |
OLD | NEW |