Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui_factory.h

Issue 9288074: Rename WebUIFactory to WebUIControllerFactory since that's what it creates now. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: blah Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_FACTORY_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_FACTORY_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/memory/singleton.h"
11 #include "content/public/browser/web_ui.h"
12 #include "content/public/browser/web_ui_factory.h"
13 #include "chrome/browser/favicon/favicon_service.h"
14
15 class Profile;
16 class RefCountedMemory;
17
18 class ChromeWebUIFactory : public content::WebUIFactory {
19 public:
20 virtual content::WebUI::TypeID GetWebUIType(
21 content::BrowserContext* browser_context,
22 const GURL& url) const OVERRIDE;
23 virtual bool UseWebUIForURL(content::BrowserContext* browser_context,
24 const GURL& url) const OVERRIDE;
25 virtual bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
26 const GURL& url) const OVERRIDE;
27 virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE;
28 virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context,
29 const GURL& url) const OVERRIDE;
30 virtual content::WebUIController* CreateWebUIForURL(
31 content::WebUI* web_ui,
32 const GURL& url) const OVERRIDE;
33
34 // Get the favicon for |page_url| and forward the result to the |request|
35 // when loaded.
36 void GetFaviconForURL(Profile* profile,
37 FaviconService::GetFaviconRequest* request,
38 const GURL& page_url) const;
39
40 static ChromeWebUIFactory* GetInstance();
41
42 protected:
43 ChromeWebUIFactory();
44 virtual ~ChromeWebUIFactory();
45
46 private:
47
48 friend struct DefaultSingletonTraits<ChromeWebUIFactory>;
49
50 // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI
51 // does not have a favicon.
52 RefCountedMemory* GetFaviconResourceBytes(const GURL& page_url) const;
53
54 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIFactory);
55 };
56
57 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698