| 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "components/favicon_base/favicon_callback.h" | 10 #include "components/favicon_base/favicon_callback.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 const std::vector<int>& desired_sizes_in_pixel, | 38 const std::vector<int>& desired_sizes_in_pixel, |
| 39 const favicon_base::FaviconResultsCallback& callback) const; | 39 const favicon_base::FaviconResultsCallback& callback) const; |
| 40 | 40 |
| 41 static ChromeWebUIControllerFactory* GetInstance(); | 41 static ChromeWebUIControllerFactory* GetInstance(); |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 ChromeWebUIControllerFactory(); | 44 ChromeWebUIControllerFactory(); |
| 45 ~ChromeWebUIControllerFactory() override; | 45 ~ChromeWebUIControllerFactory() override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 friend struct DefaultSingletonTraits<ChromeWebUIControllerFactory>; | 48 friend struct base::DefaultSingletonTraits<ChromeWebUIControllerFactory>; |
| 49 | 49 |
| 50 // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI | 50 // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI |
| 51 // does not have a favicon. | 51 // does not have a favicon. |
| 52 // The returned favicon data must be | 52 // The returned favicon data must be |
| 53 // |gfx::kFaviconSize| x |gfx::kFaviconSize| DIP. GetFaviconForURL() should | 53 // |gfx::kFaviconSize| x |gfx::kFaviconSize| DIP. GetFaviconForURL() should |
| 54 // be updated if this changes. | 54 // be updated if this changes. |
| 55 base::RefCountedMemory* GetFaviconResourceBytes( | 55 base::RefCountedMemory* GetFaviconResourceBytes( |
| 56 const GURL& page_url, ui::ScaleFactor scale_factor) const; | 56 const GURL& page_url, ui::ScaleFactor scale_factor) const; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIControllerFactory); | 58 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIControllerFactory); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ | 61 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ |
| OLD | NEW |