| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 BookmarkManagerExtensionEventRouter* | 185 BookmarkManagerExtensionEventRouter* |
| 186 ExtensionWebUI::bookmark_manager_extension_event_router() { | 186 ExtensionWebUI::bookmark_manager_extension_event_router() { |
| 187 return bookmark_manager_extension_event_router_.get(); | 187 return bookmark_manager_extension_event_router_.get(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 //////////////////////////////////////////////////////////////////////////////// | 190 //////////////////////////////////////////////////////////////////////////////// |
| 191 // chrome:// URL overrides | 191 // chrome:// URL overrides |
| 192 | 192 |
| 193 // static | 193 // static |
| 194 void ExtensionWebUI::RegisterUserPrefs(PrefService* prefs) { | 194 void ExtensionWebUI::RegisterUserPrefs(PrefServiceSyncable* prefs) { |
| 195 prefs->RegisterDictionaryPref(kExtensionURLOverrides, | 195 prefs->RegisterDictionaryPref(kExtensionURLOverrides, |
| 196 PrefService::UNSYNCABLE_PREF); | 196 PrefServiceSyncable::UNSYNCABLE_PREF); |
| 197 } | 197 } |
| 198 | 198 |
| 199 // static | 199 // static |
| 200 bool ExtensionWebUI::HandleChromeURLOverride( | 200 bool ExtensionWebUI::HandleChromeURLOverride( |
| 201 GURL* url, content::BrowserContext* browser_context) { | 201 GURL* url, content::BrowserContext* browser_context) { |
| 202 if (!url->SchemeIs(chrome::kChromeUIScheme)) | 202 if (!url->SchemeIs(chrome::kChromeUIScheme)) |
| 203 return false; | 203 return false; |
| 204 | 204 |
| 205 Profile* profile = Profile::FromBrowserContext(browser_context); | 205 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 206 const DictionaryValue* overrides = | 206 const DictionaryValue* overrides = |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, | 441 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, |
| 442 gfx::Size(pixel_size, pixel_size), | 442 gfx::Size(pixel_size, pixel_size), |
| 443 scale_factors[i])); | 443 scale_factors[i])); |
| 444 } | 444 } |
| 445 | 445 |
| 446 // LoadImagesAsync actually can run callback synchronously. We want to force | 446 // LoadImagesAsync actually can run callback synchronously. We want to force |
| 447 // async. | 447 // async. |
| 448 extensions::ImageLoader::Get(profile)->LoadImagesAsync( | 448 extensions::ImageLoader::Get(profile)->LoadImagesAsync( |
| 449 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); | 449 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); |
| 450 } | 450 } |
| OLD | NEW |