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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
598 NotificationType::TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, | 598 NotificationType::TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, |
599 Source<TabContents>(this), | 599 Source<TabContents>(this), |
600 NotificationService::NoDetails()); | 600 NotificationService::NoDetails()); |
601 } | 601 } |
602 | 602 |
603 void TabContents::SetExtensionAppById(const std::string& extension_app_id) { | 603 void TabContents::SetExtensionAppById(const std::string& extension_app_id) { |
604 if (extension_app_id.empty()) | 604 if (extension_app_id.empty()) |
605 return; | 605 return; |
606 | 606 |
607 ExtensionsService* extension_service = profile()->GetExtensionsService(); | 607 ExtensionsService* extension_service = profile()->GetExtensionsService(); |
608 if (extension_service && extension_service->is_ready()) { | 608 if (extension_service) { |
Aaron Boodman
2010/11/18 07:49:03
No need to check this here.
Sam Kerner (Chrome)
2010/11/18 15:34:01
Fixed here and several other places.
| |
609 const Extension* extension = | 609 const Extension* extension = |
610 extension_service->GetExtensionById(extension_app_id, false); | 610 extension_service->GetExtensionById(extension_app_id, false); |
611 if (extension) | 611 if (extension) |
612 SetExtensionApp(extension); | 612 SetExtensionApp(extension); |
613 } | 613 } |
614 } | 614 } |
615 | 615 |
616 SkBitmap* TabContents::GetExtensionAppIcon() { | 616 SkBitmap* TabContents::GetExtensionAppIcon() { |
617 if (extension_app_icon_.empty()) | 617 if (extension_app_icon_.empty()) |
618 return NULL; | 618 return NULL; |
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3322 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3322 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
3323 } | 3323 } |
3324 | 3324 |
3325 Profile* TabContents::GetProfileForPasswordManager() { | 3325 Profile* TabContents::GetProfileForPasswordManager() { |
3326 return profile(); | 3326 return profile(); |
3327 } | 3327 } |
3328 | 3328 |
3329 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3329 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
3330 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3330 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
3331 } | 3331 } |
OLD | NEW |