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

Side by Side Diff: chrome/browser/extensions/extension_web_ui.h

Issue 9097005: Move WebUIFactory into content/public/browser and make it use WebContents instead of TabContents.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chrome_web_ui_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_EXTENSIONS_EXTENSION_WEB_UI_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h" 12 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h"
13 #include "chrome/browser/favicon/favicon_service.h" 13 #include "chrome/browser/favicon/favicon_service.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "content/browser/webui/web_ui.h" 15 #include "content/browser/webui/web_ui.h"
16 16
17 class GURL; 17 class GURL;
18 class PrefService; 18 class PrefService;
19 class Profile; 19 class Profile;
20 class TabContents;
21 20
22 namespace base { 21 namespace base {
23 class ListValue; 22 class ListValue;
24 class Value; 23 class Value;
25 } 24 }
26 25
27 // This class implements WebUI for extensions and allows extensions to put UI in 26 // This class implements WebUI for extensions and allows extensions to put UI in
28 // the main tab contents area. For example, each extension can specify an 27 // the main tab contents area. For example, each extension can specify an
29 // "options_page", and that page is displayed in the tab contents area and is 28 // "options_page", and that page is displayed in the tab contents area and is
30 // hosted by this class. 29 // hosted by this class.
31 class ExtensionWebUI : public WebUI { 30 class ExtensionWebUI : public WebUI {
32 public: 31 public:
33 static const char kExtensionURLOverrides[]; 32 static const char kExtensionURLOverrides[];
34 33
35 ExtensionWebUI(content::WebContents* tab_contents, const GURL& url); 34 ExtensionWebUI(content::WebContents* web_contents, const GURL& url);
36 35
37 virtual ~ExtensionWebUI(); 36 virtual ~ExtensionWebUI();
38 37
39 virtual BookmarkManagerExtensionEventRouter* 38 virtual BookmarkManagerExtensionEventRouter*
40 bookmark_manager_extension_event_router(); 39 bookmark_manager_extension_event_router();
41 40
42 // BrowserURLHandler 41 // BrowserURLHandler
43 static bool HandleChromeURLOverride(GURL* url, 42 static bool HandleChromeURLOverride(GURL* url,
44 content::BrowserContext* browser_context); 43 content::BrowserContext* browser_context);
45 static bool HandleChromeURLOverrideReverse( 44 static bool HandleChromeURLOverrideReverse(
(...skipping 29 matching lines...) Expand all
75 // TODO(aa): This seems out of place. Why is it not with the event routers for 74 // TODO(aa): This seems out of place. Why is it not with the event routers for
76 // the other extension APIs? 75 // the other extension APIs?
77 scoped_ptr<BookmarkManagerExtensionEventRouter> 76 scoped_ptr<BookmarkManagerExtensionEventRouter>
78 bookmark_manager_extension_event_router_; 77 bookmark_manager_extension_event_router_;
79 78
80 // The URL this WebUI was created for. 79 // The URL this WebUI was created for.
81 GURL url_; 80 GURL url_;
82 }; 81 };
83 82
84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chrome_web_ui_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698