OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 const ViewHostMsg_FrameNavigate_Params& params) {} | 188 const ViewHostMsg_FrameNavigate_Params& params) {} |
189 | 189 |
190 // The state for the page changed and should be updated. | 190 // The state for the page changed and should be updated. |
191 virtual void UpdateState(RenderViewHost* render_view_host, | 191 virtual void UpdateState(RenderViewHost* render_view_host, |
192 int32 page_id, | 192 int32 page_id, |
193 const PageState& state) {} | 193 const PageState& state) {} |
194 | 194 |
195 // The page's title was changed and should be updated. | 195 // The page's title was changed and should be updated. |
196 virtual void UpdateTitle(RenderViewHost* render_view_host, | 196 virtual void UpdateTitle(RenderViewHost* render_view_host, |
197 int32 page_id, | 197 int32 page_id, |
198 const string16& title, | 198 const base::string16& title, |
199 base::i18n::TextDirection title_direction) {} | 199 base::i18n::TextDirection title_direction) {} |
200 | 200 |
201 // The page's encoding was changed and should be updated. | 201 // The page's encoding was changed and should be updated. |
202 virtual void UpdateEncoding(RenderViewHost* render_view_host, | 202 virtual void UpdateEncoding(RenderViewHost* render_view_host, |
203 const std::string& encoding) {} | 203 const std::string& encoding) {} |
204 | 204 |
205 // The destination URL has changed should be updated | 205 // The destination URL has changed should be updated |
206 virtual void UpdateTargetURL(int32 page_id, const GURL& url) {} | 206 virtual void UpdateTargetURL(int32 page_id, const GURL& url) {} |
207 | 207 |
208 // The page is trying to close the RenderView's representation in the client. | 208 // The page is trying to close the RenderView's representation in the client. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // The page wants to close the active view in this tab. | 274 // The page wants to close the active view in this tab. |
275 virtual void RouteCloseEvent(RenderViewHost* rvh) {} | 275 virtual void RouteCloseEvent(RenderViewHost* rvh) {} |
276 | 276 |
277 // The page wants to post a message to the active view in this tab. | 277 // The page wants to post a message to the active view in this tab. |
278 virtual void RouteMessageEvent( | 278 virtual void RouteMessageEvent( |
279 RenderViewHost* rvh, | 279 RenderViewHost* rvh, |
280 const ViewMsg_PostMessage_Params& params) {} | 280 const ViewMsg_PostMessage_Params& params) {} |
281 | 281 |
282 // A javascript message, confirmation or prompt should be shown. | 282 // A javascript message, confirmation or prompt should be shown. |
283 virtual void RunJavaScriptMessage(RenderViewHost* rvh, | 283 virtual void RunJavaScriptMessage(RenderViewHost* rvh, |
284 const string16& message, | 284 const base::string16& message, |
285 const string16& default_prompt, | 285 const base::string16& default_prompt, |
286 const GURL& frame_url, | 286 const GURL& frame_url, |
287 JavaScriptMessageType type, | 287 JavaScriptMessageType type, |
288 IPC::Message* reply_msg, | 288 IPC::Message* reply_msg, |
289 bool* did_suppress_message) {} | 289 bool* did_suppress_message) {} |
290 | 290 |
291 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, | 291 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, |
292 const string16& message, | 292 const base::string16& message, |
293 bool is_reload, | 293 bool is_reload, |
294 IPC::Message* reply_msg) {} | 294 IPC::Message* reply_msg) {} |
295 | 295 |
296 // A message was added to to the console. | 296 // A message was added to to the console. |
297 virtual bool AddMessageToConsole(int32 level, | 297 virtual bool AddMessageToConsole(int32 level, |
298 const string16& message, | 298 const base::string16& message, |
299 int32 line_no, | 299 int32 line_no, |
300 const string16& source_id); | 300 const base::string16& source_id); |
301 | 301 |
302 // Return a dummy RendererPreferences object that will be used by the renderer | 302 // Return a dummy RendererPreferences object that will be used by the renderer |
303 // associated with the owning RenderViewHost. | 303 // associated with the owning RenderViewHost. |
304 virtual RendererPreferences GetRendererPrefs( | 304 virtual RendererPreferences GetRendererPrefs( |
305 BrowserContext* browser_context) const = 0; | 305 BrowserContext* browser_context) const = 0; |
306 | 306 |
307 // Returns a WebPreferences object that will be used by the renderer | 307 // Returns a WebPreferences object that will be used by the renderer |
308 // associated with the owning render view host. | 308 // associated with the owning render view host. |
309 virtual WebPreferences GetWebkitPrefs(); | 309 virtual WebPreferences GetWebkitPrefs(); |
310 | 310 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // created by the RenderViewHost. | 451 // created by the RenderViewHost. |
452 virtual FrameTree* GetFrameTree(); | 452 virtual FrameTree* GetFrameTree(); |
453 | 453 |
454 protected: | 454 protected: |
455 virtual ~RenderViewHostDelegate() {} | 455 virtual ~RenderViewHostDelegate() {} |
456 }; | 456 }; |
457 | 457 |
458 } // namespace content | 458 } // namespace content |
459 | 459 |
460 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 460 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
OLD | NEW |