| 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 "content/public/browser/web_ui.h" | 10 #include "content/public/browser/web_ui.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const GURL& url) const OVERRIDE; | 28 const GURL& url) const OVERRIDE; |
| 29 virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context, | 29 virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context, |
| 30 const GURL& url, | 30 const GURL& url, |
| 31 bool data_urls_allowed) const OVERRIDE; | 31 bool data_urls_allowed) const OVERRIDE; |
| 32 virtual content::WebUIController* CreateWebUIControllerForURL( | 32 virtual content::WebUIController* CreateWebUIControllerForURL( |
| 33 content::WebUI* web_ui, | 33 content::WebUI* web_ui, |
| 34 const GURL& url) const OVERRIDE; | 34 const GURL& url) const OVERRIDE; |
| 35 | 35 |
| 36 // Get the favicon for |page_url| and forward the result to the |request| | 36 // Get the favicon for |page_url| and forward the result to the |request| |
| 37 // when loaded. | 37 // when loaded. |
| 38 void GetFaviconForURL(Profile* profile, | 38 void GetFaviconForURL( |
| 39 FaviconService::GetFaviconRequest* request, | 39 Profile* profile, |
| 40 const GURL& page_url) const; | 40 FaviconService::GetFaviconRequest* request, |
| 41 const GURL& page_url, |
| 42 const std::vector<ui::ScaleFactor>& scale_factors) const; |
| 41 | 43 |
| 42 static ChromeWebUIControllerFactory* GetInstance(); | 44 static ChromeWebUIControllerFactory* GetInstance(); |
| 43 | 45 |
| 44 protected: | 46 protected: |
| 45 ChromeWebUIControllerFactory(); | 47 ChromeWebUIControllerFactory(); |
| 46 virtual ~ChromeWebUIControllerFactory(); | 48 virtual ~ChromeWebUIControllerFactory(); |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 | 51 |
| 50 friend struct DefaultSingletonTraits<ChromeWebUIControllerFactory>; | 52 friend struct DefaultSingletonTraits<ChromeWebUIControllerFactory>; |
| 51 | 53 |
| 52 // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI | 54 // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI |
| 53 // does not have a favicon. | 55 // does not have a favicon. |
| 54 base::RefCountedMemory* GetFaviconResourceBytes( | 56 base::RefCountedMemory* GetFaviconResourceBytes( |
| 55 const GURL& page_url, ui::ScaleFactor scale_factor) const; | 57 const GURL& page_url, ui::ScaleFactor scale_factor) const; |
| 56 | 58 |
| 57 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIControllerFactory); | 59 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIControllerFactory); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ | 62 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_CONTROLLER_FACTORY_H_ |
| OLD | NEW |