Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: chrome/browser/extensions/api/debugger/debugger_api.cc

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on Android Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 WebContents* web_contents, 188 WebContents* web_contents,
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(
199 scoped_ptr<ConfirmInfoBarDelegate>( 199 infobar_service->CreateConfirmInfoBar(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
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698