| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "chrome/browser/cancelable_request.h" |
| 12 #include "chrome/browser/find_bar_controller.h" | 13 #include "chrome/browser/find_bar_controller.h" |
| 14 #include "chrome/browser/icon_manager.h" |
| 13 #include "chrome/browser/renderer_host/render_widget_host.h" | 15 #include "chrome/browser/renderer_host/render_widget_host.h" |
| 14 #include "chrome/common/content_settings_types.h" | 16 #include "chrome/common/content_settings_types.h" |
| 15 #include "chrome/common/page_zoom.h" | 17 #include "chrome/common/page_zoom.h" |
| 16 #include "chrome/common/translate_errors.h" | 18 #include "chrome/common/translate_errors.h" |
| 17 #include "chrome/common/view_types.h" | 19 #include "chrome/common/view_types.h" |
| 18 #include "chrome/common/window_container_type.h" | 20 #include "chrome/common/window_container_type.h" |
| 19 #include "net/base/load_states.h" | 21 #include "net/base/load_states.h" |
| 20 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
| 21 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" |
| 22 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
| 23 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
| 24 #include "webkit/glue/password_form_dom_manager.h" | 26 #include "webkit/glue/password_form_dom_manager.h" |
| 25 #include "webkit/glue/window_open_disposition.h" | 27 #include "webkit/glue/window_open_disposition.h" |
| 26 | 28 |
| 27 class FilePath; | 29 class FilePath; |
| 30 class IconRequestProvider; |
| 28 class ListValue; | 31 class ListValue; |
| 29 class RenderViewHostDelegate; | 32 class RenderViewHostDelegate; |
| 30 class SiteInstance; | 33 class SiteInstance; |
| 31 class SkBitmap; | 34 class SkBitmap; |
| 32 class ViewMsg_Navigate; | 35 class ViewMsg_Navigate; |
| 33 struct ContentSettings; | 36 struct ContentSettings; |
| 34 struct ContextMenuParams; | 37 struct ContextMenuParams; |
| 35 struct MediaPlayerAction; | 38 struct MediaPlayerAction; |
| 36 struct ThumbnailScore; | 39 struct ThumbnailScore; |
| 37 struct ViewHostMsg_DidPrintPage_Params; | 40 struct ViewHostMsg_DidPrintPage_Params; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // contain all saved auxiliary files included all sub frames and resouces. | 354 // contain all saved auxiliary files included all sub frames and resouces. |
| 352 void GetSerializedHtmlDataForCurrentPageWithLocalLinks( | 355 void GetSerializedHtmlDataForCurrentPageWithLocalLinks( |
| 353 const std::vector<GURL>& links, | 356 const std::vector<GURL>& links, |
| 354 const std::vector<FilePath>& local_paths, | 357 const std::vector<FilePath>& local_paths, |
| 355 const FilePath& local_directory_name); | 358 const FilePath& local_directory_name); |
| 356 | 359 |
| 357 // Notifies the Listener that one or more files have been chosen by the user | 360 // Notifies the Listener that one or more files have been chosen by the user |
| 358 // from an Open File dialog for the form. | 361 // from an Open File dialog for the form. |
| 359 void FilesSelectedInChooser(const std::vector<FilePath>& files); | 362 void FilesSelectedInChooser(const std::vector<FilePath>& files); |
| 360 | 363 |
| 364 // The type for icon loading. |
| 365 typedef CancelableRequestConsumerT<int, 0> CancelableConsumer; |
| 366 void OnIconLoaded(int request_id, SkBitmap* icon); |
| 367 |
| 361 // Notifies the RenderViewHost that its load state changed. | 368 // Notifies the RenderViewHost that its load state changed. |
| 362 void LoadStateChanged(const GURL& url, net::LoadState load_state, | 369 void LoadStateChanged(const GURL& url, net::LoadState load_state, |
| 363 uint64 upload_position, uint64 upload_size); | 370 uint64 upload_position, uint64 upload_size); |
| 364 | 371 |
| 365 bool SuddenTerminationAllowed() const; | 372 bool SuddenTerminationAllowed() const; |
| 366 void set_sudden_termination_allowed(bool enabled) { | 373 void set_sudden_termination_allowed(bool enabled) { |
| 367 sudden_termination_allowed_ = enabled; | 374 sudden_termination_allowed_ = enabled; |
| 368 } | 375 } |
| 369 | 376 |
| 370 // Forward a message from external host to chrome renderer. | 377 // Forward a message from external host to chrome renderer. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 void OnMsgForwardMessageToExternalHost(const std::string& message, | 543 void OnMsgForwardMessageToExternalHost(const std::string& message, |
| 537 const std::string& origin, | 544 const std::string& origin, |
| 538 const std::string& target); | 545 const std::string& target); |
| 539 void OnMsgDocumentLoadedInFrame(); | 546 void OnMsgDocumentLoadedInFrame(); |
| 540 void OnMsgGoToEntryAtOffset(int offset); | 547 void OnMsgGoToEntryAtOffset(int offset); |
| 541 void OnMsgSetTooltipText(const std::wstring& tooltip_text, | 548 void OnMsgSetTooltipText(const std::wstring& tooltip_text, |
| 542 WebKit::WebTextDirection text_direction_hint); | 549 WebKit::WebTextDirection text_direction_hint); |
| 543 void OnMsgSelectionChanged(const std::string& text); | 550 void OnMsgSelectionChanged(const std::string& text); |
| 544 void OnMsgPasteFromSelectionClipboard(); | 551 void OnMsgPasteFromSelectionClipboard(); |
| 545 void OnMsgRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); | 552 void OnMsgRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); |
| 553 void OnMsgChooseIconForFiles(int request_id, |
| 554 const std::vector<FilePath>& filenames); |
| 546 void OnMsgRunJavaScriptMessage(const std::wstring& message, | 555 void OnMsgRunJavaScriptMessage(const std::wstring& message, |
| 547 const std::wstring& default_prompt, | 556 const std::wstring& default_prompt, |
| 548 const GURL& frame_url, | 557 const GURL& frame_url, |
| 549 const int flags, | 558 const int flags, |
| 550 IPC::Message* reply_msg); | 559 IPC::Message* reply_msg); |
| 551 void OnMsgRunBeforeUnloadConfirm(const GURL& frame_url, | 560 void OnMsgRunBeforeUnloadConfirm(const GURL& frame_url, |
| 552 const std::wstring& message, | 561 const std::wstring& message, |
| 553 IPC::Message* reply_msg); | 562 IPC::Message* reply_msg); |
| 554 void OnMsgShowModalHTMLDialog(const GURL& url, int width, int height, | 563 void OnMsgShowModalHTMLDialog(const GURL& url, int width, int height, |
| 555 const std::string& json_arguments, | 564 const std::string& json_arguments, |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 bool unload_ack_is_for_cross_site_transition_; | 705 bool unload_ack_is_for_cross_site_transition_; |
| 697 | 706 |
| 698 bool are_javascript_messages_suppressed_; | 707 bool are_javascript_messages_suppressed_; |
| 699 | 708 |
| 700 // True if the render view can be shut down suddenly. | 709 // True if the render view can be shut down suddenly. |
| 701 bool sudden_termination_allowed_; | 710 bool sudden_termination_allowed_; |
| 702 | 711 |
| 703 // The session storage namespace id to be used by the associated render view. | 712 // The session storage namespace id to be used by the associated render view. |
| 704 int64 session_storage_namespace_id_; | 713 int64 session_storage_namespace_id_; |
| 705 | 714 |
| 715 // For icon loading by OnMsgChooseIconForFiles(). |
| 716 CancelableConsumer cancelable_consumer_; |
| 717 scoped_ptr<IconRequestProvider> icon_request_provider_; |
| 718 |
| 706 // Whether this render view will be used for extensions. This controls | 719 // Whether this render view will be used for extensions. This controls |
| 707 // what process type we use. | 720 // what process type we use. |
| 708 bool is_extension_process_; | 721 bool is_extension_process_; |
| 709 | 722 |
| 710 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 723 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 711 }; | 724 }; |
| 712 | 725 |
| 713 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 726 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |