| 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 // Implements the Chrome Extensions Debugger API. | 5 // Implements the Chrome Extensions Debugger API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" | 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 const std::string& client_name) { | 189 const std::string& client_name) { |
| 190 if (!web_contents) | 190 if (!web_contents) |
| 191 return NULL; | 191 return NULL; |
| 192 | 192 |
| 193 InfoBarService* infobar_service = | 193 InfoBarService* infobar_service = |
| 194 InfoBarService::FromWebContents(web_contents); | 194 InfoBarService::FromWebContents(web_contents); |
| 195 if (!infobar_service) | 195 if (!infobar_service) |
| 196 return NULL; | 196 return NULL; |
| 197 | 197 |
| 198 return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( | 198 return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
| 199 scoped_ptr<ConfirmInfoBarDelegate>( | 199 infobar_service, scoped_ptr<ConfirmInfoBarDelegate>( |
| 200 new ExtensionDevToolsInfoBarDelegate(client_name)))); | 200 new ExtensionDevToolsInfoBarDelegate(client_name)))); |
| 201 } | 201 } |
| 202 | 202 |
| 203 ExtensionDevToolsInfoBarDelegate::ExtensionDevToolsInfoBarDelegate( | 203 ExtensionDevToolsInfoBarDelegate::ExtensionDevToolsInfoBarDelegate( |
| 204 const std::string& client_name) | 204 const std::string& client_name) |
| 205 : ConfirmInfoBarDelegate(), | 205 : ConfirmInfoBarDelegate(), |
| 206 client_name_(client_name), | 206 client_name_(client_name), |
| 207 client_host_(NULL) { | 207 client_host_(NULL) { |
| 208 } | 208 } |
| 209 | 209 |
| 210 ExtensionDevToolsInfoBarDelegate::~ExtensionDevToolsInfoBarDelegate() { | 210 ExtensionDevToolsInfoBarDelegate::~ExtensionDevToolsInfoBarDelegate() { |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 const std::vector<DevToolsTargetImpl*>& target_list) { | 734 const std::vector<DevToolsTargetImpl*>& target_list) { |
| 735 scoped_ptr<base::ListValue> result(new base::ListValue()); | 735 scoped_ptr<base::ListValue> result(new base::ListValue()); |
| 736 for (size_t i = 0; i < target_list.size(); ++i) | 736 for (size_t i = 0; i < target_list.size(); ++i) |
| 737 result->Append(SerializeTarget(*target_list[i])); | 737 result->Append(SerializeTarget(*target_list[i])); |
| 738 STLDeleteContainerPointers(target_list.begin(), target_list.end()); | 738 STLDeleteContainerPointers(target_list.begin(), target_list.end()); |
| 739 SetResult(result.release()); | 739 SetResult(result.release()); |
| 740 SendResponse(true); | 740 SendResponse(true); |
| 741 } | 741 } |
| 742 | 742 |
| 743 } // namespace extensions | 743 } // namespace extensions |
| OLD | NEW |