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

Side by Side Diff: chrome/browser/devtools/devtools_window.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
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 #include "chrome/browser/devtools/devtools_window.h" 5 #include "chrome/browser/devtools/devtools_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 } 1049 }
1050 1050
1051 void DevToolsWindow::SetWhitelistedShortcuts( 1051 void DevToolsWindow::SetWhitelistedShortcuts(
1052 const std::string& message) { 1052 const std::string& message) {
1053 event_forwarder_->SetWhitelistedShortcuts(message); 1053 event_forwarder_->SetWhitelistedShortcuts(message);
1054 } 1054 }
1055 1055
1056 void DevToolsWindow::InspectedContentsClosing() { 1056 void DevToolsWindow::InspectedContentsClosing() {
1057 intercepted_page_beforeunload_ = false; 1057 intercepted_page_beforeunload_ = false;
1058 life_stage_ = kClosing; 1058 life_stage_ = kClosing;
1059 main_web_contents_->GetRenderViewHost()->ClosePage(); 1059 main_web_contents_->ClosePage();
1060 } 1060 }
1061 1061
1062 InfoBarService* DevToolsWindow::GetInfoBarService() { 1062 InfoBarService* DevToolsWindow::GetInfoBarService() {
1063 return is_docked_ ? 1063 return is_docked_ ?
1064 InfoBarService::FromWebContents(GetInspectedWebContents()) : 1064 InfoBarService::FromWebContents(GetInspectedWebContents()) :
1065 InfoBarService::FromWebContents(main_web_contents_); 1065 InfoBarService::FromWebContents(main_web_contents_);
1066 } 1066 }
1067 1067
1068 void DevToolsWindow::RenderProcessGone(bool crashed) { 1068 void DevToolsWindow::RenderProcessGone(bool crashed) {
1069 // Docked DevToolsWindow owns its main_web_contents_ and must delete it. 1069 // Docked DevToolsWindow owns its main_web_contents_ and must delete it.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 closure.Run(); 1203 closure.Run();
1204 return; 1204 return;
1205 } 1205 }
1206 load_completed_callback_ = closure; 1206 load_completed_callback_ = closure;
1207 } 1207 }
1208 1208
1209 bool DevToolsWindow::ForwardKeyboardEvent( 1209 bool DevToolsWindow::ForwardKeyboardEvent(
1210 const content::NativeWebKeyboardEvent& event) { 1210 const content::NativeWebKeyboardEvent& event) {
1211 return event_forwarder_->ForwardEvent(event); 1211 return event_forwarder_->ForwardEvent(event);
1212 } 1212 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | chrome/browser/ui/fast_unload_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698