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

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

Issue 155071: Do some refactoring of renderer_host.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
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"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Initializes our RenderViewHost by creating its RenderView and navigating 56 // Initializes our RenderViewHost by creating its RenderView and navigating
57 // 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
58 // NULL). 58 // NULL).
59 void CreateRenderView(RenderWidgetHostView* host_view); 59 void CreateRenderView(RenderWidgetHostView* host_view);
60 60
61 // 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
62 // process crashed. 62 // process crashed.
63 void RecoverCrashedExtension(); 63 void RecoverCrashedExtension();
64 64
65 // RenderViewHostDelegate 65 // RenderViewHostDelegate implementation.
66 virtual RenderViewHostDelegate::View* GetViewDelegate() const;
67 virtual RenderViewHostDelegate::Save* GetSaveDelegate() const { return NULL; }
66 virtual const GURL& GetURL() const { return url_; } 68 virtual const GURL& GetURL() const { return url_; }
69 virtual TabContents* GetAsTabContents() { return NULL; }
67 virtual void RenderViewCreated(RenderViewHost* render_view_host); 70 virtual void RenderViewCreated(RenderViewHost* render_view_host);
71 virtual void RenderViewReady(RenderViewHost* render_view_host) {}
68 virtual void RenderViewGone(RenderViewHost* render_view_host); 72 virtual void RenderViewGone(RenderViewHost* render_view_host);
69 virtual WebPreferences GetWebkitPrefs(); 73 virtual void DidNavigate(RenderViewHost* render_view_host,
70 virtual void RunJavaScriptMessage( 74 const ViewHostMsg_FrameNavigate_Params& params) {}
71 const std::wstring& message, 75 virtual void UpdateState(RenderViewHost* render_view_host,
72 const std::wstring& default_prompt, 76 int32 page_id,
73 const GURL& frame_url, 77 const std::string& state) {}
74 const int flags, 78 virtual void UpdateTitle(RenderViewHost* render_view_host,
75 IPC::Message* reply_msg, 79 int32 page_id,
76 bool* did_suppress_message); 80 const std::wstring& title) {}
81 virtual void UpdateEncoding(RenderViewHost* render_view_host,
82 const std::wstring& encoding) {}
83 virtual void UpdateTargetURL(int32 page_id, const GURL& url) {}
84 virtual void UpdateThumbnail(const GURL& url,
85 const SkBitmap& bitmap,
86 const ThumbnailScore& score) {}
87 virtual void UpdateInspectorSettings(const std::wstring& raw_settings) {}
88 virtual void Close(RenderViewHost* render_view_host) {}
89 virtual void RequestMove(const gfx::Rect& new_bounds) {}
90 virtual void DidStartLoading(RenderViewHost* render_view_host) {}
77 virtual void DidStopLoading(RenderViewHost* render_view_host); 91 virtual void DidStopLoading(RenderViewHost* render_view_host);
78 virtual RenderViewHostDelegate::View* GetViewDelegate() const; 92 virtual void DidStartProvisionalLoadForFrame(RenderViewHost* render_view_host,
79 virtual void DidInsertCSS(); 93 bool is_main_frame,
94 const GURL& url) {}
95 virtual void DidStartReceivingResourceResponse(
96 ResourceRequestDetails* details) {}
97 virtual void DidRedirectProvisionalLoad(int32 page_id,
98 const GURL& source_url,
99 const GURL& target_url) {}
100 virtual void DidRedirectResource(ResourceRequestDetails* details) {}
101 virtual void DidLoadResourceFromMemoryCache(
102 const GURL& url,
103 const std::string& frame_origin,
104 const std::string& main_frame_origin,
105 const std::string& security_info) {}
106 virtual void DidFailProvisionalLoadWithError(
107 RenderViewHost* render_view_host,
108 bool is_main_frame,
109 int error_code,
110 const GURL& url,
111 bool showing_repost_interstitial) {}
112 virtual void UpdateFavIconURL(RenderViewHost* render_view_host,
113 int32 page_id, const GURL& icon_url) {}
114 virtual void DidDownloadImage(RenderViewHost* render_view_host,
115 int id,
116 const GURL& image_url,
117 bool errored,
118 const SkBitmap& image) {}
119 virtual void RequestOpenURL(const GURL& url,
120 const GURL& referrer,
121 WindowOpenDisposition disposition) {}
122 virtual void DomOperationResponse(const std::string& json_string,
123 int automation_id) {}
80 virtual void ProcessDOMUIMessage(const std::string& message, 124 virtual void ProcessDOMUIMessage(const std::string& message,
81 const std::string& content, 125 const std::string& content,
82 int request_id, 126 int request_id,
83 bool has_callback); 127 bool has_callback);
128 virtual void ProcessExternalHostMessage(const std::string& message,
129 const std::string& origin,
130 const std::string& target) {}
131 virtual void DocumentLoadedInFrame() {}
132 virtual void GoToEntryAtOffset(int offset) {}
133 virtual void GetHistoryListCount(int* back_list_count,
134 int* forward_list_count) {}
135 virtual void RunFileChooser(bool multiple_files,
136 const string16& title,
137 const FilePath& default_file) {}
138 virtual void RunJavaScriptMessage(const std::wstring& message,
139 const std::wstring& default_prompt,
140 const GURL& frame_url,
141 const int flags,
142 IPC::Message* reply_msg,
143 bool* did_suppress_message);
144 virtual void RunBeforeUnloadConfirm(const std::wstring& message,
145 IPC::Message* reply_msg) {}
146 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
147 const std::string& json_arguments,
148 IPC::Message* reply_msg) {}
149 virtual void PasswordFormsSeen(
150 const std::vector<webkit_glue::PasswordForm>& forms) {}
151 virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form) {}
152 virtual void GetAutofillSuggestions(const std::wstring& field_name,
153 const std::wstring& user_text,
154 int64 node_id,
155 int request_id) {}
156 virtual void RemoveAutofillEntry(const std::wstring& field_name,
157 const std::wstring& value) {}
158 virtual void PageHasOSDD(RenderViewHost* render_view_host,
159 int32 page_id, const GURL& doc_url,
160 bool autodetected) {}
161 virtual void DidGetPrintedPagesCount(int cookie, int number_pages) {}
162 virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params) {}
163 virtual GURL GetAlternateErrorPageURL() const;
164 virtual RendererPreferences GetRendererPrefs() const;
165 virtual WebPreferences GetWebkitPrefs();
166 virtual void OnMissingPluginStatus(int status) {}
167 virtual void OnCrashedPlugin(const FilePath& plugin_path) {}
168 virtual void OnCrashedWorker() {}
169 virtual void OnJSOutOfMemory() {}
170 virtual void ShouldClosePage(bool proceed) {}
171 virtual void OnCrossSiteResponse(int new_render_process_host_id,
172 int new_request_id) {}
173 virtual void OnCrossSiteNavigationCanceled() {}
174 virtual bool CanBlur() const { return true; }
175 virtual gfx::Rect GetRootWindowResizerRect() const { return gfx::Rect(); }
176 virtual void RendererUnresponsive(RenderViewHost* render_view_host,
177 bool is_during_unload) {}
178 virtual void RendererResponsive(RenderViewHost* render_view_host) {}
179 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state) {}
180 virtual void OnDidGetApplicationInfo(
181 int32 page_id,
182 const webkit_glue::WebApplicationInfo& app_info) {}
183 virtual void OnUserGesture() {}
184 virtual bool IsExternalTabContainer() const { return false; }
185 virtual void OnFindReply(int request_id,
186 int number_of_matches,
187 const gfx::Rect& selection_rect,
188 int active_match_ordinal,
189 bool final_update) {}
190 virtual void DidInsertCSS();
84 191
85 // RenderViewHostDelegate::View 192 // RenderViewHostDelegate::View
86 virtual void CreateNewWindow(int route_id, 193 virtual void CreateNewWindow(int route_id,
87 base::WaitableEvent* modal_dialog_event); 194 base::WaitableEvent* modal_dialog_event);
88 virtual void CreateNewWidget(int route_id, bool activatable); 195 virtual void CreateNewWidget(int route_id, bool activatable);
89 virtual void ShowCreatedWindow(int route_id, 196 virtual void ShowCreatedWindow(int route_id,
90 WindowOpenDisposition disposition, 197 WindowOpenDisposition disposition,
91 const gfx::Rect& initial_pos, 198 const gfx::Rect& initial_pos,
92 bool user_gesture, 199 bool user_gesture,
93 const GURL& creator_url); 200 const GURL& creator_url);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 239
133 // The URL being hosted. 240 // The URL being hosted.
134 GURL url_; 241 GURL url_;
135 242
136 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; 243 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
137 244
138 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 245 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
139 }; 246 };
140 247
141 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 248 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698