OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void set_description(const std::string& desc) { description_ = desc; } | 66 void set_description(const std::string& desc) { description_ = desc; } |
67 void set_url(const GURL& url) { url_ = url; } | 67 void set_url(const GURL& url) { url_ = url; } |
68 void set_favicon_url(const GURL& url) { favicon_url_ = url; } | 68 void set_favicon_url(const GURL& url) { favicon_url_ = url; } |
69 void set_last_activity_time(const base::TimeTicks& time) { | 69 void set_last_activity_time(const base::TimeTicks& time) { |
70 last_activity_time_ = time; | 70 last_activity_time_ = time; |
71 } | 71 } |
72 | 72 |
73 typedef std::vector<DevToolsTargetImpl*> List; | 73 typedef std::vector<DevToolsTargetImpl*> List; |
74 typedef base::Callback<void(const List&)> Callback; | 74 typedef base::Callback<void(const List&)> Callback; |
75 | 75 |
76 static List EnumerateRenderViewHostTargets(); | 76 static void EnumerateRenderViewHostTargets(const Callback& callback); |
77 static void EnumerateWorkerTargets(Callback callback); | 77 static void EnumerateWorkerTargets(const Callback& callback); |
78 static void EnumerateAllTargets(Callback callback); | 78 static void EnumerateAllTargets(const Callback& callback); |
79 | 79 |
80 private: | 80 private: |
81 scoped_refptr<content::DevToolsAgentHost> agent_host_; | 81 scoped_refptr<content::DevToolsAgentHost> agent_host_; |
82 std::string parent_id_; | 82 std::string parent_id_; |
83 std::string type_; | 83 std::string type_; |
84 std::string title_; | 84 std::string title_; |
85 std::string description_; | 85 std::string description_; |
86 GURL url_; | 86 GURL url_; |
87 GURL favicon_url_; | 87 GURL favicon_url_; |
88 base::TimeTicks last_activity_time_; | 88 base::TimeTicks last_activity_time_; |
89 }; | 89 }; |
90 | 90 |
91 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ | 91 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ |
OLD | NEW |