| 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/extensions/extension_web_ui.h" | 5 #include "chrome/browser/extensions/extension_web_ui.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 extensions::BookmarkManagerPrivateEventRouter* | 158 extensions::BookmarkManagerPrivateEventRouter* |
| 159 ExtensionWebUI::bookmark_manager_private_event_router() { | 159 ExtensionWebUI::bookmark_manager_private_event_router() { |
| 160 return bookmark_manager_private_event_router_.get(); | 160 return bookmark_manager_private_event_router_.get(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 //////////////////////////////////////////////////////////////////////////////// | 163 //////////////////////////////////////////////////////////////////////////////// |
| 164 // chrome:// URL overrides | 164 // chrome:// URL overrides |
| 165 | 165 |
| 166 // static | 166 // static |
| 167 void ExtensionWebUI::RegisterUserPrefs( | 167 void ExtensionWebUI::RegisterProfilePrefs( |
| 168 user_prefs::PrefRegistrySyncable* registry) { | 168 user_prefs::PrefRegistrySyncable* registry) { |
| 169 registry->RegisterDictionaryPref( | 169 registry->RegisterDictionaryPref( |
| 170 kExtensionURLOverrides, | 170 kExtensionURLOverrides, |
| 171 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 171 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 172 } | 172 } |
| 173 | 173 |
| 174 // static | 174 // static |
| 175 bool ExtensionWebUI::HandleChromeURLOverride( | 175 bool ExtensionWebUI::HandleChromeURLOverride( |
| 176 GURL* url, content::BrowserContext* browser_context) { | 176 GURL* url, content::BrowserContext* browser_context) { |
| 177 if (!url->SchemeIs(chrome::kChromeUIScheme)) | 177 if (!url->SchemeIs(chrome::kChromeUIScheme)) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, | 417 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, |
| 418 gfx::Size(pixel_size, pixel_size), | 418 gfx::Size(pixel_size, pixel_size), |
| 419 scale_factors[i])); | 419 scale_factors[i])); |
| 420 } | 420 } |
| 421 | 421 |
| 422 // LoadImagesAsync actually can run callback synchronously. We want to force | 422 // LoadImagesAsync actually can run callback synchronously. We want to force |
| 423 // async. | 423 // async. |
| 424 extensions::ImageLoader::Get(profile)->LoadImagesAsync( | 424 extensions::ImageLoader::Get(profile)->LoadImagesAsync( |
| 425 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); | 425 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); |
| 426 } | 426 } |
| OLD | NEW |