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

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

Issue 6713082: Move WebUIFactory to chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ContentWebUIClient Created 9 years, 9 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_WEB_UI_FACTORY_H_
6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_FACTORY_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/singleton.h"
11 #include "content/browser/webui/content_web_ui_client.h"
12 #include "content/browser/webui/web_ui.h"
13 #include "chrome/browser/favicon_service.h"
14
15 class WebUI;
16 class GURL;
17 class Profile;
18 class RefCountedMemory;
19 class TabContents;
20
21 class WebUIFactory : public content::ContentWebUIClient {
22 public:
23 virtual WebUI::WebUITypeID GetWebUIType(Profile* profile,
24 const GURL& url) const;
25 virtual bool UseWebUIForURL(Profile* profile, const GURL& url) const;
26 virtual bool HasWebUIScheme(const GURL& url) const;
27 virtual bool IsURLAcceptableForWebUI(Profile* profile, const GURL& url) const;
28 virtual WebUI* CreateWebUIForURL(TabContents* tab_contents,
29 const GURL& url) const;
30
31 // Get the favicon for |page_url| and forward the result to the |request|
32 // when loaded.
33 void GetFaviconForURL(Profile* profile,
34 FaviconService::GetFaviconRequest* request,
35 const GURL& page_url) const;
36
37 static WebUIFactory* GetInstance();
38
39 private:
40 virtual ~WebUIFactory();
41
42 friend struct DefaultSingletonTraits<WebUIFactory>;
43
44 // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI
45 // does not have a favicon.
46 RefCountedMemory* GetFaviconResourceBytes(Profile* profile,
47 const GURL& page_url) const;
48
49 DISALLOW_IMPLICIT_CONSTRUCTORS(WebUIFactory);
50 };
51
52 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698