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 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" |
6 | 6 |
7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
9 #include "apps/app_window.h" | 9 #include "apps/app_window.h" |
10 #include "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 const RuntimeError* error = | 382 const RuntimeError* error = |
383 static_cast<const RuntimeError*>(*iter); | 383 static_cast<const RuntimeError*>(*iter); |
384 scoped_ptr<base::DictionaryValue> value = error->ToValue(); | 384 scoped_ptr<base::DictionaryValue> value = error->ToValue(); |
385 bool can_inspect = content::RenderViewHost::FromID( | 385 bool can_inspect = content::RenderViewHost::FromID( |
386 error->render_process_id(), | 386 error->render_process_id(), |
387 error->render_view_id()) != NULL; | 387 error->render_view_id()) != NULL; |
388 value->SetBoolean("canInspect", can_inspect); | 388 value->SetBoolean("canInspect", can_inspect); |
389 info->runtime_errors.push_back(make_linked_ptr(value.release())); | 389 info->runtime_errors.push_back(make_linked_ptr(value.release())); |
390 break; | 390 break; |
391 } | 391 } |
| 392 case ExtensionError::NUM_ERROR_TYPES: |
| 393 NOTREACHED(); |
| 394 break; |
392 } | 395 } |
393 } | 396 } |
394 } | 397 } |
395 } else { | 398 } else { |
396 for (std::vector<extensions::InstallWarning>::const_iterator it = | 399 for (std::vector<extensions::InstallWarning>::const_iterator it = |
397 item.install_warnings().begin(); | 400 item.install_warnings().begin(); |
398 it != item.install_warnings().end(); | 401 it != item.install_warnings().end(); |
399 ++it) { | 402 ++it) { |
400 scoped_ptr<developer::InstallWarning> warning( | 403 scoped_ptr<developer::InstallWarning> warning( |
401 new developer::InstallWarning); | 404 new developer::InstallWarning); |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 } | 1357 } |
1355 | 1358 |
1356 error_ui_util::HandleOpenDevTools(dict); | 1359 error_ui_util::HandleOpenDevTools(dict); |
1357 | 1360 |
1358 return true; | 1361 return true; |
1359 } | 1362 } |
1360 | 1363 |
1361 } // namespace api | 1364 } // namespace api |
1362 | 1365 |
1363 } // namespace extensions | 1366 } // namespace extensions |
OLD | NEW |