| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/search/instant_service.h" | 5 #include "chrome/browser/search/instant_service.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, | 86 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, |
| 87 content::Source<ThemeService>( | 87 content::Source<ThemeService>( |
| 88 ThemeServiceFactory::GetForProfile(profile_))); | 88 ThemeServiceFactory::GetForProfile(profile_))); |
| 89 | 89 |
| 90 content::URLDataSource::Add(profile, new ThemeSource(profile)); | 90 content::URLDataSource::Add(profile, new ThemeSource(profile)); |
| 91 #endif // defined(ENABLE_THEMES) | 91 #endif // defined(ENABLE_THEMES) |
| 92 | 92 |
| 93 content::URLDataSource::Add(profile, new ThumbnailSource(profile)); | 93 content::URLDataSource::Add(profile, new ThumbnailSource(profile)); |
| 94 content::URLDataSource::Add(profile, new FaviconSource( | 94 content::URLDataSource::Add(profile, new FaviconSource( |
| 95 profile, FaviconSource::FAVICON)); | 95 profile, FaviconSource::FAVICON)); |
| 96 content::URLDataSource::Add(profile, new LocalNtpSource()); | 96 content::URLDataSource::Add(profile, new LocalNtpSource(profile)); |
| 97 content::URLDataSource::Add(profile, new MostVisitedIframeSource()); | 97 content::URLDataSource::Add(profile, new MostVisitedIframeSource()); |
| 98 } | 98 } |
| 99 | 99 |
| 100 InstantService::~InstantService() { | 100 InstantService::~InstantService() { |
| 101 } | 101 } |
| 102 | 102 |
| 103 void InstantService::AddInstantProcess(int process_id) { | 103 void InstantService::AddInstantProcess(int process_id) { |
| 104 process_ids_.insert(process_id); | 104 process_ids_.insert(process_id); |
| 105 | 105 |
| 106 if (instant_io_context_.get()) { | 106 if (instant_io_context_.get()) { |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 DCHECK(image); | 341 DCHECK(image); |
| 342 theme_info_->image_height = image->height(); | 342 theme_info_->image_height = image->height(); |
| 343 | 343 |
| 344 theme_info_->has_attribution = | 344 theme_info_->has_attribution = |
| 345 theme_service->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION); | 345 theme_service->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION); |
| 346 } | 346 } |
| 347 | 347 |
| 348 FOR_EACH_OBSERVER(InstantServiceObserver, observers_, | 348 FOR_EACH_OBSERVER(InstantServiceObserver, observers_, |
| 349 ThemeInfoChanged(*theme_info_)); | 349 ThemeInfoChanged(*theme_info_)); |
| 350 } | 350 } |
| OLD | NEW |