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 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2920 | 2920 |
2921 void TabContents::OnCrossSiteResponse(int new_render_process_host_id, | 2921 void TabContents::OnCrossSiteResponse(int new_render_process_host_id, |
2922 int new_request_id) { | 2922 int new_request_id) { |
2923 // Allows the TabContents to react when a cross-site response is ready to be | 2923 // Allows the TabContents to react when a cross-site response is ready to be |
2924 // delivered to a pending RenderViewHost. We must first run the onunload | 2924 // delivered to a pending RenderViewHost. We must first run the onunload |
2925 // handler of the old RenderViewHost before we can allow it to proceed. | 2925 // handler of the old RenderViewHost before we can allow it to proceed. |
2926 render_manager_.OnCrossSiteResponse(new_render_process_host_id, | 2926 render_manager_.OnCrossSiteResponse(new_render_process_host_id, |
2927 new_request_id); | 2927 new_request_id); |
2928 } | 2928 } |
2929 | 2929 |
2930 gfx::Rect TabContents::GetRootWindowResizerRect() const { | |
2931 if (delegate()) | |
2932 return delegate()->GetRootWindowResizerRect(); | |
2933 return gfx::Rect(); | |
2934 } | |
2935 | |
2936 void TabContents::RendererUnresponsive(RenderViewHost* rvh, | 2930 void TabContents::RendererUnresponsive(RenderViewHost* rvh, |
2937 bool is_during_unload) { | 2931 bool is_during_unload) { |
2938 if (is_during_unload) { | 2932 if (is_during_unload) { |
2939 // Hang occurred while firing the beforeunload/unload handler. | 2933 // Hang occurred while firing the beforeunload/unload handler. |
2940 // Pretend the handler fired so tab closing continues as if it had. | 2934 // Pretend the handler fired so tab closing continues as if it had. |
2941 rvh->set_sudden_termination_allowed(true); | 2935 rvh->set_sudden_termination_allowed(true); |
2942 | 2936 |
2943 if (!render_manager_.ShouldCloseTabOnUnresponsiveRenderer()) | 2937 if (!render_manager_.ShouldCloseTabOnUnresponsiveRenderer()) |
2944 return; | 2938 return; |
2945 | 2939 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3314 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
3321 } | 3315 } |
3322 | 3316 |
3323 Profile* TabContents::GetProfileForPasswordManager() { | 3317 Profile* TabContents::GetProfileForPasswordManager() { |
3324 return profile(); | 3318 return profile(); |
3325 } | 3319 } |
3326 | 3320 |
3327 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3321 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
3328 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3322 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
3329 } | 3323 } |
OLD | NEW |