| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 void NewTabUI::InitializeCSSCaches() { | 275 void NewTabUI::InitializeCSSCaches() { |
| 276 #if defined(ENABLE_THEMES) | 276 #if defined(ENABLE_THEMES) |
| 277 Profile* profile = GetProfile(); | 277 Profile* profile = GetProfile(); |
| 278 ThemeSource* theme = new ThemeSource(profile); | 278 ThemeSource* theme = new ThemeSource(profile); |
| 279 ChromeURLDataManager::AddDataSource(profile, theme); | 279 ChromeURLDataManager::AddDataSource(profile, theme); |
| 280 #endif | 280 #endif |
| 281 } | 281 } |
| 282 | 282 |
| 283 // static | 283 // static |
| 284 void NewTabUI::RegisterUserPrefs(PrefService* prefs) { | 284 void NewTabUI::RegisterUserPrefs(PrefServiceSyncable* prefs) { |
| 285 #if !defined(OS_ANDROID) | 285 #if !defined(OS_ANDROID) |
| 286 AppLauncherHandler::RegisterUserPrefs(prefs); | 286 AppLauncherHandler::RegisterUserPrefs(prefs); |
| 287 NewTabPageHandler::RegisterUserPrefs(prefs); | 287 NewTabPageHandler::RegisterUserPrefs(prefs); |
| 288 if (NewTabUI::IsDiscoveryInNTPEnabled()) | 288 if (NewTabUI::IsDiscoveryInNTPEnabled()) |
| 289 SuggestionsHandler::RegisterUserPrefs(prefs); | 289 SuggestionsHandler::RegisterUserPrefs(prefs); |
| 290 #endif | 290 #endif |
| 291 MostVisitedHandler::RegisterUserPrefs(prefs); | 291 MostVisitedHandler::RegisterUserPrefs(prefs); |
| 292 browser_sync::ForeignSessionHandler::RegisterUserPrefs(prefs); | 292 browser_sync::ForeignSessionHandler::RegisterUserPrefs(prefs); |
| 293 } | 293 } |
| 294 | 294 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource, | 420 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource, |
| 421 const char* mime_type, | 421 const char* mime_type, |
| 422 int resource_id) { | 422 int resource_id) { |
| 423 DCHECK(resource); | 423 DCHECK(resource); |
| 424 DCHECK(mime_type); | 424 DCHECK(mime_type); |
| 425 resource_map_[std::string(resource)] = | 425 resource_map_[std::string(resource)] = |
| 426 std::make_pair(std::string(mime_type), resource_id); | 426 std::make_pair(std::string(mime_type), resource_id); |
| 427 } | 427 } |
| 428 | 428 |
| 429 NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {} | 429 NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {} |
| OLD | NEW |