| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Open a new DevTools window or activate the existing one. | 52 // Open a new DevTools window or activate the existing one. |
| 53 virtual void Inspect(Profile* profile) const; | 53 virtual void Inspect(Profile* profile) const; |
| 54 | 54 |
| 55 // Reload the target page. | 55 // Reload the target page. |
| 56 virtual void Reload() const; | 56 virtual void Reload() const; |
| 57 | 57 |
| 58 // Creates a new target associated with RenderViewHost. | 58 // Creates a new target associated with RenderViewHost. |
| 59 static scoped_ptr<DevToolsTargetImpl> CreateForRenderViewHost( | 59 static scoped_ptr<DevToolsTargetImpl> CreateForRenderViewHost( |
| 60 content::RenderViewHost*, bool is_tab); | 60 content::RenderViewHost*, bool is_tab); |
| 61 | 61 |
| 62 // Creates a new target associated with a shared worker. | |
| 63 static scoped_ptr<DevToolsTargetImpl> CreateForWorker( | |
| 64 const content::WorkerService::WorkerInfo&); | |
| 65 | |
| 66 typedef std::vector<DevToolsTargetImpl*> List; | 62 typedef std::vector<DevToolsTargetImpl*> List; |
| 67 typedef base::Callback<void(const List&)> Callback; | 63 typedef base::Callback<void(const List&)> Callback; |
| 68 | 64 |
| 69 static List EnumerateRenderViewHostTargets(); | 65 static List EnumerateRenderViewHostTargets(); |
| 70 static void EnumerateWorkerTargets(Callback callback); | 66 static void EnumerateWorkerTargets(Callback callback); |
| 71 static void EnumerateAllTargets(Callback callback); | 67 static void EnumerateAllTargets(Callback callback); |
| 72 | 68 |
| 73 protected: | 69 protected: |
| 74 scoped_refptr<content::DevToolsAgentHost> agent_host_; | 70 scoped_refptr<content::DevToolsAgentHost> agent_host_; |
| 75 std::string id_; | 71 std::string id_; |
| 76 std::string type_; | 72 std::string type_; |
| 77 std::string title_; | 73 std::string title_; |
| 78 std::string description_; | 74 std::string description_; |
| 79 GURL url_; | 75 GURL url_; |
| 80 GURL favicon_url_; | 76 GURL favicon_url_; |
| 81 base::TimeTicks last_activity_time_; | 77 base::TimeTicks last_activity_time_; |
| 82 }; | 78 }; |
| 83 | 79 |
| 84 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ | 80 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_ |
| OLD | NEW |