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

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

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 5 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "chrome/browser/extensions/extension_function_dispatcher.h"
11 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 12 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
12 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" 13 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
13 #if defined(TOOLKIT_VIEWS) 14 #if defined(TOOLKIT_VIEWS)
14 #include "chrome/browser/views/extensions/extension_view.h" 15 #include "chrome/browser/views/extensions/extension_view.h"
15 #endif 16 #endif
16 17
17 class Browser; 18 class Browser;
18 class Extension; 19 class Extension;
19 class ExtensionProcessManager; 20 class ExtensionProcessManager;
20 class RenderProcessHost; 21 class RenderProcessHost;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // to this host's url. Uses host_view for the RenderViewHost's view (can be 57 // to this host's url. Uses host_view for the RenderViewHost's view (can be
57 // NULL). 58 // NULL).
58 void CreateRenderView(RenderWidgetHostView* host_view); 59 void CreateRenderView(RenderWidgetHostView* host_view);
59 60
60 // Restarts extension's renderer process. Can be called only if the renderer 61 // Restarts extension's renderer process. Can be called only if the renderer
61 // process crashed. 62 // process crashed.
62 void RecoverCrashedExtension(); 63 void RecoverCrashedExtension();
63 64
64 // RenderViewHostDelegate 65 // RenderViewHostDelegate
65 virtual const GURL& GetURL() const { return url_; } 66 virtual const GURL& GetURL() const { return url_; }
67 virtual void RenderViewCreated(RenderViewHost* render_view_host);
66 virtual void RenderViewGone(RenderViewHost* render_view_host); 68 virtual void RenderViewGone(RenderViewHost* render_view_host);
67 virtual WebPreferences GetWebkitPrefs(); 69 virtual WebPreferences GetWebkitPrefs();
68 virtual void RunJavaScriptMessage( 70 virtual void RunJavaScriptMessage(
69 const std::wstring& message, 71 const std::wstring& message,
70 const std::wstring& default_prompt, 72 const std::wstring& default_prompt,
71 const GURL& frame_url, 73 const GURL& frame_url,
72 const int flags, 74 const int flags,
73 IPC::Message* reply_msg, 75 IPC::Message* reply_msg,
74 bool* did_suppress_message); 76 bool* did_suppress_message);
75 virtual void DidStopLoading(RenderViewHost* render_view_host); 77 virtual void DidStopLoading(RenderViewHost* render_view_host);
76 virtual RenderViewHostDelegate::View* GetViewDelegate() const; 78 virtual RenderViewHostDelegate::View* GetViewDelegate() const;
77 virtual ExtensionFunctionDispatcher* CreateExtensionFunctionDispatcher(
78 RenderViewHost *render_view_host, const std::string& extension_id);
79 virtual void DidInsertCSS(); 79 virtual void DidInsertCSS();
80 virtual void ProcessDOMUIMessage(const std::string& message,
81 const std::string& content,
82 int request_id,
83 bool has_callback);
80 84
81 // RenderViewHostDelegate::View 85 // RenderViewHostDelegate::View
82 virtual void CreateNewWindow(int route_id, 86 virtual void CreateNewWindow(int route_id,
83 base::WaitableEvent* modal_dialog_event); 87 base::WaitableEvent* modal_dialog_event);
84 virtual void CreateNewWidget(int route_id, bool activatable); 88 virtual void CreateNewWidget(int route_id, bool activatable);
85 virtual void ShowCreatedWindow(int route_id, 89 virtual void ShowCreatedWindow(int route_id,
86 WindowOpenDisposition disposition, 90 WindowOpenDisposition disposition,
87 const gfx::Rect& initial_pos, 91 const gfx::Rect& initial_pos,
88 bool user_gesture, 92 bool user_gesture,
89 const GURL& creator_url); 93 const GURL& creator_url);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 126
123 // Common implementations of some RenderViewHostDelegate::View methods. 127 // Common implementations of some RenderViewHostDelegate::View methods.
124 RenderViewHostDelegateViewHelper delegate_view_helper_; 128 RenderViewHostDelegateViewHelper delegate_view_helper_;
125 129
126 // Whether the RenderWidget has reported that it has stopped loading. 130 // Whether the RenderWidget has reported that it has stopped loading.
127 bool did_stop_loading_; 131 bool did_stop_loading_;
128 132
129 // The URL being hosted. 133 // The URL being hosted.
130 GURL url_; 134 GURL url_;
131 135
136 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
137
132 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 138 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
133 }; 139 };
134 140
135 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 141 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698