| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2193 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); | 2193 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); |
| 2194 bool isDomUI = false; | 2194 bool isDomUI = false; |
| 2195 return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, isDomUI); | 2195 return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, isDomUI); |
| 2196 } | 2196 } |
| 2197 | 2197 |
| 2198 void TabContents::OnJSOutOfMemory() { | 2198 void TabContents::OnJSOutOfMemory() { |
| 2199 AddInfoBar(new SimpleAlertInfoBarDelegate( | 2199 AddInfoBar(new SimpleAlertInfoBarDelegate( |
| 2200 this, l10n_util::GetString(IDS_JS_OUT_OF_MEMORY_PROMPT), NULL)); | 2200 this, l10n_util::GetString(IDS_JS_OUT_OF_MEMORY_PROMPT), NULL)); |
| 2201 } | 2201 } |
| 2202 | 2202 |
| 2203 void TabContents::ShouldClosePage(bool proceed) { | |
| 2204 render_manager_.ShouldClosePage(proceed); | |
| 2205 } | |
| 2206 | |
| 2207 void TabContents::OnCrossSiteResponse(int new_render_process_host_id, | 2203 void TabContents::OnCrossSiteResponse(int new_render_process_host_id, |
| 2208 int new_request_id) { | 2204 int new_request_id) { |
| 2209 // Allows the TabContents to react when a cross-site response is ready to be | 2205 // Allows the TabContents to react when a cross-site response is ready to be |
| 2210 // delivered to a pending RenderViewHost. We must first run the onunload | 2206 // delivered to a pending RenderViewHost. We must first run the onunload |
| 2211 // handler of the old RenderViewHost before we can allow it to proceed. | 2207 // handler of the old RenderViewHost before we can allow it to proceed. |
| 2212 render_manager_.OnCrossSiteResponse(new_render_process_host_id, | 2208 render_manager_.OnCrossSiteResponse(new_render_process_host_id, |
| 2213 new_request_id); | 2209 new_request_id); |
| 2214 } | 2210 } |
| 2215 | 2211 |
| 2216 bool TabContents::CanBlur() const { | 2212 bool TabContents::CanBlur() const { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 NavigationController::LoadCommittedDetails& committed_details = | 2367 NavigationController::LoadCommittedDetails& committed_details = |
| 2372 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); | 2368 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); |
| 2373 ExpireInfoBars(committed_details); | 2369 ExpireInfoBars(committed_details); |
| 2374 break; | 2370 break; |
| 2375 } | 2371 } |
| 2376 | 2372 |
| 2377 default: | 2373 default: |
| 2378 NOTREACHED(); | 2374 NOTREACHED(); |
| 2379 } | 2375 } |
| 2380 } | 2376 } |
| OLD | NEW |