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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |