| 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/extensions/extensions_ui.h" | 5 #include "chrome/browser/extensions/extensions_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 delete json; | 384 delete json; |
| 385 | 385 |
| 386 // Register for notifications that we need to reload the page. | 386 // Register for notifications that we need to reload the page. |
| 387 registrar_.RemoveAll(); | 387 registrar_.RemoveAll(); |
| 388 registrar_.Add(this, NotificationType::EXTENSION_LOADED, | 388 registrar_.Add(this, NotificationType::EXTENSION_LOADED, |
| 389 NotificationService::AllSources()); | 389 NotificationService::AllSources()); |
| 390 registrar_.Add(this, NotificationType::EXTENSION_PROCESS_CREATED, | 390 registrar_.Add(this, NotificationType::EXTENSION_PROCESS_CREATED, |
| 391 NotificationService::AllSources()); | 391 NotificationService::AllSources()); |
| 392 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, | 392 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, |
| 393 NotificationService::AllSources()); | 393 NotificationService::AllSources()); |
| 394 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED, | |
| 395 NotificationService::AllSources()); | |
| 396 registrar_.Add(this, NotificationType::EXTENSION_UPDATE_DISABLED, | 394 registrar_.Add(this, NotificationType::EXTENSION_UPDATE_DISABLED, |
| 397 NotificationService::AllSources()); | 395 NotificationService::AllSources()); |
| 398 registrar_.Add(this, NotificationType::EXTENSION_FUNCTION_DISPATCHER_CREATED, | 396 registrar_.Add(this, NotificationType::EXTENSION_FUNCTION_DISPATCHER_CREATED, |
| 399 NotificationService::AllSources()); | 397 NotificationService::AllSources()); |
| 400 registrar_.Add(this, | 398 registrar_.Add(this, |
| 401 NotificationType::EXTENSION_FUNCTION_DISPATCHER_DESTROYED, | 399 NotificationType::EXTENSION_FUNCTION_DISPATCHER_DESTROYED, |
| 402 NotificationService::AllSources()); | 400 NotificationService::AllSources()); |
| 403 registrar_.Add(this, | 401 registrar_.Add(this, |
| 404 NotificationType::NAV_ENTRY_COMMITTED, | 402 NotificationType::NAV_ENTRY_COMMITTED, |
| 405 NotificationService::AllSources()); | 403 NotificationService::AllSources()); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 deleting_rvh_ = Details<RenderViewHost>(details).ptr(); | 702 deleting_rvh_ = Details<RenderViewHost>(details).ptr(); |
| 705 MaybeUpdateAfterNotification(); | 703 MaybeUpdateAfterNotification(); |
| 706 break; | 704 break; |
| 707 case NotificationType::BACKGROUND_CONTENTS_DELETED: | 705 case NotificationType::BACKGROUND_CONTENTS_DELETED: |
| 708 deleting_rvh_ = Details<BackgroundContents>(details)->render_view_host(); | 706 deleting_rvh_ = Details<BackgroundContents>(details)->render_view_host(); |
| 709 MaybeUpdateAfterNotification(); | 707 MaybeUpdateAfterNotification(); |
| 710 break; | 708 break; |
| 711 case NotificationType::EXTENSION_LOADED: | 709 case NotificationType::EXTENSION_LOADED: |
| 712 case NotificationType::EXTENSION_PROCESS_CREATED: | 710 case NotificationType::EXTENSION_PROCESS_CREATED: |
| 713 case NotificationType::EXTENSION_UNLOADED: | 711 case NotificationType::EXTENSION_UNLOADED: |
| 714 case NotificationType::EXTENSION_UNLOADED_DISABLED: | |
| 715 case NotificationType::EXTENSION_UPDATE_DISABLED: | 712 case NotificationType::EXTENSION_UPDATE_DISABLED: |
| 716 case NotificationType::EXTENSION_FUNCTION_DISPATCHER_CREATED: | 713 case NotificationType::EXTENSION_FUNCTION_DISPATCHER_CREATED: |
| 717 case NotificationType::EXTENSION_FUNCTION_DISPATCHER_DESTROYED: | 714 case NotificationType::EXTENSION_FUNCTION_DISPATCHER_DESTROYED: |
| 718 case NotificationType::NAV_ENTRY_COMMITTED: | 715 case NotificationType::NAV_ENTRY_COMMITTED: |
| 719 case NotificationType::BACKGROUND_CONTENTS_NAVIGATED: | 716 case NotificationType::BACKGROUND_CONTENTS_NAVIGATED: |
| 720 case NotificationType::EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED: | 717 case NotificationType::EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED: |
| 721 MaybeUpdateAfterNotification(); | 718 MaybeUpdateAfterNotification(); |
| 722 break; | 719 break; |
| 723 default: | 720 default: |
| 724 NOTREACHED(); | 721 NOTREACHED(); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 // static | 956 // static |
| 960 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 957 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
| 961 return ResourceBundle::GetSharedInstance(). | 958 return ResourceBundle::GetSharedInstance(). |
| 962 LoadDataResourceBytes(IDR_PLUGIN); | 959 LoadDataResourceBytes(IDR_PLUGIN); |
| 963 } | 960 } |
| 964 | 961 |
| 965 // static | 962 // static |
| 966 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 963 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
| 967 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 964 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
| 968 } | 965 } |
| OLD | NEW |