OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/options/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/extension_settings_handler.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHOW_DETAILS)); | 580 l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHOW_DETAILS)); |
581 localized_strings->SetString("extensionSettingsHideDetails", | 581 localized_strings->SetString("extensionSettingsHideDetails", |
582 l10n_util::GetStringUTF16(IDS_EXTENSIONS_HIDE_DETAILS)); | 582 l10n_util::GetStringUTF16(IDS_EXTENSIONS_HIDE_DETAILS)); |
583 | 583 |
584 // TODO(estade): comb through the above strings to find ones no longer used in | 584 // TODO(estade): comb through the above strings to find ones no longer used in |
585 // uber extensions. | 585 // uber extensions. |
586 localized_strings->SetString("extensionUninstall", | 586 localized_strings->SetString("extensionUninstall", |
587 l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL)); | 587 l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL)); |
588 } | 588 } |
589 | 589 |
590 void ExtensionSettingsHandler::Initialize() { | |
591 } | |
592 | |
593 void ExtensionSettingsHandler::Observe( | 590 void ExtensionSettingsHandler::Observe( |
594 int type, | 591 int type, |
595 const content::NotificationSource& source, | 592 const content::NotificationSource& source, |
596 const content::NotificationDetails& details) { | 593 const content::NotificationDetails& details) { |
597 Profile* profile = Profile::FromWebUI(web_ui()); | 594 Profile* profile = Profile::FromWebUI(web_ui()); |
598 Profile* source_profile = NULL; | 595 Profile* source_profile = NULL; |
599 switch (type) { | 596 switch (type) { |
600 // We listen for notifications that will result in the page being | 597 // We listen for notifications that will result in the page being |
601 // repopulated with data twice for the same event in certain cases. | 598 // repopulated with data twice for the same event in certain cases. |
602 // For instance, EXTENSION_LOADED & EXTENSION_HOST_CREATED because | 599 // For instance, EXTENSION_LOADED & EXTENSION_HOST_CREATED because |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 chrome::VIEW_TYPE_EXTENSION_DIALOG == host_type) | 778 chrome::VIEW_TYPE_EXTENSION_DIALOG == host_type) |
782 continue; | 779 continue; |
783 | 780 |
784 GURL url = host->GetDelegate()->GetURL(); | 781 GURL url = host->GetDelegate()->GetURL(); |
785 content::RenderProcessHost* process = host->GetProcess(); | 782 content::RenderProcessHost* process = host->GetProcess(); |
786 result->push_back( | 783 result->push_back( |
787 ExtensionPage(url, process->GetID(), host->GetRoutingID(), | 784 ExtensionPage(url, process->GetID(), host->GetRoutingID(), |
788 process->GetBrowserContext()->IsOffTheRecord())); | 785 process->GetBrowserContext()->IsOffTheRecord())); |
789 } | 786 } |
790 } | 787 } |
OLD | NEW |