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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) { | 228 void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) { |
229 content::OpenURLParams params( | 229 content::OpenURLParams params( |
230 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, | 230 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, |
231 ui::PAGE_TRANSITION_LINK, false); | 231 ui::PAGE_TRANSITION_LINK, false); |
232 Browser* browser = FindBrowser(web_contents_); | 232 Browser* browser = FindBrowser(web_contents_); |
233 browser->OpenURL(params); | 233 browser->OpenURL(params); |
234 } | 234 } |
235 | 235 |
236 void DefaultBindingsDelegate::InspectedContentsClosing() { | 236 void DefaultBindingsDelegate::InspectedContentsClosing() { |
237 web_contents_->GetRenderViewHost()->ClosePage(); | 237 web_contents_->ClosePage(); |
238 } | 238 } |
239 | 239 |
240 InfoBarService* DefaultBindingsDelegate::GetInfoBarService() { | 240 InfoBarService* DefaultBindingsDelegate::GetInfoBarService() { |
241 return InfoBarService::FromWebContents(web_contents_); | 241 return InfoBarService::FromWebContents(web_contents_); |
242 } | 242 } |
243 | 243 |
244 // ResponseWriter ------------------------------------------------------------- | 244 // ResponseWriter ------------------------------------------------------------- |
245 | 245 |
246 class ResponseWriter : public net::URLFetcherResponseWriter { | 246 class ResponseWriter : public net::URLFetcherResponseWriter { |
247 public: | 247 public: |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 if (frontend_loaded_) | 1049 if (frontend_loaded_) |
1050 return; | 1050 return; |
1051 frontend_loaded_ = true; | 1051 frontend_loaded_ = true; |
1052 | 1052 |
1053 // Call delegate first - it seeds importants bit of information. | 1053 // Call delegate first - it seeds importants bit of information. |
1054 delegate_->OnLoadCompleted(); | 1054 delegate_->OnLoadCompleted(); |
1055 | 1055 |
1056 UpdateTheme(); | 1056 UpdateTheme(); |
1057 AddDevToolsExtensionsToClient(); | 1057 AddDevToolsExtensionsToClient(); |
1058 } | 1058 } |
OLD | NEW |