OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <queue> | 9 #include <queue> |
10 #include <vector> | 10 #include <vector> |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 virtual void DidCommitLoadForFrame(WebView* webview, WebKit::WebFrame* frame, | 205 virtual void DidCommitLoadForFrame(WebView* webview, WebKit::WebFrame* frame, |
206 bool is_new_navigation); | 206 bool is_new_navigation); |
207 virtual void DidReceiveTitle(WebView* webview, | 207 virtual void DidReceiveTitle(WebView* webview, |
208 const std::wstring& title, | 208 const std::wstring& title, |
209 WebKit::WebFrame* frame); | 209 WebKit::WebFrame* frame); |
210 virtual void DidFinishLoadForFrame(WebView* webview, | 210 virtual void DidFinishLoadForFrame(WebView* webview, |
211 WebKit::WebFrame* frame); | 211 WebKit::WebFrame* frame); |
212 virtual void DidFailLoadWithError(WebView* webview, | 212 virtual void DidFailLoadWithError(WebView* webview, |
213 const WebKit::WebURLError& error, | 213 const WebKit::WebURLError& error, |
214 WebKit::WebFrame* forFrame); | 214 WebKit::WebFrame* forFrame); |
215 virtual void DidFinishDocumentLoadForFrame(WebView* webview, WebKit::WebFrame*
frame); | 215 virtual void DidFinishDocumentLoadForFrame(WebView* webview, |
| 216 WebKit::WebFrame* frame); |
216 virtual bool DidLoadResourceFromMemoryCache( | 217 virtual bool DidLoadResourceFromMemoryCache( |
217 WebView* webview, | 218 WebView* webview, |
218 const WebKit::WebURLRequest& request, | 219 const WebKit::WebURLRequest& request, |
219 const WebKit::WebURLResponse& response, | 220 const WebKit::WebURLResponse& response, |
220 WebKit::WebFrame* frame); | 221 WebKit::WebFrame* frame); |
221 virtual void DidHandleOnloadEventsForFrame(WebView* webview, WebKit::WebFrame*
frame); | 222 virtual void DidHandleOnloadEventsForFrame(WebView* webview, |
| 223 WebKit::WebFrame* frame); |
222 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, | 224 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, |
223 WebKit::WebFrame* frame, | 225 WebKit::WebFrame* frame, |
224 bool is_new_navigation); | 226 bool is_new_navigation); |
225 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, | 227 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, |
226 int new_width, | 228 int new_width, |
227 int new_height); | 229 int new_height); |
228 | 230 |
229 virtual void DidCompleteClientRedirect(WebView* webview, | 231 virtual void DidCompleteClientRedirect(WebView* webview, |
230 WebKit::WebFrame* frame, | 232 WebKit::WebFrame* frame, |
231 const GURL& source); | 233 const GURL& source); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 const GURL& src_url, | 291 const GURL& src_url, |
290 const GURL& page_url, | 292 const GURL& page_url, |
291 const GURL& frame_url, | 293 const GURL& frame_url, |
292 const ContextMenuMediaParams& media_params, | 294 const ContextMenuMediaParams& media_params, |
293 const std::wstring& selection_text, | 295 const std::wstring& selection_text, |
294 const std::wstring& misspelled_word, | 296 const std::wstring& misspelled_word, |
295 int edit_flags, | 297 int edit_flags, |
296 const std::string& security_info, | 298 const std::string& security_info, |
297 const std::string& frame_charset); | 299 const std::string& frame_charset); |
298 virtual void StartDragging(WebView* webview, | 300 virtual void StartDragging(WebView* webview, |
299 const WebKit::WebDragData& drag_data); | 301 const WebKit::WebPoint &mouseCoords, |
| 302 const WebKit::WebDragData& drag_data, |
| 303 WebKit::WebDragOperationsMask operations_mask); |
300 | 304 |
301 virtual void TakeFocus(WebView* webview, bool reverse); | 305 virtual void TakeFocus(WebView* webview, bool reverse); |
302 virtual void JSOutOfMemory(); | 306 virtual void JSOutOfMemory(); |
303 | 307 |
304 virtual void NavigateBackForwardSoon(int offset); | 308 virtual void NavigateBackForwardSoon(int offset); |
305 virtual int GetHistoryBackListCount(); | 309 virtual int GetHistoryBackListCount(); |
306 virtual int GetHistoryForwardListCount(); | 310 virtual int GetHistoryForwardListCount(); |
307 virtual void OnNavStateChanged(WebView* webview); | 311 virtual void OnNavStateChanged(WebView* webview); |
308 virtual void SetTooltipText(WebView* webview, | 312 virtual void SetTooltipText(WebView* webview, |
309 const std::wstring& tooltip_text, | 313 const std::wstring& tooltip_text, |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 // a) function:DidCommitLoadForFrame. When this function is called, | 456 // a) function:DidCommitLoadForFrame. When this function is called, |
453 // that means we have got first data. In here we try to get encoding | 457 // that means we have got first data. In here we try to get encoding |
454 // of page if it has been specified in http header. | 458 // of page if it has been specified in http header. |
455 // b) function:DidReceiveTitle. When this function is called, | 459 // b) function:DidReceiveTitle. When this function is called, |
456 // that means we have got specified title. Because in most of webpages, | 460 // that means we have got specified title. Because in most of webpages, |
457 // title tags will follow meta tags. In here we try to get encoding of | 461 // title tags will follow meta tags. In here we try to get encoding of |
458 // page if it has been specified in meta tag. | 462 // page if it has been specified in meta tag. |
459 // c) function:DidFinishDocumentLoadForFrame. When this function is | 463 // c) function:DidFinishDocumentLoadForFrame. When this function is |
460 // called, that means we have got whole html page. In here we should | 464 // called, that means we have got whole html page. In here we should |
461 // finally get right encoding of page. | 465 // finally get right encoding of page. |
462 void UpdateEncoding(WebKit::WebFrame* frame, const std::wstring& encoding_name
); | 466 void UpdateEncoding(WebKit::WebFrame* frame, const std::wstring& enc_name); |
463 | 467 |
464 // Captures the thumbnail and text contents for indexing for the given load | 468 // Captures the thumbnail and text contents for indexing for the given load |
465 // ID. If the view's load ID is different than the parameter, this call is | 469 // ID. If the view's load ID is different than the parameter, this call is |
466 // a NOP. Typically called on a timer, so the load ID may have changed in the | 470 // a NOP. Typically called on a timer, so the load ID may have changed in the |
467 // meantime. | 471 // meantime. |
468 void CapturePageInfo(int load_id, bool preliminary_capture); | 472 void CapturePageInfo(int load_id, bool preliminary_capture); |
469 | 473 |
470 // Called to retrieve the text from the given frame contents, the page text | 474 // Called to retrieve the text from the given frame contents, the page text |
471 // up to the maximum amount will be placed into the given buffer | 475 // up to the maximum amount will be placed into the given buffer |
472 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents); | 476 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( | 532 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( |
529 const std::vector<GURL>& links, | 533 const std::vector<GURL>& links, |
530 const std::vector<FilePath>& local_paths, | 534 const std::vector<FilePath>& local_paths, |
531 const FilePath& local_directory_name); | 535 const FilePath& local_directory_name); |
532 void OnUploadFileRequest(const ViewMsg_UploadFile_Params& p); | 536 void OnUploadFileRequest(const ViewMsg_UploadFile_Params& p); |
533 void OnFormFill(const FormData& form); | 537 void OnFormFill(const FormData& form); |
534 void OnFillPasswordForm( | 538 void OnFillPasswordForm( |
535 const webkit_glue::PasswordFormDomManager::FillData& form_data); | 539 const webkit_glue::PasswordFormDomManager::FillData& form_data); |
536 void OnDragTargetDragEnter(const WebDropData& drop_data, | 540 void OnDragTargetDragEnter(const WebDropData& drop_data, |
537 const gfx::Point& client_pt, | 541 const gfx::Point& client_pt, |
538 const gfx::Point& screen_pt); | 542 const gfx::Point& screen_pt, |
| 543 WebKit::WebDragOperationsMask operations_allowed); |
539 void OnDragTargetDragOver(const gfx::Point& client_pt, | 544 void OnDragTargetDragOver(const gfx::Point& client_pt, |
540 const gfx::Point& screen_pt); | 545 const gfx::Point& screen_pt, |
| 546 WebKit::WebDragOperationsMask operations_allowed); |
541 void OnDragTargetDragLeave(); | 547 void OnDragTargetDragLeave(); |
542 void OnDragTargetDrop(const gfx::Point& client_pt, | 548 void OnDragTargetDrop(const gfx::Point& client_pt, |
543 const gfx::Point& screen_pt); | 549 const gfx::Point& screen_pt); |
544 void OnAllowBindings(int enabled_bindings_flags); | 550 void OnAllowBindings(int enabled_bindings_flags); |
545 void OnSetDOMUIProperty(const std::string& name, const std::string& value); | 551 void OnSetDOMUIProperty(const std::string& name, const std::string& value); |
546 void OnSetInitialFocus(bool reverse); | 552 void OnSetInitialFocus(bool reverse); |
547 void OnUpdateWebPreferences(const WebPreferences& prefs); | 553 void OnUpdateWebPreferences(const WebPreferences& prefs); |
548 void OnSetAltErrorPageURL(const GURL& gurl); | 554 void OnSetAltErrorPageURL(const GURL& gurl); |
549 | 555 |
550 void OnDownloadFavIcon(int id, const GURL& image_url, int image_size); | 556 void OnDownloadFavIcon(int id, const GURL& image_url, int image_size); |
551 | 557 |
552 void OnGetApplicationInfo(int page_id); | 558 void OnGetApplicationInfo(int page_id); |
553 | 559 |
554 void OnScriptEvalRequest(const std::wstring& frame_xpath, | 560 void OnScriptEvalRequest(const std::wstring& frame_xpath, |
555 const std::wstring& jscript); | 561 const std::wstring& jscript); |
556 void OnCSSInsertRequest(const std::wstring& frame_xpath, | 562 void OnCSSInsertRequest(const std::wstring& frame_xpath, |
557 const std::string& css); | 563 const std::string& css); |
558 void OnAddMessageToConsole(const string16& frame_xpath, | 564 void OnAddMessageToConsole(const string16& frame_xpath, |
559 const string16& message, | 565 const string16& message, |
560 const WebKit::WebConsoleMessage::Level&); | 566 const WebKit::WebConsoleMessage::Level&); |
561 void OnReservePageIDRange(int size_of_range); | 567 void OnReservePageIDRange(int size_of_range); |
562 | 568 |
563 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, | 569 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
564 const gfx::Point& screen_point, | 570 const gfx::Point& screen_point, |
565 bool ended, bool cancelled); | 571 bool ended, |
| 572 WebKit::WebDragOperation drag_operation); |
566 void OnDragSourceSystemDragEnded(); | 573 void OnDragSourceSystemDragEnded(); |
567 void OnInstallMissingPlugin(); | 574 void OnInstallMissingPlugin(); |
568 void OnFileChooserResponse(const std::vector<FilePath>& file_names); | 575 void OnFileChooserResponse(const std::vector<FilePath>& file_names); |
569 void OnEnableViewSourceMode(); | 576 void OnEnableViewSourceMode(); |
570 void OnEnableIntrinsicWidthChangedMode(); | 577 void OnEnableIntrinsicWidthChangedMode(); |
571 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 578 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
572 void OnMediaPlayerActionAt(int x, | 579 void OnMediaPlayerActionAt(int x, |
573 int y, | 580 int y, |
574 const MediaPlayerAction& action); | 581 const MediaPlayerAction& action); |
575 void OnNotifyRendererViewType(ViewType::Type view_type); | 582 void OnNotifyRendererViewType(ViewType::Type view_type); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 // page id for the last navigation sent to the browser. | 882 // page id for the last navigation sent to the browser. |
876 int32 last_top_level_navigation_page_id_; | 883 int32 last_top_level_navigation_page_id_; |
877 | 884 |
878 // The settings this render view initialized WebKit with. | 885 // The settings this render view initialized WebKit with. |
879 WebPreferences webkit_preferences_; | 886 WebPreferences webkit_preferences_; |
880 | 887 |
881 DISALLOW_COPY_AND_ASSIGN(RenderView); | 888 DISALLOW_COPY_AND_ASSIGN(RenderView); |
882 }; | 889 }; |
883 | 890 |
884 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 891 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |