OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "chrome/renderer/pepper_plugin_delegate_impl.h" | 33 #include "chrome/renderer/pepper_plugin_delegate_impl.h" |
34 #include "chrome/renderer/render_widget.h" | 34 #include "chrome/renderer/render_widget.h" |
35 #include "chrome/renderer/renderer_webcookiejar_impl.h" | 35 #include "chrome/renderer/renderer_webcookiejar_impl.h" |
36 #include "chrome/renderer/searchbox.h" | 36 #include "chrome/renderer/searchbox.h" |
37 #include "chrome/renderer/translate_helper.h" | 37 #include "chrome/renderer/translate_helper.h" |
38 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 38 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
39 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" | 39 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" |
40 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" | 40 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" |
41 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h" | 41 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h" |
42 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h" | 42 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h" |
| 43 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" |
43 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 44 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
44 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" | 45 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" |
45 #include "third_party/WebKit/WebKit/chromium/public/WebNavigationType.h" | 46 #include "third_party/WebKit/WebKit/chromium/public/WebNavigationType.h" |
46 #include "webkit/glue/webpreferences.h" | 47 #include "webkit/glue/webpreferences.h" |
47 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | 48 #include "webkit/plugins/npapi/webplugin_page_delegate.h" |
48 | 49 |
49 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
50 // RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root. | 51 // RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root. |
51 // VS warns when we inherit the WebWidgetClient method implementations from | 52 // VS warns when we inherit the WebWidgetClient method implementations from |
52 // RenderWidget. It's safe to ignore that warning. | 53 // RenderWidget. It's safe to ignore that warning. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 class WebDragData; | 132 class WebDragData; |
132 class WebFrame; | 133 class WebFrame; |
133 class WebGeolocationClient; | 134 class WebGeolocationClient; |
134 class WebGeolocationServiceInterface; | 135 class WebGeolocationServiceInterface; |
135 class WebImage; | 136 class WebImage; |
136 class WebInputElement; | 137 class WebInputElement; |
137 class WebKeyboardEvent; | 138 class WebKeyboardEvent; |
138 class WebMediaPlayer; | 139 class WebMediaPlayer; |
139 class WebMediaPlayerClient; | 140 class WebMediaPlayerClient; |
140 class WebMouseEvent; | 141 class WebMouseEvent; |
141 class WebNode; | |
142 class WebPlugin; | 142 class WebPlugin; |
143 class WebSpeechInputController; | 143 class WebSpeechInputController; |
144 class WebSpeechInputListener; | 144 class WebSpeechInputListener; |
145 class WebStorageNamespace; | 145 class WebStorageNamespace; |
146 class WebURLRequest; | 146 class WebURLRequest; |
147 class WebView; | 147 class WebView; |
148 struct WebContextMenuData; | 148 struct WebContextMenuData; |
149 struct WebFileChooserParams; | 149 struct WebFileChooserParams; |
150 struct WebFindOptions; | 150 struct WebFindOptions; |
151 struct WebPluginParams; | 151 struct WebPluginParams; |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 const std::vector<int>& unique_ids); | 852 const std::vector<int>& unique_ids); |
853 void OnCancelDownload(int32 download_id); | 853 void OnCancelDownload(int32 download_id); |
854 void OnClearFocusedNode(); | 854 void OnClearFocusedNode(); |
855 void OnClosePage(const ViewMsg_ClosePage_Params& params); | 855 void OnClosePage(const ViewMsg_ClosePage_Params& params); |
856 #if defined(ENABLE_FLAPPER_HACKS) | 856 #if defined(ENABLE_FLAPPER_HACKS) |
857 void OnConnectTcpACK(int request_id, | 857 void OnConnectTcpACK(int request_id, |
858 IPC::PlatformFileForTransit socket_for_transit, | 858 IPC::PlatformFileForTransit socket_for_transit, |
859 const PP_Flash_NetAddress& local_addr, | 859 const PP_Flash_NetAddress& local_addr, |
860 const PP_Flash_NetAddress& remote_addr); | 860 const PP_Flash_NetAddress& remote_addr); |
861 #endif | 861 #endif |
| 862 void OnContextMenuClosed(); |
862 void OnCopy(); | 863 void OnCopy(); |
863 void OnCopyImageAt(int x, int y); | 864 void OnCopyImageAt(int x, int y); |
864 #if defined(OS_MACOSX) | 865 #if defined(OS_MACOSX) |
865 void OnCopyToFindPboard(); | 866 void OnCopyToFindPboard(); |
866 #endif | 867 #endif |
867 void OnCut(); | 868 void OnCut(); |
868 void OnCaptureThumbnail(); | 869 void OnCaptureThumbnail(); |
869 void OnCaptureSnapshot(); | 870 void OnCaptureSnapshot(); |
870 void OnCSSInsertRequest(const std::wstring& frame_xpath, | 871 void OnCSSInsertRequest(const std::wstring& frame_xpath, |
871 const std::string& css, | 872 const std::string& css, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 void OnNotifyRendererViewType(ViewType::Type view_type); | 931 void OnNotifyRendererViewType(ViewType::Type view_type); |
931 void OnFillPasswordForm( | 932 void OnFillPasswordForm( |
932 const webkit_glue::PasswordFormFillData& form_data); | 933 const webkit_glue::PasswordFormFillData& form_data); |
933 void OnPaste(); | 934 void OnPaste(); |
934 #if defined(OS_MACOSX) | 935 #if defined(OS_MACOSX) |
935 void OnPluginImeCompositionConfirmed(const string16& text, int plugin_id); | 936 void OnPluginImeCompositionConfirmed(const string16& text, int plugin_id); |
936 #endif | 937 #endif |
937 void OnPrintingDone(int document_cookie, bool success); | 938 void OnPrintingDone(int document_cookie, bool success); |
938 void OnPrintPages(); | 939 void OnPrintPages(); |
939 void OnPrintPreview(); | 940 void OnPrintPreview(); |
| 941 void OnPrintNodeUnderContextMenu(); |
940 void OnRedo(); | 942 void OnRedo(); |
941 void OnReloadFrame(); | 943 void OnReloadFrame(); |
942 void OnReplace(const string16& text); | 944 void OnReplace(const string16& text); |
943 void OnReservePageIDRange(int size_of_range); | 945 void OnReservePageIDRange(int size_of_range); |
944 void OnResetPageEncodingToDefault(); | 946 void OnResetPageEncodingToDefault(); |
945 void OnRevertTranslation(int page_id); | 947 void OnRevertTranslation(int page_id); |
946 void OnScriptEvalRequest(const string16& frame_xpath, | 948 void OnScriptEvalRequest(const string16& frame_xpath, |
947 const string16& jscript, | 949 const string16& jscript, |
948 int id, | 950 int id, |
949 bool notify_result); | 951 bool notify_result); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 void LoadNavigationErrorPage(WebKit::WebFrame* frame, | 1114 void LoadNavigationErrorPage(WebKit::WebFrame* frame, |
1113 const WebKit::WebURLRequest& failed_request, | 1115 const WebKit::WebURLRequest& failed_request, |
1114 const WebKit::WebURLError& error, | 1116 const WebKit::WebURLError& error, |
1115 const std::string& html, | 1117 const std::string& html, |
1116 bool replace); | 1118 bool replace); |
1117 | 1119 |
1118 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, | 1120 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, |
1119 const WebKit::WebURLError& error, | 1121 const WebKit::WebURLError& error, |
1120 bool replace); | 1122 bool replace); |
1121 | 1123 |
| 1124 // Prints |frame|. |
1122 void Print(WebKit::WebFrame* frame, bool script_initiated, bool is_preview); | 1125 void Print(WebKit::WebFrame* frame, bool script_initiated, bool is_preview); |
1123 | 1126 |
| 1127 // Returns the PrintWebViewHelper for this class, creating if necessary. |
| 1128 PrintWebViewHelper* GetPrintWebViewHelper(); |
| 1129 |
1124 // Returns whether the page associated with |document| is a candidate for | 1130 // Returns whether the page associated with |document| is a candidate for |
1125 // translation. Some pages can explictly specify (via a meta-tag) that they | 1131 // translation. Some pages can explictly specify (via a meta-tag) that they |
1126 // should not be translated. | 1132 // should not be translated. |
1127 bool IsPageTranslatable(WebKit::WebDocument* document); | 1133 bool IsPageTranslatable(WebKit::WebDocument* document); |
1128 | 1134 |
1129 // Starts nav_state_sync_timer_ if it isn't already running. | 1135 // Starts nav_state_sync_timer_ if it isn't already running. |
1130 void StartNavStateSyncTimerIfNecessary(); | 1136 void StartNavStateSyncTimerIfNecessary(); |
1131 | 1137 |
1132 // Dispatches the current navigation state to the browser. Called on a | 1138 // Dispatches the current navigation state to the browser. Called on a |
1133 // periodic timer so we don't send too many messages. | 1139 // periodic timer so we don't send too many messages. |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 | 1500 |
1495 // External host exposed through automation controller. | 1501 // External host exposed through automation controller. |
1496 scoped_ptr<ExternalHostBindings> external_host_bindings_; | 1502 scoped_ptr<ExternalHostBindings> external_host_bindings_; |
1497 | 1503 |
1498 // The external popup for the currently showing select popup. | 1504 // The external popup for the currently showing select popup. |
1499 scoped_ptr<ExternalPopupMenu> external_popup_menu_; | 1505 scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
1500 | 1506 |
1501 // The custom menu event listener, if any. | 1507 // The custom menu event listener, if any. |
1502 CustomMenuListener* custom_menu_listener_; | 1508 CustomMenuListener* custom_menu_listener_; |
1503 | 1509 |
| 1510 // The node that the context menu was pressed over. |
| 1511 WebKit::WebNode context_menu_node_; |
| 1512 |
1504 // Reports load progress to the browser. | 1513 // Reports load progress to the browser. |
1505 scoped_ptr<LoadProgressTracker> load_progress_tracker_; | 1514 scoped_ptr<LoadProgressTracker> load_progress_tracker_; |
1506 | 1515 |
1507 // --------------------------------------------------------------------------- | 1516 // --------------------------------------------------------------------------- |
1508 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1517 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
1509 // sections rather than throwing it randomly at the end. If you're adding a | 1518 // sections rather than throwing it randomly at the end. If you're adding a |
1510 // bunch of stuff, you should probably create a helper class and put your | 1519 // bunch of stuff, you should probably create a helper class and put your |
1511 // data and methods on that to avoid bloating RenderView more. | 1520 // data and methods on that to avoid bloating RenderView more. |
1512 // --------------------------------------------------------------------------- | 1521 // --------------------------------------------------------------------------- |
1513 | 1522 |
1514 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1523 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1515 }; | 1524 }; |
1516 | 1525 |
1517 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1526 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |