| 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/ui/webui/chrome_web_ui_controller_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 692 |
| 693 bitmap_result.pixel_size = candidate_sizes[selected_index]; | 693 bitmap_result.pixel_size = candidate_sizes[selected_index]; |
| 694 } | 694 } |
| 695 } | 695 } |
| 696 | 696 |
| 697 RunFaviconCallbackAsync(callback, favicon_bitmap_results); | 697 RunFaviconCallbackAsync(callback, favicon_bitmap_results); |
| 698 } | 698 } |
| 699 | 699 |
| 700 // static | 700 // static |
| 701 ChromeWebUIControllerFactory* ChromeWebUIControllerFactory::GetInstance() { | 701 ChromeWebUIControllerFactory* ChromeWebUIControllerFactory::GetInstance() { |
| 702 return Singleton<ChromeWebUIControllerFactory>::get(); | 702 return base::Singleton<ChromeWebUIControllerFactory>::get(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 ChromeWebUIControllerFactory::ChromeWebUIControllerFactory() { | 705 ChromeWebUIControllerFactory::ChromeWebUIControllerFactory() { |
| 706 } | 706 } |
| 707 | 707 |
| 708 ChromeWebUIControllerFactory::~ChromeWebUIControllerFactory() { | 708 ChromeWebUIControllerFactory::~ChromeWebUIControllerFactory() { |
| 709 } | 709 } |
| 710 | 710 |
| 711 base::RefCountedMemory* ChromeWebUIControllerFactory::GetFaviconResourceBytes( | 711 base::RefCountedMemory* ChromeWebUIControllerFactory::GetFaviconResourceBytes( |
| 712 const GURL& page_url, ui::ScaleFactor scale_factor) const { | 712 const GURL& page_url, ui::ScaleFactor scale_factor) const { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 #endif | 770 #endif |
| 771 | 771 |
| 772 // Android doesn't use the plugins pages. | 772 // Android doesn't use the plugins pages. |
| 773 if (page_url.host() == chrome::kChromeUIPluginsHost) | 773 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 774 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 774 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 775 | 775 |
| 776 #endif | 776 #endif |
| 777 | 777 |
| 778 return NULL; | 778 return NULL; |
| 779 } | 779 } |
| OLD | NEW |