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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 } | 678 } |
679 | 679 |
680 SiteInstance* TabContents::GetSiteInstance() const { | 680 SiteInstance* TabContents::GetSiteInstance() const { |
681 return render_manager_.current_host()->site_instance(); | 681 return render_manager_.current_host()->site_instance(); |
682 } | 682 } |
683 | 683 |
684 bool TabContents::ShouldDisplayURL() { | 684 bool TabContents::ShouldDisplayURL() { |
685 // Don't hide the url in view source mode and with interstitials. | 685 // Don't hide the url in view source mode and with interstitials. |
686 NavigationEntry* entry = controller_.GetActiveEntry(); | 686 NavigationEntry* entry = controller_.GetActiveEntry(); |
687 if (entry && (entry->IsViewSourceMode() || | 687 if (entry && (entry->IsViewSourceMode() || |
688 entry->page_type() == NavigationEntry::INTERSTITIAL_PAGE)) { | 688 entry->page_type() == INTERSTITIAL_PAGE)) { |
689 return true; | 689 return true; |
690 } | 690 } |
691 | 691 |
692 DOMUI* dom_ui = GetDOMUIForCurrentState(); | 692 DOMUI* dom_ui = GetDOMUIForCurrentState(); |
693 if (dom_ui) | 693 if (dom_ui) |
694 return !dom_ui->should_hide_url(); | 694 return !dom_ui->should_hide_url(); |
695 return true; | 695 return true; |
696 } | 696 } |
697 | 697 |
698 SkBitmap TabContents::GetFavIcon() const { | 698 SkBitmap TabContents::GetFavIcon() const { |
(...skipping 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3333 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3333 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
3334 } | 3334 } |
3335 | 3335 |
3336 Profile* TabContents::GetProfileForPasswordManager() { | 3336 Profile* TabContents::GetProfileForPasswordManager() { |
3337 return profile(); | 3337 return profile(); |
3338 } | 3338 } |
3339 | 3339 |
3340 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3340 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
3341 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3341 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
3342 } | 3342 } |
OLD | NEW |