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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1115 if (agent_host_.get()) | 1115 if (agent_host_.get()) |
1116 Detach(); | 1116 Detach(); |
1117 agent_host_ = agent_host; | 1117 agent_host_ = agent_host; |
1118 // DevToolsUIBindings terminates existing debugging connections and starts | 1118 // DevToolsUIBindings terminates existing debugging connections and starts |
1119 // debugging. | 1119 // debugging. |
1120 agent_host_->ForceAttachClient(this); | 1120 agent_host_->ForceAttachClient(this); |
1121 } | 1121 } |
1122 | 1122 |
1123 void DevToolsUIBindings::Reload() { | 1123 void DevToolsUIBindings::Reload() { |
1124 reloading_ = true; | 1124 reloading_ = true; |
1125 web_contents_->GetController().Reload(false); | 1125 web_contents_->GetController().Reload(content::ReloadType::NORMAL, false); |
Takashi Toyoshima
2016/12/15 06:21:51
This would be also fine because this is debug inte
| |
1126 } | 1126 } |
1127 | 1127 |
1128 void DevToolsUIBindings::Detach() { | 1128 void DevToolsUIBindings::Detach() { |
1129 if (agent_host_.get()) | 1129 if (agent_host_.get()) |
1130 agent_host_->DetachClient(this); | 1130 agent_host_->DetachClient(this); |
1131 agent_host_ = NULL; | 1131 agent_host_ = NULL; |
1132 } | 1132 } |
1133 | 1133 |
1134 bool DevToolsUIBindings::IsAttachedTo(content::DevToolsAgentHost* agent_host) { | 1134 bool DevToolsUIBindings::IsAttachedTo(content::DevToolsAgentHost* agent_host) { |
1135 return agent_host_.get() == agent_host; | 1135 return agent_host_.get() == agent_host; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1186 void DevToolsUIBindings::FrontendLoaded() { | 1186 void DevToolsUIBindings::FrontendLoaded() { |
1187 if (frontend_loaded_) | 1187 if (frontend_loaded_) |
1188 return; | 1188 return; |
1189 frontend_loaded_ = true; | 1189 frontend_loaded_ = true; |
1190 | 1190 |
1191 // Call delegate first - it seeds importants bit of information. | 1191 // Call delegate first - it seeds importants bit of information. |
1192 delegate_->OnLoadCompleted(); | 1192 delegate_->OnLoadCompleted(); |
1193 | 1193 |
1194 AddDevToolsExtensionsToClient(); | 1194 AddDevToolsExtensionsToClient(); |
1195 } | 1195 } |
OLD | NEW |