| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/aura/app_list_ui.h" | 5 #include "chrome/browser/ui/webui/aura/app_list_ui.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/google/google_util.h" | 8 #include "chrome/browser/google/google_util.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 new ChromeWebUIDataSource(chrome::kChromeUIAppListHost); | 35 new ChromeWebUIDataSource(chrome::kChromeUIAppListHost); |
| 36 | 36 |
| 37 string16 apps = l10n_util::GetStringUTF16(IDS_NEW_TAB_APPS); | 37 string16 apps = l10n_util::GetStringUTF16(IDS_NEW_TAB_APPS); |
| 38 string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); | 38 string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); |
| 39 | 39 |
| 40 DictionaryValue localized_strings; | 40 DictionaryValue localized_strings; |
| 41 localized_strings.SetString("apps", apps); | 41 localized_strings.SetString("apps", apps); |
| 42 localized_strings.SetString("title", title); | 42 localized_strings.SetString("title", title); |
| 43 localized_strings.SetString("appuninstall", | 43 localized_strings.SetString("appuninstall", |
| 44 l10n_util::GetStringFUTF16( | 44 l10n_util::GetStringFUTF16( |
| 45 IDS_NEW_TAB_APP_UNINSTALL, | 45 IDS_EXTENSIONS_UNINSTALL, |
| 46 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); | 46 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); |
| 47 localized_strings.SetString("appoptions", | 47 localized_strings.SetString("appoptions", |
| 48 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS)); | 48 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS)); |
| 49 localized_strings.SetString("appcreateshortcut", | 49 localized_strings.SetString("appcreateshortcut", |
| 50 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_CREATE_SHORTCUT)); | 50 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_CREATE_SHORTCUT)); |
| 51 localized_strings.SetString("appDefaultPageName", | 51 localized_strings.SetString("appDefaultPageName", |
| 52 l10n_util::GetStringUTF16(IDS_APP_DEFAULT_PAGE_NAME)); | 52 l10n_util::GetStringUTF16(IDS_APP_DEFAULT_PAGE_NAME)); |
| 53 localized_strings.SetString("applaunchtypepinned", | 53 localized_strings.SetString("applaunchtypepinned", |
| 54 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_PINNED)); | 54 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_PINNED)); |
| 55 localized_strings.SetString("applaunchtyperegular", | 55 localized_strings.SetString("applaunchtyperegular", |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 ExtensionService* service = GetProfile()->GetExtensionService(); | 123 ExtensionService* service = GetProfile()->GetExtensionService(); |
| 124 if (service) | 124 if (service) |
| 125 AddMessageHandler((new AppLauncherHandler(service))->Attach(this)); | 125 AddMessageHandler((new AppLauncherHandler(service))->Attach(this)); |
| 126 | 126 |
| 127 // Set up the source. | 127 // Set up the source. |
| 128 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 128 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
| 129 PrefService* prefs = profile->GetPrefs(); | 129 PrefService* prefs = profile->GetPrefs(); |
| 130 profile->GetChromeURLDataManager()->AddDataSource( | 130 profile->GetChromeURLDataManager()->AddDataSource( |
| 131 CreateAppListUIHTMLSource(prefs)); | 131 CreateAppListUIHTMLSource(prefs)); |
| 132 } | 132 } |
| OLD | NEW |