| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/devtools/devtools_ui_bindings.h" | 5 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 const std::string& file_system_path) { | 1133 const std::string& file_system_path) { |
| 1134 base::StringValue file_system_path_value(file_system_path); | 1134 base::StringValue file_system_path_value(file_system_path); |
| 1135 CallClientFunction("DevToolsAPI.fileSystemRemoved", | 1135 CallClientFunction("DevToolsAPI.fileSystemRemoved", |
| 1136 &file_system_path_value, NULL, NULL); | 1136 &file_system_path_value, NULL, NULL); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 void DevToolsUIBindings::FilePathsChanged( | 1139 void DevToolsUIBindings::FilePathsChanged( |
| 1140 const std::vector<std::string>& changed_paths, | 1140 const std::vector<std::string>& changed_paths, |
| 1141 const std::vector<std::string>& added_paths, | 1141 const std::vector<std::string>& added_paths, |
| 1142 const std::vector<std::string>& removed_paths) { | 1142 const std::vector<std::string>& removed_paths) { |
| 1143 base::ListValue list; | 1143 base::ListValue changed, added, removed; |
| 1144 for (auto path : changed_paths) | 1144 changed.AppendStrings(changed_paths); |
| 1145 list.AppendString(path); | 1145 added.AppendStrings(added_paths); |
| 1146 for (auto path : added_paths) | 1146 removed.AppendStrings(removed_paths); |
| 1147 list.AppendString(path); | |
| 1148 for (auto path : removed_paths) | |
| 1149 list.AppendString(path); | |
| 1150 | 1147 |
| 1151 CallClientFunction("DevToolsAPI.fileSystemFilesChanged", | 1148 CallClientFunction("DevToolsAPI.fileSystemFilesChangedAddedRemoved", &changed, |
| 1152 &list, NULL, NULL); | 1149 &added, &removed); |
| 1153 } | 1150 } |
| 1154 | 1151 |
| 1155 void DevToolsUIBindings::IndexingTotalWorkCalculated( | 1152 void DevToolsUIBindings::IndexingTotalWorkCalculated( |
| 1156 int request_id, | 1153 int request_id, |
| 1157 const std::string& file_system_path, | 1154 const std::string& file_system_path, |
| 1158 int total_work) { | 1155 int total_work) { |
| 1159 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1156 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1160 base::FundamentalValue request_id_value(request_id); | 1157 base::FundamentalValue request_id_value(request_id); |
| 1161 base::StringValue file_system_path_value(file_system_path); | 1158 base::StringValue file_system_path_value(file_system_path); |
| 1162 base::FundamentalValue total_work_value(total_work); | 1159 base::FundamentalValue total_work_value(total_work); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 void DevToolsUIBindings::FrontendLoaded() { | 1344 void DevToolsUIBindings::FrontendLoaded() { |
| 1348 if (frontend_loaded_) | 1345 if (frontend_loaded_) |
| 1349 return; | 1346 return; |
| 1350 frontend_loaded_ = true; | 1347 frontend_loaded_ = true; |
| 1351 | 1348 |
| 1352 // Call delegate first - it seeds importants bit of information. | 1349 // Call delegate first - it seeds importants bit of information. |
| 1353 delegate_->OnLoadCompleted(); | 1350 delegate_->OnLoadCompleted(); |
| 1354 | 1351 |
| 1355 AddDevToolsExtensionsToClient(); | 1352 AddDevToolsExtensionsToClient(); |
| 1356 } | 1353 } |
| OLD | NEW |