| 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 |
| 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 #include "content/public/browser/web_ui_controller.h" |
| 16 | 17 |
| 17 class GURL; | |
| 18 class PrefService; | 18 class PrefService; |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 namespace base { | |
| 22 class ListValue; | |
| 23 class Value; | |
| 24 } | |
| 25 | |
| 26 // This class implements WebUI for extensions and allows extensions to put UI in | 21 // This class implements WebUI for extensions and allows extensions to put UI in |
| 27 // the main tab contents area. For example, each extension can specify an | 22 // the main tab contents area. For example, each extension can specify an |
| 28 // "options_page", and that page is displayed in the tab contents area and is | 23 // "options_page", and that page is displayed in the tab contents area and is |
| 29 // hosted by this class. | 24 // hosted by this class. |
| 30 class ExtensionWebUI : public WebUI { | 25 class ExtensionWebUI : public WebUI, public content::WebUIController { |
| 31 public: | 26 public: |
| 32 static const char kExtensionURLOverrides[]; | 27 static const char kExtensionURLOverrides[]; |
| 33 | 28 |
| 34 ExtensionWebUI(content::WebContents* web_contents, const GURL& url); | 29 ExtensionWebUI(content::WebContents* web_contents, const GURL& url); |
| 35 | 30 |
| 36 virtual ~ExtensionWebUI(); | 31 virtual ~ExtensionWebUI(); |
| 37 | 32 |
| 38 virtual BookmarkManagerExtensionEventRouter* | 33 virtual BookmarkManagerExtensionEventRouter* |
| 39 bookmark_manager_extension_event_router(); | 34 bookmark_manager_extension_event_router(); |
| 40 | 35 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // TODO(aa): This seems out of place. Why is it not with the event routers for | 69 // TODO(aa): This seems out of place. Why is it not with the event routers for |
| 75 // the other extension APIs? | 70 // the other extension APIs? |
| 76 scoped_ptr<BookmarkManagerExtensionEventRouter> | 71 scoped_ptr<BookmarkManagerExtensionEventRouter> |
| 77 bookmark_manager_extension_event_router_; | 72 bookmark_manager_extension_event_router_; |
| 78 | 73 |
| 79 // The URL this WebUI was created for. | 74 // The URL this WebUI was created for. |
| 80 GURL url_; | 75 GURL url_; |
| 81 }; | 76 }; |
| 82 | 77 |
| 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 78 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
| OLD | NEW |