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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void set_description(const std::string& desc) { description_ = desc; } | 77 void set_description(const std::string& desc) { description_ = desc; } |
78 void set_url(const GURL& url) { url_ = url; } | 78 void set_url(const GURL& url) { url_ = url; } |
79 void set_favicon_url(const GURL& url) { favicon_url_ = url; } | 79 void set_favicon_url(const GURL& url) { favicon_url_ = url; } |
80 void set_last_activity_time(const base::TimeTicks& time) { | 80 void set_last_activity_time(const base::TimeTicks& time) { |
81 last_activity_time_ = time; | 81 last_activity_time_ = time; |
82 } | 82 } |
83 | 83 |
84 typedef std::vector<DevToolsTargetImpl*> List; | 84 typedef std::vector<DevToolsTargetImpl*> List; |
85 typedef base::Callback<void(const List&)> Callback; | 85 typedef base::Callback<void(const List&)> Callback; |
86 | 86 |
87 static List EnumerateWebContentsTargets(); | |
88 static void EnumerateWorkerTargets(Callback callback); | |
89 static void EnumerateAllTargets(Callback callback); | 87 static void EnumerateAllTargets(Callback callback); |
90 | 88 |
91 private: | 89 private: |
92 scoped_refptr<content::DevToolsAgentHost> agent_host_; | 90 scoped_refptr<content::DevToolsAgentHost> agent_host_; |
93 std::string parent_id_; | 91 std::string parent_id_; |
94 std::string type_; | 92 std::string type_; |
95 std::string title_; | 93 std::string title_; |
96 std::string description_; | 94 std::string description_; |
97 GURL url_; | 95 GURL url_; |
98 GURL favicon_url_; | 96 GURL favicon_url_; |
99 base::TimeTicks last_activity_time_; | 97 base::TimeTicks last_activity_time_; |
100 }; | 98 }; |
101 | 99 |
102 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ | 100 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ |
OLD | NEW |