OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/renderer/net/net_error_helper.h" | 5 #include "chrome/renderer/net/net_error_helper.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 OnSetNavigationCorrectionInfo); | 156 OnSetNavigationCorrectionInfo); |
157 #if defined(OS_ANDROID) | 157 #if defined(OS_ANDROID) |
158 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetHasOfflinePages, OnSetHasOfflinePages) | 158 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetHasOfflinePages, OnSetHasOfflinePages) |
159 #endif | 159 #endif |
160 IPC_MESSAGE_UNHANDLED(handled = false) | 160 IPC_MESSAGE_UNHANDLED(handled = false) |
161 IPC_END_MESSAGE_MAP() | 161 IPC_END_MESSAGE_MAP() |
162 | 162 |
163 return handled; | 163 return handled; |
164 } | 164 } |
165 | 165 |
| 166 void NetErrorHelper::OnDestruct() { |
| 167 delete this; |
| 168 } |
| 169 |
166 void NetErrorHelper::NetworkStateChanged(bool enabled) { | 170 void NetErrorHelper::NetworkStateChanged(bool enabled) { |
167 core_->NetworkStateChanged(enabled); | 171 core_->NetworkStateChanged(enabled); |
168 } | 172 } |
169 | 173 |
170 void NetErrorHelper::GetErrorHTML(const blink::WebURLError& error, | 174 void NetErrorHelper::GetErrorHTML(const blink::WebURLError& error, |
171 bool is_failed_post, | 175 bool is_failed_post, |
172 bool is_ignoring_cache, | 176 bool is_ignoring_cache, |
173 std::string* error_html) { | 177 std::string* error_html) { |
174 core_->GetErrorHTML(GetFrameType(render_frame()), error, is_failed_post, | 178 core_->GetErrorHTML(GetFrameType(render_frame()), error, is_failed_post, |
175 is_ignoring_cache, error_html); | 179 is_ignoring_cache, error_html); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 const blink::WebURLResponse& response, | 371 const blink::WebURLResponse& response, |
368 const std::string& data) { | 372 const std::string& data) { |
369 tracking_fetcher_.reset(); | 373 tracking_fetcher_.reset(); |
370 } | 374 } |
371 | 375 |
372 #if defined(OS_ANDROID) | 376 #if defined(OS_ANDROID) |
373 void NetErrorHelper::OnSetHasOfflinePages(bool has_offline_pages) { | 377 void NetErrorHelper::OnSetHasOfflinePages(bool has_offline_pages) { |
374 core_->OnSetHasOfflinePages(has_offline_pages); | 378 core_->OnSetHasOfflinePages(has_offline_pages); |
375 } | 379 } |
376 #endif // defined(OS_ANDROID) | 380 #endif // defined(OS_ANDROID) |
OLD | NEW |