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

Side by Side Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 1094153002: Move ClosePage() from RenderViewHost to WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromecast android compile failure. Created 5 years, 7 months 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
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698