| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Defines the Chrome Extensions Debugger API functions for attaching debugger | 5 // Defines the Chrome Extensions Debugger API functions for attaching debugger |
| 6 // to the page. | 6 // to the page. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "chrome/browser/extensions/extension_function.h" | 13 #include "chrome/browser/extensions/extension_function.h" |
| 14 #include "chrome/common/extensions/api/debugger.h" | 14 #include "chrome/common/extensions/api/debugger.h" |
| 15 #include "content/public/browser/worker_service.h" |
| 15 | 16 |
| 16 using extensions::api::debugger::Debuggee; | 17 using extensions::api::debugger::Debuggee; |
| 17 | 18 |
| 18 // Base debugger function. | 19 // Base debugger function. |
| 19 | 20 |
| 20 class ExtensionDevToolsClientHost; | 21 class ExtensionDevToolsClientHost; |
| 21 | 22 |
| 22 namespace base { | 23 namespace base { |
| 23 class DictionaryValue; | 24 class DictionaryValue; |
| 24 } | 25 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 94 |
| 94 DebuggerGetTargetsFunction(); | 95 DebuggerGetTargetsFunction(); |
| 95 | 96 |
| 96 protected: | 97 protected: |
| 97 virtual ~DebuggerGetTargetsFunction(); | 98 virtual ~DebuggerGetTargetsFunction(); |
| 98 | 99 |
| 99 // ExtensionFunction: | 100 // ExtensionFunction: |
| 100 virtual bool RunImpl() OVERRIDE; | 101 virtual bool RunImpl() OVERRIDE; |
| 101 | 102 |
| 102 private: | 103 private: |
| 103 void CollectWorkerInfo(base::ListValue* list); | 104 typedef std::vector<content::WorkerService::WorkerInfo> WorkerInfoList; |
| 104 | 105 |
| 105 void SendTargetList(base::ListValue* list); | 106 WorkerInfoList CollectWorkerInfo(); |
| 107 |
| 108 void SendTargetList(base::ListValue* list, |
| 109 const WorkerInfoList& worker_info); |
| 106 }; | 110 }; |
| 107 | 111 |
| 108 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ | 112 #endif // CHROME_BROWSER_EXTENSIONS_API_DEBUGGER_DEBUGGER_API_H_ |
| OLD | NEW |