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

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

Issue 3263007: Reland r57788 - Expose Extension Bindings to Component Applications (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: don't hide gallery url in omnibar Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_DOM_UI_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "chrome/browser/dom_ui/dom_ui.h" 12 #include "chrome/browser/dom_ui/dom_ui.h"
13 #include "chrome/browser/extensions/extension_bookmark_manager_api.h" 13 #include "chrome/browser/extensions/extension_bookmark_manager_api.h"
14 #include "chrome/browser/extensions/extension_function_dispatcher.h" 14 #include "chrome/browser/extensions/extension_function_dispatcher.h"
15 #include "chrome/browser/favicon_service.h" 15 #include "chrome/browser/favicon_service.h"
16 #include "chrome/common/extensions/extension.h" 16 #include "chrome/common/extensions/extension.h"
17 17
18 class GURL;
18 class ListValue; 19 class ListValue;
19 class PrefService; 20 class PrefService;
20 class Profile; 21 class Profile;
21 class RenderViewHost; 22 class RenderViewHost;
22 class TabContents; 23 class TabContents;
23 struct ViewHostMsg_DomMessage_Params; 24 struct ViewHostMsg_DomMessage_Params;
24 25
25 // This class implements DOMUI for extensions and allows extensions to put UI in 26 // This class implements DOMUI for extensions and allows extensions to put UI in
26 // 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
27 // "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
28 // hosted by this class. 29 // hosted by this class.
29 class ExtensionDOMUI 30 class ExtensionDOMUI
30 : public DOMUI, 31 : public DOMUI,
31 public ExtensionFunctionDispatcher::Delegate { 32 public ExtensionFunctionDispatcher::Delegate {
32 public: 33 public:
33 static const char kExtensionURLOverrides[]; 34 static const char kExtensionURLOverrides[];
34 35
35 explicit ExtensionDOMUI(TabContents* tab_contents); 36 explicit ExtensionDOMUI(TabContents* tab_contents, GURL url);
36 37
37 ExtensionFunctionDispatcher* extension_function_dispatcher() const { 38 ExtensionFunctionDispatcher* extension_function_dispatcher() const {
38 return extension_function_dispatcher_.get(); 39 return extension_function_dispatcher_.get();
39 } 40 }
40 41
41 // DOMUI 42 // DOMUI
42 virtual void RenderViewCreated(RenderViewHost* render_view_host); 43 virtual void RenderViewCreated(RenderViewHost* render_view_host);
43 virtual void RenderViewReused(RenderViewHost* render_view_host); 44 virtual void RenderViewReused(RenderViewHost* render_view_host);
44 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); 45 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params);
45 46
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; 96 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
96 97
97 // TODO(aa): This seems out of place. Why is it not with the event routers for 98 // TODO(aa): This seems out of place. Why is it not with the event routers for
98 // the other extension APIs? 99 // the other extension APIs?
99 scoped_ptr<ExtensionBookmarkManagerEventRouter> 100 scoped_ptr<ExtensionBookmarkManagerEventRouter>
100 extension_bookmark_manager_event_router_; 101 extension_bookmark_manager_event_router_;
101 }; 102 };
102 103
103 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ 104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/content_script_all_frames_apitest.cc ('k') | chrome/browser/extensions/extension_dom_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698