| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 2915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2926 | 2926 |
| 2927 void TabContents::OnCrossSiteResponse(int new_render_process_host_id, | 2927 void TabContents::OnCrossSiteResponse(int new_render_process_host_id, |
| 2928 int new_request_id) { | 2928 int new_request_id) { |
| 2929 // Allows the TabContents to react when a cross-site response is ready to be | 2929 // Allows the TabContents to react when a cross-site response is ready to be |
| 2930 // delivered to a pending RenderViewHost. We must first run the onunload | 2930 // delivered to a pending RenderViewHost. We must first run the onunload |
| 2931 // handler of the old RenderViewHost before we can allow it to proceed. | 2931 // handler of the old RenderViewHost before we can allow it to proceed. |
| 2932 render_manager_.OnCrossSiteResponse(new_render_process_host_id, | 2932 render_manager_.OnCrossSiteResponse(new_render_process_host_id, |
| 2933 new_request_id); | 2933 new_request_id); |
| 2934 } | 2934 } |
| 2935 | 2935 |
| 2936 gfx::Rect TabContents::GetRootWindowResizerRect() const { | |
| 2937 if (delegate()) | |
| 2938 return delegate()->GetRootWindowResizerRect(); | |
| 2939 return gfx::Rect(); | |
| 2940 } | |
| 2941 | |
| 2942 void TabContents::RendererUnresponsive(RenderViewHost* rvh, | 2936 void TabContents::RendererUnresponsive(RenderViewHost* rvh, |
| 2943 bool is_during_unload) { | 2937 bool is_during_unload) { |
| 2944 if (is_during_unload) { | 2938 if (is_during_unload) { |
| 2945 // Hang occurred while firing the beforeunload/unload handler. | 2939 // Hang occurred while firing the beforeunload/unload handler. |
| 2946 // Pretend the handler fired so tab closing continues as if it had. | 2940 // Pretend the handler fired so tab closing continues as if it had. |
| 2947 rvh->set_sudden_termination_allowed(true); | 2941 rvh->set_sudden_termination_allowed(true); |
| 2948 | 2942 |
| 2949 if (!render_manager_.ShouldCloseTabOnUnresponsiveRenderer()) | 2943 if (!render_manager_.ShouldCloseTabOnUnresponsiveRenderer()) |
| 2950 return; | 2944 return; |
| 2951 | 2945 |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3326 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3320 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3327 } | 3321 } |
| 3328 | 3322 |
| 3329 Profile* TabContents::GetProfileForPasswordManager() { | 3323 Profile* TabContents::GetProfileForPasswordManager() { |
| 3330 return profile(); | 3324 return profile(); |
| 3331 } | 3325 } |
| 3332 | 3326 |
| 3333 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3327 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3334 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3328 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3335 } | 3329 } |
| OLD | NEW |