OLD | NEW |
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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 // This class implements WebUI for extensions and allows extensions to put UI in | 28 // This class implements WebUI for extensions and allows extensions to put UI in |
29 // the main tab contents area. For example, each extension can specify an | 29 // the main tab contents area. For example, each extension can specify an |
30 // "options_page", and that page is displayed in the tab contents area and is | 30 // "options_page", and that page is displayed in the tab contents area and is |
31 // hosted by this class. | 31 // hosted by this class. |
32 class ExtensionWebUI : public ChromeWebUI { | 32 class ExtensionWebUI : public ChromeWebUI { |
33 public: | 33 public: |
34 static const char kExtensionURLOverrides[]; | 34 static const char kExtensionURLOverrides[]; |
35 | 35 |
36 explicit ExtensionWebUI(TabContents* tab_contents, const GURL& url); | 36 ExtensionWebUI(TabContents* tab_contents, const GURL& url); |
37 | 37 |
38 virtual ~ExtensionWebUI(); | 38 virtual ~ExtensionWebUI(); |
39 | 39 |
40 virtual ExtensionBookmarkManagerEventRouter* | 40 virtual ExtensionBookmarkManagerEventRouter* |
41 extension_bookmark_manager_event_router(); | 41 extension_bookmark_manager_event_router(); |
42 | 42 |
43 // BrowserURLHandler | 43 // BrowserURLHandler |
44 static bool HandleChromeURLOverride(GURL* url, Profile* profile); | 44 static bool HandleChromeURLOverride(GURL* url, Profile* profile); |
45 static bool HandleChromeURLOverrideReverse(GURL* url, Profile* profile); | 45 static bool HandleChromeURLOverrideReverse(GURL* url, Profile* profile); |
46 | 46 |
(...skipping 27 matching lines...) Expand all Loading... |
74 // 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 |
75 // the other extension APIs? | 75 // the other extension APIs? |
76 scoped_ptr<ExtensionBookmarkManagerEventRouter> | 76 scoped_ptr<ExtensionBookmarkManagerEventRouter> |
77 extension_bookmark_manager_event_router_; | 77 extension_bookmark_manager_event_router_; |
78 | 78 |
79 // The URL this WebUI was created for. | 79 // The URL this WebUI was created for. |
80 GURL url_; | 80 GURL url_; |
81 }; | 81 }; |
82 | 82 |
83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
OLD | NEW |