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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 } | 677 } |
678 | 678 |
679 SiteInstance* TabContents::GetSiteInstance() const { | 679 SiteInstance* TabContents::GetSiteInstance() const { |
680 return render_manager_.current_host()->site_instance(); | 680 return render_manager_.current_host()->site_instance(); |
681 } | 681 } |
682 | 682 |
683 bool TabContents::ShouldDisplayURL() { | 683 bool TabContents::ShouldDisplayURL() { |
684 // Don't hide the url in view source mode and with interstitials. | 684 // Don't hide the url in view source mode and with interstitials. |
685 NavigationEntry* entry = controller_.GetActiveEntry(); | 685 NavigationEntry* entry = controller_.GetActiveEntry(); |
686 if (entry && (entry->IsViewSourceMode() || | 686 if (entry && (entry->IsViewSourceMode() || |
687 entry->page_type() == INTERSTITIAL_PAGE)) { | 687 entry->page_type() == NavigationEntry::INTERSTITIAL_PAGE)) { |
688 return true; | 688 return true; |
689 } | 689 } |
690 | 690 |
691 DOMUI* dom_ui = GetDOMUIForCurrentState(); | 691 DOMUI* dom_ui = GetDOMUIForCurrentState(); |
692 if (dom_ui) | 692 if (dom_ui) |
693 return !dom_ui->should_hide_url(); | 693 return !dom_ui->should_hide_url(); |
694 return true; | 694 return true; |
695 } | 695 } |
696 | 696 |
697 SkBitmap TabContents::GetFavIcon() const { | 697 SkBitmap TabContents::GetFavIcon() const { |
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3320 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
3321 } | 3321 } |
3322 | 3322 |
3323 Profile* TabContents::GetProfileForPasswordManager() { | 3323 Profile* TabContents::GetProfileForPasswordManager() { |
3324 return profile(); | 3324 return profile(); |
3325 } | 3325 } |
3326 | 3326 |
3327 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3327 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
3328 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3328 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
3329 } | 3329 } |
OLD | NEW |