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

Side by Side Diff: chrome/renderer/render_view.h

Issue 200054: Hook up WebFrameClient, replacing many WebViewDelegate methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_RENDERER_RENDER_VIEW_H_ 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_
6 #define CHROME_RENDERER_RENDER_VIEW_H_ 6 #define CHROME_RENDERER_RENDER_VIEW_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <queue> 10 #include <queue>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/gfx/point.h" 15 #include "base/gfx/point.h"
16 #include "base/gfx/rect.h" 16 #include "base/gfx/rect.h"
17 #include "base/id_map.h" 17 #include "base/id_map.h"
18 #include "base/shared_memory.h" 18 #include "base/shared_memory.h"
19 #include "base/timer.h" 19 #include "base/timer.h"
20 #include "base/values.h" 20 #include "base/values.h"
21 #include "base/weak_ptr.h" 21 #include "base/weak_ptr.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "chrome/common/navigation_gesture.h"
23 #include "chrome/common/renderer_preferences.h" 24 #include "chrome/common/renderer_preferences.h"
24 #include "chrome/common/view_types.h" 25 #include "chrome/common/view_types.h"
25 #include "chrome/renderer/automation/dom_automation_controller.h" 26 #include "chrome/renderer/automation/dom_automation_controller.h"
26 #include "chrome/renderer/dom_ui_bindings.h" 27 #include "chrome/renderer/dom_ui_bindings.h"
27 #include "chrome/renderer/extensions/extension_process_bindings.h" 28 #include "chrome/renderer/extensions/extension_process_bindings.h"
28 #include "chrome/renderer/external_host_bindings.h" 29 #include "chrome/renderer/external_host_bindings.h"
29 #include "chrome/renderer/render_widget.h" 30 #include "chrome/renderer/render_widget.h"
30 #include "third_party/skia/include/core/SkBitmap.h" 31 #include "third_party/skia/include/core/SkBitmap.h"
31 #include "testing/gtest/include/gtest/gtest_prod.h" 32 #include "testing/gtest/include/gtest/gtest_prod.h"
32 #include "webkit/api/public/WebConsoleMessage.h" 33 #include "webkit/api/public/WebConsoleMessage.h"
33 #include "webkit/api/public/WebEditingClient.h" 34 #include "webkit/api/public/WebEditingClient.h"
35 #include "webkit/api/public/WebFrameClient.h"
34 #include "webkit/api/public/WebTextDirection.h" 36 #include "webkit/api/public/WebTextDirection.h"
35 #include "webkit/glue/dom_serializer_delegate.h" 37 #include "webkit/glue/dom_serializer_delegate.h"
36 #include "webkit/glue/form_data.h" 38 #include "webkit/glue/form_data.h"
37 #include "webkit/glue/password_form_dom_manager.h" 39 #include "webkit/glue/password_form_dom_manager.h"
38 #include "webkit/glue/webaccessibilitymanager.h" 40 #include "webkit/glue/webaccessibilitymanager.h"
39 #include "webkit/glue/webplugin_page_delegate.h" 41 #include "webkit/glue/webplugin_page_delegate.h"
40 #include "webkit/glue/webpreferences.h" 42 #include "webkit/glue/webpreferences.h"
41 #include "webkit/glue/webview_delegate.h" 43 #include "webkit/glue/webview_delegate.h"
42 #include "webkit/glue/webview.h" 44 #include "webkit/glue/webview.h"
43 45
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // scoped_refptr<int>. 97 // scoped_refptr<int>.
96 typedef base::RefCountedData<int> SharedRenderViewCounter; 98 typedef base::RefCountedData<int> SharedRenderViewCounter;
97 99
98 // 100 //
99 // RenderView is an object that manages a WebView object, and provides a 101 // RenderView is an object that manages a WebView object, and provides a
100 // communication interface with an embedding application process 102 // communication interface with an embedding application process
101 // 103 //
102 class RenderView : public RenderWidget, 104 class RenderView : public RenderWidget,
103 public WebViewDelegate, 105 public WebViewDelegate,
104 public WebKit::WebEditingClient, 106 public WebKit::WebEditingClient,
107 public WebKit::WebFrameClient,
105 public webkit_glue::WebPluginPageDelegate, 108 public webkit_glue::WebPluginPageDelegate,
106 public webkit_glue::DomSerializerDelegate, 109 public webkit_glue::DomSerializerDelegate,
107 public base::SupportsWeakPtr<RenderView> { 110 public base::SupportsWeakPtr<RenderView> {
108 public: 111 public:
109 struct RenderViewSet { 112 struct RenderViewSet {
110 std::set<RenderView*> render_view_set_; 113 std::set<RenderView*> render_view_set_;
111 }; 114 };
112 115
113 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the 116 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the
114 // parent of the WebView HWND that will be created. The modal_dialog_event 117 // parent of the WebView HWND that will be created. The modal_dialog_event
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 virtual void RunFileChooser(bool multi_select, 184 virtual void RunFileChooser(bool multi_select,
182 const string16& title, 185 const string16& title,
183 const FilePath& initial_filename, 186 const FilePath& initial_filename,
184 WebFileChooserCallback* file_chooser); 187 WebFileChooserCallback* file_chooser);
185 virtual void AddMessageToConsole(WebView* webview, 188 virtual void AddMessageToConsole(WebView* webview,
186 const std::wstring& message, 189 const std::wstring& message,
187 unsigned int line_no, 190 unsigned int line_no,
188 const std::wstring& source_id); 191 const std::wstring& source_id);
189 virtual void DidStartLoading(WebView* webview); 192 virtual void DidStartLoading(WebView* webview);
190 virtual void DidStopLoading(WebView* webview); 193 virtual void DidStopLoading(WebView* webview);
191 virtual void DidCreateDataSource(WebKit::WebFrame* frame,
192 WebKit::WebDataSource* ds);
193 virtual void DidStartProvisionalLoadForFrame(
194 WebView* webview,
195 WebKit::WebFrame* frame,
196 NavigationGesture gesture);
197 virtual void DidReceiveProvisionalLoadServerRedirect(WebView* webview,
198 WebKit::WebFrame* frame);
199 virtual void DidFailProvisionalLoadWithError(
200 WebView* webview,
201 const WebKit::WebURLError& error,
202 WebKit::WebFrame* frame);
203 virtual void LoadNavigationErrorPage( 194 virtual void LoadNavigationErrorPage(
204 WebKit::WebFrame* frame, 195 WebKit::WebFrame* frame,
205 const WebKit::WebURLRequest& failed_request, 196 const WebKit::WebURLRequest& failed_request,
206 const WebKit::WebURLError& error, 197 const WebKit::WebURLError& error,
207 const std::string& html, 198 const std::string& html,
208 bool replace); 199 bool replace);
209 virtual void DidReceiveDocumentData(WebKit::WebFrame* frame, const char* data,
210 size_t data_len);
211 virtual void DidCommitLoadForFrame(WebView* webview, WebKit::WebFrame* frame,
212 bool is_new_navigation);
213 virtual void DidReceiveTitle(WebView* webview,
214 const std::wstring& title,
215 WebKit::WebFrame* frame);
216 virtual void DidFinishLoadForFrame(WebView* webview,
217 WebKit::WebFrame* frame);
218 virtual void DidFailLoadWithError(WebView* webview,
219 const WebKit::WebURLError& error,
220 WebKit::WebFrame* forFrame);
221 virtual void DidFinishDocumentLoadForFrame(WebView* webview,
222 WebKit::WebFrame* frame);
223 virtual bool DidLoadResourceFromMemoryCache(
224 WebView* webview,
225 const WebKit::WebURLRequest& request,
226 const WebKit::WebURLResponse& response,
227 WebKit::WebFrame* frame);
228 virtual void DidHandleOnloadEventsForFrame(WebView* webview,
229 WebKit::WebFrame* frame);
230 virtual void DidChangeLocationWithinPageForFrame(WebView* webview,
231 WebKit::WebFrame* frame,
232 bool is_new_navigation);
233 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget,
234 int new_width,
235 int new_height);
236 virtual void DidCompleteClientRedirect(WebView* webview,
237 WebKit::WebFrame* frame,
238 const GURL& source);
239 virtual void WillCloseFrame(WebView* webview, WebKit::WebFrame* frame);
240 virtual void WillSubmitForm(WebView* webview, WebKit::WebFrame* frame,
241 const WebKit::WebForm& form);
242 virtual void WillSendRequest(WebKit::WebFrame* webframe,
243 uint32 identifier,
244 WebKit::WebURLRequest* request,
245 const WebKit::WebURLResponse& redirect_response);
246 virtual void DidReceiveResponse(WebKit::WebFrame* webframe,
247 uint32 identifier,
248 const WebKit::WebURLResponse& response);
249 virtual void DidFinishLoading(WebKit::WebFrame* webframe, uint32 identifier);
250 virtual void WindowObjectCleared(WebKit::WebFrame* webframe);
251 virtual void DocumentElementAvailable(WebKit::WebFrame* webframe);
252 virtual void DidCreateScriptContextForFrame(WebKit::WebFrame* webframe); 200 virtual void DidCreateScriptContextForFrame(WebKit::WebFrame* webframe);
253 virtual void DidDestroyScriptContextForFrame(WebKit::WebFrame* webframe); 201 virtual void DidDestroyScriptContextForFrame(WebKit::WebFrame* webframe);
254 virtual void DidCreateIsolatedScriptContext(WebKit::WebFrame* webframe); 202 virtual void DidCreateIsolatedScriptContext(WebKit::WebFrame* webframe);
255 virtual WebKit::WebNavigationPolicy PolicyForNavigationAction(
256 WebView* webview,
257 WebKit::WebFrame* frame,
258 const WebKit::WebURLRequest& request,
259 WebKit::WebNavigationType type,
260 WebKit::WebNavigationPolicy default_policy,
261 bool is_redirect);
262 virtual WebView* CreateWebView(WebView* webview, 203 virtual WebView* CreateWebView(WebView* webview,
263 bool user_gesture, 204 bool user_gesture,
264 const GURL& creator_url); 205 const GURL& creator_url);
265 virtual WebKit::WebWidget* CreatePopupWidget( 206 virtual WebKit::WebWidget* CreatePopupWidget(
266 WebView* webview, 207 WebView* webview,
267 bool activatable); 208 bool activatable);
268 virtual WebKit::WebWidget* CreatePopupWidgetWithInfo( 209 virtual WebKit::WebWidget* CreatePopupWidgetWithInfo(
269 WebView* webview, 210 WebView* webview,
270 const WebKit::WebPopupMenuInfo& info); 211 const WebKit::WebPopupMenuInfo& info);
271 virtual WebKit::WebPlugin* CreatePlugin(
272 WebKit::WebFrame* frame,
273 const WebKit::WebPluginParams& params);
274 virtual WebKit::WebWorker* CreateWebWorker(WebKit::WebWorkerClient* client);
275 virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer(
276 WebKit::WebMediaPlayerClient* client);
277 virtual void OnMissingPluginStatus( 212 virtual void OnMissingPluginStatus(
278 WebPluginDelegateProxy* delegate, 213 WebPluginDelegateProxy* delegate,
279 int status); 214 int status);
280 virtual void OpenURL(WebView* webview, const GURL& url,
281 const GURL& referrer,
282 WebKit::WebNavigationPolicy policy);
283 virtual void DidDownloadImage(int id, 215 virtual void DidDownloadImage(int id,
284 const GURL& image_url, 216 const GURL& image_url,
285 bool errored, 217 bool errored,
286 const SkBitmap& image); 218 const SkBitmap& image);
287 virtual void ShowContextMenu(WebView* webview, 219 virtual void ShowContextMenu(WebView* webview,
288 ContextNodeType node_type, 220 ContextNodeType node_type,
289 int x, 221 int x,
290 int y, 222 int y,
291 const GURL& link_url, 223 const GURL& link_url,
292 const GURL& src_url, 224 const GURL& src_url,
293 const GURL& page_url, 225 const GURL& page_url,
294 const GURL& frame_url, 226 const GURL& frame_url,
295 const ContextMenuMediaParams& media_params, 227 const ContextMenuMediaParams& media_params,
296 const std::wstring& selection_text, 228 const std::wstring& selection_text,
297 const std::wstring& misspelled_word, 229 const std::wstring& misspelled_word,
298 int edit_flags, 230 int edit_flags,
299 const std::string& security_info, 231 const std::string& security_info,
300 const std::string& frame_charset); 232 const std::string& frame_charset);
301 virtual void StartDragging(WebView* webview, 233 virtual void StartDragging(WebView* webview,
302 const WebKit::WebPoint &mouseCoords, 234 const WebKit::WebPoint &mouseCoords,
303 const WebKit::WebDragData& drag_data, 235 const WebKit::WebDragData& drag_data,
304 WebKit::WebDragOperationsMask operations_mask); 236 WebKit::WebDragOperationsMask operations_mask);
305 virtual void TakeFocus(WebView* webview, bool reverse); 237 virtual void TakeFocus(WebView* webview, bool reverse);
306 virtual void JSOutOfMemory();
307 virtual void NavigateBackForwardSoon(int offset); 238 virtual void NavigateBackForwardSoon(int offset);
308 virtual int GetHistoryBackListCount(); 239 virtual int GetHistoryBackListCount();
309 virtual int GetHistoryForwardListCount(); 240 virtual int GetHistoryForwardListCount();
310 virtual void OnNavStateChanged(WebView* webview); 241 virtual void OnNavStateChanged(WebView* webview);
311 virtual void SetTooltipText(WebView* webview, 242 virtual void SetTooltipText(WebView* webview,
312 const std::wstring& tooltip_text, 243 const std::wstring& tooltip_text,
313 WebKit::WebTextDirection text_direction_hint); 244 WebKit::WebTextDirection text_direction_hint);
314 virtual void DownloadUrl(const GURL& url, const GURL& referrer); 245 virtual void DownloadUrl(const GURL& url, const GURL& referrer);
315 virtual void UpdateInspectorSettings(const std::wstring& raw_settings); 246 virtual void UpdateInspectorSettings(const std::wstring& raw_settings);
316 virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate(); 247 virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 const WebKit::WebString& style, const WebKit::WebRange& range); 282 const WebKit::WebString& style, const WebKit::WebRange& range);
352 virtual bool isSmartInsertDeleteEnabled(); 283 virtual bool isSmartInsertDeleteEnabled();
353 virtual bool isSelectTrailingWhitespaceEnabled(); 284 virtual bool isSelectTrailingWhitespaceEnabled();
354 virtual void setInputMethodEnabled(bool enabled); 285 virtual void setInputMethodEnabled(bool enabled);
355 virtual void didBeginEditing() {} 286 virtual void didBeginEditing() {}
356 virtual void didChangeSelection(bool is_selection_empty); 287 virtual void didChangeSelection(bool is_selection_empty);
357 virtual void didChangeContents() {} 288 virtual void didChangeContents() {}
358 virtual void didExecuteCommand(const WebKit::WebString& command_name); 289 virtual void didExecuteCommand(const WebKit::WebString& command_name);
359 virtual void didEndEditing() {} 290 virtual void didEndEditing() {}
360 291
292 // WebKit::WebFrameClient
293 virtual WebKit::WebPlugin* createPlugin(
294 WebKit::WebFrame* frame, const WebKit::WebPluginParams& params);
295 virtual WebKit::WebWorker* createWorker(
296 WebKit::WebFrame* frame, WebKit::WebWorkerClient* client);
297 virtual WebKit::WebMediaPlayer* createMediaPlayer(
298 WebKit::WebFrame* frame, WebKit::WebMediaPlayerClient* client);
299 virtual void willClose(WebKit::WebFrame* frame);
300 virtual void loadURLExternally(
301 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request,
302 WebKit::WebNavigationPolicy policy);
303 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(
304 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request,
305 WebKit::WebNavigationType type,
306 WebKit::WebNavigationPolicy default_policy, bool is_redirect);
307 virtual void willSubmitForm(WebKit::WebFrame* frame,
308 const WebKit::WebForm& form);
309 virtual void willPerformClientRedirect(
310 WebKit::WebFrame* frame, const WebKit::WebURL& from,
311 const WebKit::WebURL& to, double interval, double fire_time);
312 virtual void didCancelClientRedirect(WebKit::WebFrame* frame);
313 virtual void didCompleteClientRedirect(
314 WebKit::WebFrame* frame, const WebKit::WebURL& from);
315 virtual void didCreateDataSource(
316 WebKit::WebFrame* frame, WebKit::WebDataSource* datasource);
317 virtual void didStartProvisionalLoad(WebKit::WebFrame* frame);
318 virtual void didReceiveServerRedirectForProvisionalLoad(
319 WebKit::WebFrame* frame);
320 virtual void didFailProvisionalLoad(
321 WebKit::WebFrame* frame, const WebKit::WebURLError& error);
322 virtual void didReceiveDocumentData(
323 WebKit::WebFrame* frame, const char* data, size_t length,
324 bool& prevent_default);
325 virtual void didCommitProvisionalLoad(
326 WebKit::WebFrame* frame, bool is_new_navigation);
327 virtual void didClearWindowObject(WebKit::WebFrame* frame);
328 virtual void didCreateDocumentElement(WebKit::WebFrame* frame);
329 virtual void didReceiveTitle(
330 WebKit::WebFrame* frame, const WebKit::WebString& title);
331 virtual void didFinishDocumentLoad(WebKit::WebFrame* frame);
332 virtual void didHandleOnloadEvents(WebKit::WebFrame* frame);
333 virtual void didFailLoad(
334 WebKit::WebFrame* frame, const WebKit::WebURLError& error);
335 virtual void didFinishLoad(WebKit::WebFrame* frame);
336 virtual void didChangeLocationWithinPage(
337 WebKit::WebFrame* frame, bool is_new_navigation);
338 virtual void assignIdentifierToRequest(
339 WebKit::WebFrame* frame, unsigned identifier,
340 const WebKit::WebURLRequest& request);
341 virtual void willSendRequest(
342 WebKit::WebFrame* frame, unsigned identifier,
343 WebKit::WebURLRequest& request,
344 const WebKit::WebURLResponse& redirect_response);
345 virtual void didReceiveResponse(
346 WebKit::WebFrame* frame, unsigned identifier,
347 const WebKit::WebURLResponse& response);
348 virtual void didFinishResourceLoad(
349 WebKit::WebFrame* frame, unsigned identifier);
350 virtual void didFailResourceLoad(
351 WebKit::WebFrame* frame, unsigned identifier,
352 const WebKit::WebURLError& error);
353 virtual void didLoadResourceFromMemoryCache(
354 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request,
355 const WebKit::WebURLResponse&);
356 virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame* frame);
357 virtual void didChangeContentsSize(
358 WebKit::WebFrame* frame, const WebKit::WebSize& size);
359
361 // webkit_glue::WebPluginPageDelegate 360 // webkit_glue::WebPluginPageDelegate
362 virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate( 361 virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(
363 const GURL& url, 362 const GURL& url,
364 const std::string& mime_type, 363 const std::string& mime_type,
365 std::string* actual_mime_type); 364 std::string* actual_mime_type);
366 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle); 365 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle);
367 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle); 366 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle);
368 virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move); 367 virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move);
369 virtual void DidStartLoadingForPlugin(); 368 virtual void DidStartLoadingForPlugin();
370 virtual void DidStopLoadingForPlugin(); 369 virtual void DidStopLoadingForPlugin();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case, 451 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case,
453 // CompleteInit must be called later with the true ID. 452 // CompleteInit must be called later with the true ID.
454 void Init(gfx::NativeViewId parent, 453 void Init(gfx::NativeViewId parent,
455 base::WaitableEvent* modal_dialog_event, // takes ownership 454 base::WaitableEvent* modal_dialog_event, // takes ownership
456 int32 opener_id, 455 int32 opener_id,
457 const RendererPreferences& renderer_prefs, 456 const RendererPreferences& renderer_prefs,
458 SharedRenderViewCounter* counter, 457 SharedRenderViewCounter* counter,
459 int32 routing_id); 458 int32 routing_id);
460 459
461 void UpdateURL(WebKit::WebFrame* frame); 460 void UpdateURL(WebKit::WebFrame* frame);
462 void UpdateTitle(WebKit::WebFrame* frame, const std::wstring& title); 461 void UpdateTitle(WebKit::WebFrame* frame, const string16& title);
463 void UpdateSessionHistory(WebKit::WebFrame* frame); 462 void UpdateSessionHistory(WebKit::WebFrame* frame);
464 463
465 // Update current main frame's encoding and send it to browser window. 464 // Update current main frame's encoding and send it to browser window.
466 // Since we want to let users see the right encoding info from menu 465 // Since we want to let users see the right encoding info from menu
467 // before finishing loading, we call the UpdateEncoding in 466 // before finishing loading, we call the UpdateEncoding in
468 // a) function:DidCommitLoadForFrame. When this function is called, 467 // a) function:DidCommitLoadForFrame. When this function is called,
469 // that means we have got first data. In here we try to get encoding 468 // that means we have got first data. In here we try to get encoding
470 // of page if it has been specified in http header. 469 // of page if it has been specified in http header.
471 // b) function:DidReceiveTitle. When this function is called, 470 // b) function:DidReceiveTitle. When this function is called,
472 // that means we have got specified title. Because in most of webpages, 471 // that means we have got specified title. Because in most of webpages,
473 // title tags will follow meta tags. In here we try to get encoding of 472 // title tags will follow meta tags. In here we try to get encoding of
474 // page if it has been specified in meta tag. 473 // page if it has been specified in meta tag.
475 // c) function:DidFinishDocumentLoadForFrame. When this function is 474 // c) function:DidFinishDocumentLoadForFrame. When this function is
476 // called, that means we have got whole html page. In here we should 475 // called, that means we have got whole html page. In here we should
477 // finally get right encoding of page. 476 // finally get right encoding of page.
478 void UpdateEncoding(WebKit::WebFrame* frame, 477 void UpdateEncoding(WebKit::WebFrame* frame,
479 const std::string& encoding_name); 478 const std::string& encoding_name);
480 479
480 void OpenURL(const GURL& url, const GURL& referrer,
481 WebKit::WebNavigationPolicy policy);
482
481 // Captures the thumbnail and text contents for indexing for the given load 483 // Captures the thumbnail and text contents for indexing for the given load
482 // ID. If the view's load ID is different than the parameter, this call is 484 // ID. If the view's load ID is different than the parameter, this call is
483 // a NOP. Typically called on a timer, so the load ID may have changed in the 485 // a NOP. Typically called on a timer, so the load ID may have changed in the
484 // meantime. 486 // meantime.
485 void CapturePageInfo(int load_id, bool preliminary_capture); 487 void CapturePageInfo(int load_id, bool preliminary_capture);
486 488
487 // Called to retrieve the text from the given frame contents, the page text 489 // Called to retrieve the text from the given frame contents, the page text
488 // up to the maximum amount will be placed into the given buffer 490 // up to the maximum amount will be placed into the given buffer
489 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents); 491 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents);
490 492
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 // page id for the last navigation sent to the browser. 896 // page id for the last navigation sent to the browser.
895 int32 last_top_level_navigation_page_id_; 897 int32 last_top_level_navigation_page_id_;
896 898
897 // The settings this render view initialized WebKit with. 899 // The settings this render view initialized WebKit with.
898 WebPreferences webkit_preferences_; 900 WebPreferences webkit_preferences_;
899 901
900 DISALLOW_COPY_AND_ASSIGN(RenderView); 902 DISALLOW_COPY_AND_ASSIGN(RenderView);
901 }; 903 };
902 904
903 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 905 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698