| 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 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
| 8 // For GdkScreen | 8 // For GdkScreen |
| 9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
| 10 #endif // defined(OS_CHROMEOS) | 10 #endif // defined(OS_CHROMEOS) |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 } | 770 } |
| 771 | 771 |
| 772 bool TabContents::NavigateToPendingEntry( | 772 bool TabContents::NavigateToPendingEntry( |
| 773 NavigationController::ReloadType reload_type) { | 773 NavigationController::ReloadType reload_type) { |
| 774 const NavigationEntry& entry = *controller_.pending_entry(); | 774 const NavigationEntry& entry = *controller_.pending_entry(); |
| 775 | 775 |
| 776 RenderViewHost* dest_render_view_host = render_manager_.Navigate(entry); | 776 RenderViewHost* dest_render_view_host = render_manager_.Navigate(entry); |
| 777 if (!dest_render_view_host) | 777 if (!dest_render_view_host) |
| 778 return false; // Unable to create the desired render view host. | 778 return false; // Unable to create the desired render view host. |
| 779 | 779 |
| 780 if (delegate_ && delegate_->ShouldEnablePreferredSizeNotifications()) |
| 781 dest_render_view_host->EnablePreferredSizeChangedMode(); |
| 782 |
| 780 // For security, we should never send non-DOM-UI URLs (other than about:blank) | 783 // For security, we should never send non-DOM-UI URLs (other than about:blank) |
| 781 // to a DOM UI renderer. Double check that here. | 784 // to a DOM UI renderer. Double check that here. |
| 782 int enabled_bindings = dest_render_view_host->enabled_bindings(); | 785 int enabled_bindings = dest_render_view_host->enabled_bindings(); |
| 783 bool is_allowed_in_dom_ui_renderer = | 786 bool is_allowed_in_dom_ui_renderer = |
| 784 DOMUIFactory::UseDOMUIForURL(entry.url()) || | 787 DOMUIFactory::UseDOMUIForURL(entry.url()) || |
| 785 entry.url() == GURL(chrome::kAboutBlankURL); | 788 entry.url() == GURL(chrome::kAboutBlankURL); |
| 786 CHECK(!BindingsPolicy::is_dom_ui_enabled(enabled_bindings) || | 789 CHECK(!BindingsPolicy::is_dom_ui_enabled(enabled_bindings) || |
| 787 is_allowed_in_dom_ui_renderer); | 790 is_allowed_in_dom_ui_renderer); |
| 788 | 791 |
| 789 // Tell DevTools agent that it is attached prior to the navigation. | 792 // Tell DevTools agent that it is attached prior to the navigation. |
| (...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3154 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3157 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3155 } | 3158 } |
| 3156 | 3159 |
| 3157 Profile* TabContents::GetProfileForPasswordManager() { | 3160 Profile* TabContents::GetProfileForPasswordManager() { |
| 3158 return profile(); | 3161 return profile(); |
| 3159 } | 3162 } |
| 3160 | 3163 |
| 3161 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3164 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3162 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3165 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3163 } | 3166 } |
| OLD | NEW |