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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
970 } | 970 } |
971 | 971 |
972 void DevToolsUIBindings::FileSystemRemoved( | 972 void DevToolsUIBindings::FileSystemRemoved( |
973 const std::string& file_system_path) { | 973 const std::string& file_system_path) { |
974 base::StringValue file_system_path_value(file_system_path); | 974 base::StringValue file_system_path_value(file_system_path); |
975 CallClientFunction("DevToolsAPI.fileSystemRemoved", | 975 CallClientFunction("DevToolsAPI.fileSystemRemoved", |
976 &file_system_path_value, NULL, NULL); | 976 &file_system_path_value, NULL, NULL); |
977 } | 977 } |
978 | 978 |
979 void DevToolsUIBindings::FilePathsChanged( | 979 void DevToolsUIBindings::FilePathsChanged( |
980 const std::vector<std::string>& file_paths) { | 980 const std::vector<std::string>& changed_paths, |
981 base::ListValue list; | 981 const std::vector<std::string>& added_paths, |
982 for (auto path : file_paths) | 982 const std::vector<std::string>& removed_paths) { |
983 list.AppendString(path); | 983 base::ListValue added, changed, removed; |
984 CallClientFunction("DevToolsAPI.fileSystemFilesChanged", | 984 for (auto path : changed_paths) |
985 &list, NULL, NULL); | 985 changed.AppendString(path); |
986 for (auto path : added_paths) | |
987 added.AppendString(path); | |
988 for (auto path : removed_paths) | |
989 removed.AppendString(path); | |
990 | |
991 CallClientFunction("DevToolsAPI.fileSystemFilesChanged", &changed, &added, | |
dgozman
2016/10/04 02:26:41
Let's pass single parameter here and not change de
lushnikov
2016/10/04 02:51:59
Done.
| |
992 &removed); | |
986 } | 993 } |
987 | 994 |
988 void DevToolsUIBindings::IndexingTotalWorkCalculated( | 995 void DevToolsUIBindings::IndexingTotalWorkCalculated( |
989 int request_id, | 996 int request_id, |
990 const std::string& file_system_path, | 997 const std::string& file_system_path, |
991 int total_work) { | 998 int total_work) { |
992 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 999 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
993 base::FundamentalValue request_id_value(request_id); | 1000 base::FundamentalValue request_id_value(request_id); |
994 base::StringValue file_system_path_value(file_system_path); | 1001 base::StringValue file_system_path_value(file_system_path); |
995 base::FundamentalValue total_work_value(total_work); | 1002 base::FundamentalValue total_work_value(total_work); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1161 void DevToolsUIBindings::FrontendLoaded() { | 1168 void DevToolsUIBindings::FrontendLoaded() { |
1162 if (frontend_loaded_) | 1169 if (frontend_loaded_) |
1163 return; | 1170 return; |
1164 frontend_loaded_ = true; | 1171 frontend_loaded_ = true; |
1165 | 1172 |
1166 // Call delegate first - it seeds importants bit of information. | 1173 // Call delegate first - it seeds importants bit of information. |
1167 delegate_->OnLoadCompleted(); | 1174 delegate_->OnLoadCompleted(); |
1168 | 1175 |
1169 AddDevToolsExtensionsToClient(); | 1176 AddDevToolsExtensionsToClient(); |
1170 } | 1177 } |
OLD | NEW |