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