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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 void DevToolsConfirmInfoBarDelegate::Create( | 139 void DevToolsConfirmInfoBarDelegate::Create( |
140 InfoBarService* infobar_service, | 140 InfoBarService* infobar_service, |
141 const InfoBarCallback& callback, | 141 const InfoBarCallback& callback, |
142 const base::string16& message) { | 142 const base::string16& message) { |
143 if (!infobar_service) { | 143 if (!infobar_service) { |
144 callback.Run(false); | 144 callback.Run(false); |
145 return; | 145 return; |
146 } | 146 } |
147 | 147 |
148 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( | 148 infobar_service->AddInfoBar( |
149 scoped_ptr<ConfirmInfoBarDelegate>( | 149 infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( |
150 new DevToolsConfirmInfoBarDelegate(callback, message)))); | 150 new DevToolsConfirmInfoBarDelegate(callback, message)))); |
151 } | 151 } |
152 | 152 |
153 DevToolsConfirmInfoBarDelegate::DevToolsConfirmInfoBarDelegate( | 153 DevToolsConfirmInfoBarDelegate::DevToolsConfirmInfoBarDelegate( |
154 const InfoBarCallback& callback, | 154 const InfoBarCallback& callback, |
155 const base::string16& message) | 155 const base::string16& message) |
156 : ConfirmInfoBarDelegate(), | 156 : ConfirmInfoBarDelegate(), |
157 callback_(callback), | 157 callback_(callback), |
158 message_(message) { | 158 message_(message) { |
159 } | 159 } |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 if (frontend_loaded_) | 903 if (frontend_loaded_) |
904 return; | 904 return; |
905 frontend_loaded_ = true; | 905 frontend_loaded_ = true; |
906 | 906 |
907 // Call delegate first - it seeds importants bit of information. | 907 // Call delegate first - it seeds importants bit of information. |
908 delegate_->OnLoadCompleted(); | 908 delegate_->OnLoadCompleted(); |
909 | 909 |
910 UpdateTheme(); | 910 UpdateTheme(); |
911 AddDevToolsExtensionsToClient(); | 911 AddDevToolsExtensionsToClient(); |
912 } | 912 } |
OLD | NEW |