| OLD | NEW |
| 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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 void DevToolsWindow::SetWhitelistedShortcuts( | 1067 void DevToolsWindow::SetWhitelistedShortcuts( |
| 1068 const std::string& message) { | 1068 const std::string& message) { |
| 1069 event_forwarder_->SetWhitelistedShortcuts(message); | 1069 event_forwarder_->SetWhitelistedShortcuts(message); |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 void DevToolsWindow::InspectedContentsClosing() { | 1072 void DevToolsWindow::InspectedContentsClosing() { |
| 1073 intercepted_page_beforeunload_ = false; | 1073 intercepted_page_beforeunload_ = false; |
| 1074 life_stage_ = kClosing; | 1074 life_stage_ = kClosing; |
| 1075 main_web_contents_->GetRenderViewHost()->ClosePage(); | 1075 main_web_contents_->ClosePage(); |
| 1076 } | 1076 } |
| 1077 | 1077 |
| 1078 InfoBarService* DevToolsWindow::GetInfoBarService() { | 1078 InfoBarService* DevToolsWindow::GetInfoBarService() { |
| 1079 return is_docked_ ? | 1079 return is_docked_ ? |
| 1080 InfoBarService::FromWebContents(GetInspectedWebContents()) : | 1080 InfoBarService::FromWebContents(GetInspectedWebContents()) : |
| 1081 InfoBarService::FromWebContents(main_web_contents_); | 1081 InfoBarService::FromWebContents(main_web_contents_); |
| 1082 } | 1082 } |
| 1083 | 1083 |
| 1084 void DevToolsWindow::RenderProcessGone(bool crashed) { | 1084 void DevToolsWindow::RenderProcessGone(bool crashed) { |
| 1085 // Docked DevToolsWindow owns its main_web_contents_ and must delete it. | 1085 // Docked DevToolsWindow owns its main_web_contents_ and must delete it. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 closure.Run(); | 1219 closure.Run(); |
| 1220 return; | 1220 return; |
| 1221 } | 1221 } |
| 1222 load_completed_callback_ = closure; | 1222 load_completed_callback_ = closure; |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 bool DevToolsWindow::ForwardKeyboardEvent( | 1225 bool DevToolsWindow::ForwardKeyboardEvent( |
| 1226 const content::NativeWebKeyboardEvent& event) { | 1226 const content::NativeWebKeyboardEvent& event) { |
| 1227 return event_forwarder_->ForwardEvent(event); | 1227 return event_forwarder_->ForwardEvent(event); |
| 1228 } | 1228 } |
| OLD | NEW |