| 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 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 // This class implements WebUI for extensions and allows extensions to put UI in | 27 // 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 | 28 // 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 | 29 // "options_page", and that page is displayed in the tab contents area and is |
| 30 // hosted by this class. | 30 // hosted by this class. |
| 31 class ExtensionWebUI : public ChromeWebUI { | 31 class ExtensionWebUI : public ChromeWebUI { |
| 32 public: | 32 public: |
| 33 static const char kExtensionURLOverrides[]; | 33 static const char kExtensionURLOverrides[]; |
| 34 | 34 |
| 35 ExtensionWebUI(TabContents* tab_contents, const GURL& url); | 35 ExtensionWebUI(content::WebContents* tab_contents, const GURL& url); |
| 36 | 36 |
| 37 virtual ~ExtensionWebUI(); | 37 virtual ~ExtensionWebUI(); |
| 38 | 38 |
| 39 virtual BookmarkManagerExtensionEventRouter* | 39 virtual BookmarkManagerExtensionEventRouter* |
| 40 bookmark_manager_extension_event_router(); | 40 bookmark_manager_extension_event_router(); |
| 41 | 41 |
| 42 // BrowserURLHandler | 42 // BrowserURLHandler |
| 43 static bool HandleChromeURLOverride(GURL* url, | 43 static bool HandleChromeURLOverride(GURL* url, |
| 44 content::BrowserContext* browser_context); | 44 content::BrowserContext* browser_context); |
| 45 static bool HandleChromeURLOverrideReverse( | 45 static bool HandleChromeURLOverrideReverse( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 75 // TODO(aa): This seems out of place. Why is it not with the event routers for | 75 // TODO(aa): This seems out of place. Why is it not with the event routers for |
| 76 // the other extension APIs? | 76 // the other extension APIs? |
| 77 scoped_ptr<BookmarkManagerExtensionEventRouter> | 77 scoped_ptr<BookmarkManagerExtensionEventRouter> |
| 78 bookmark_manager_extension_event_router_; | 78 bookmark_manager_extension_event_router_; |
| 79 | 79 |
| 80 // The URL this WebUI was created for. | 80 // The URL this WebUI was created for. |
| 81 GURL url_; | 81 GURL url_; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
| OLD | NEW |