Chromium Code Reviews| 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_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1020 void OnSetWindowVisibility(bool visible); | 1020 void OnSetWindowVisibility(bool visible); |
| 1021 #endif | 1021 #endif |
| 1022 void OnSetZoomLevel(double zoom_level); | 1022 void OnSetZoomLevel(double zoom_level); |
| 1023 CONTENT_EXPORT void OnSetZoomLevelForLoadingURL(const GURL& url, | 1023 CONTENT_EXPORT void OnSetZoomLevelForLoadingURL(const GURL& url, |
| 1024 double zoom_level); | 1024 double zoom_level); |
| 1025 void OnExitFullscreen(); | 1025 void OnExitFullscreen(); |
| 1026 void OnShouldClose(); | 1026 void OnShouldClose(); |
| 1027 void OnStop(); | 1027 void OnStop(); |
| 1028 void OnStopFinding(content::StopFindAction action); | 1028 void OnStopFinding(content::StopFindAction action); |
| 1029 CONTENT_EXPORT void OnSwapOut(const ViewMsg_SwapOut_Params& params); | 1029 CONTENT_EXPORT void OnSwapOut(const ViewMsg_SwapOut_Params& params); |
| 1030 #if defined(OS_ANDROID) | |
| 1031 void OnSynchronousFind(int request_id, | |
| 1032 const string16& search_string, | |
| 1033 const WebKit::WebFindOptions& options, | |
| 1034 IPC::Message* reply_msg); | |
| 1035 #endif | |
| 1030 void OnThemeChanged(); | 1036 void OnThemeChanged(); |
| 1031 void OnUndo(); | 1037 void OnUndo(); |
| 1032 void OnUpdateTargetURLAck(); | 1038 void OnUpdateTargetURLAck(); |
| 1033 CONTENT_EXPORT void OnUpdateWebPreferences( | 1039 CONTENT_EXPORT void OnUpdateWebPreferences( |
| 1034 const webkit_glue::WebPreferences& prefs); | 1040 const webkit_glue::WebPreferences& prefs); |
| 1035 CONTENT_EXPORT void OnUnselect(); | 1041 CONTENT_EXPORT void OnUnselect(); |
| 1036 | 1042 |
| 1037 #if defined(OS_MACOSX) | 1043 #if defined(OS_MACOSX) |
| 1038 void OnWindowFrameChanged(const gfx::Rect& window_frame, | 1044 void OnWindowFrameChanged(const gfx::Rect& window_frame, |
| 1039 const gfx::Rect& view_frame); | 1045 const gfx::Rect& view_frame); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1104 const SkBitmap& image); | 1110 const SkBitmap& image); |
| 1105 | 1111 |
| 1106 // Requests to download a favicon image. When done, the RenderView is notified | 1112 // Requests to download a favicon image. When done, the RenderView is notified |
| 1107 // by way of DidDownloadFavicon. Returns true if the request was successfully | 1113 // by way of DidDownloadFavicon. Returns true if the request was successfully |
| 1108 // started, false otherwise. id is used to uniquely identify the request and | 1114 // started, false otherwise. id is used to uniquely identify the request and |
| 1109 // passed back to the DidDownloadFavicon method. If the image has multiple | 1115 // passed back to the DidDownloadFavicon method. If the image has multiple |
| 1110 // frames, the frame whose size is image_size is returned. If the image | 1116 // frames, the frame whose size is image_size is returned. If the image |
| 1111 // doesn't have a frame at the specified size, the first is returned. | 1117 // doesn't have a frame at the specified size, the first is returned. |
| 1112 bool DownloadFavicon(int id, const GURL& image_url, int image_size); | 1118 bool DownloadFavicon(int id, const GURL& image_url, int image_size); |
| 1113 | 1119 |
| 1120 // Starts a new find-in-page search or looks for the next match. | |
| 1121 void Find(int request_id, const string16&, const WebKit::WebFindOptions&); | |
|
jam
2012/09/19 16:55:43
nit: google style is to always list the parameter
Leandro Graciá Gil
2012/09/19 18:08:59
Done.
| |
| 1122 | |
| 1114 GURL GetAlternateErrorPageURL(const GURL& failed_url, | 1123 GURL GetAlternateErrorPageURL(const GURL& failed_url, |
| 1115 ErrorPageType error_type); | 1124 ErrorPageType error_type); |
| 1116 | 1125 |
| 1117 // Locates a sub frame with given xpath | 1126 // Locates a sub frame with given xpath |
| 1118 WebKit::WebFrame* GetChildFrame(const string16& frame_xpath) const; | 1127 WebKit::WebFrame* GetChildFrame(const string16& frame_xpath) const; |
| 1119 | 1128 |
| 1120 // Returns the opener url if present, else an empty url. | 1129 // Returns the opener url if present, else an empty url. |
| 1121 GURL GetOpenerUrl() const; | 1130 GURL GetOpenerUrl() const; |
| 1122 | 1131 |
| 1123 // Returns the URL being loaded by the given frame's request. | 1132 // Returns the URL being loaded by the given frame's request. |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 1150 void PopulateDocumentStateFromPending(content::DocumentState* document_state); | 1159 void PopulateDocumentStateFromPending(content::DocumentState* document_state); |
| 1151 | 1160 |
| 1152 // Returns a new NavigationState populated with the navigation information | 1161 // Returns a new NavigationState populated with the navigation information |
| 1153 // saved in OnNavigate(). | 1162 // saved in OnNavigate(). |
| 1154 content::NavigationState* CreateNavigationStateFromPending(); | 1163 content::NavigationState* CreateNavigationStateFromPending(); |
| 1155 | 1164 |
| 1156 // Processes the command-line flags --enable-viewport and | 1165 // Processes the command-line flags --enable-viewport and |
| 1157 // --enable-fixed-layout[=w,h]. | 1166 // --enable-fixed-layout[=w,h]. |
| 1158 void ProcessViewLayoutFlags(const CommandLine& command_line); | 1167 void ProcessViewLayoutFlags(const CommandLine& command_line); |
| 1159 | 1168 |
| 1169 // Sends a reply to the current find operation handling if it was a | |
| 1170 // synchronous find request. | |
| 1171 void SendFindReply(int request_id, | |
| 1172 int match_count, | |
| 1173 int ordinal, | |
| 1174 const WebKit::WebRect& selection_rect, | |
| 1175 bool final_status_update); | |
| 1176 | |
| 1160 // Starts nav_state_sync_timer_ if it isn't already running. | 1177 // Starts nav_state_sync_timer_ if it isn't already running. |
| 1161 void StartNavStateSyncTimerIfNecessary(); | 1178 void StartNavStateSyncTimerIfNecessary(); |
| 1162 | 1179 |
| 1180 // Stops the current find-in-page search. | |
| 1181 void StopFinding(content::StopFindAction action); | |
| 1182 | |
| 1163 // Dispatches the current navigation state to the browser. Called on a | 1183 // Dispatches the current navigation state to the browser. Called on a |
| 1164 // periodic timer so we don't send too many messages. | 1184 // periodic timer so we don't send too many messages. |
| 1165 void SyncNavigationState(); | 1185 void SyncNavigationState(); |
| 1166 | 1186 |
| 1167 // Dispatches the current state of selection on the webpage to the browser if | 1187 // Dispatches the current state of selection on the webpage to the browser if |
| 1168 // it has changed. | 1188 // it has changed. |
| 1169 // TODO(varunjain): delete this method once we figure out how to keep | 1189 // TODO(varunjain): delete this method once we figure out how to keep |
| 1170 // selection handles in sync with the webpage. | 1190 // selection handles in sync with the webpage. |
| 1171 void SyncSelectionIfRequired(); | 1191 void SyncSelectionIfRequired(); |
| 1172 | 1192 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1400 // Android Specific --------------------------------------------------------- | 1420 // Android Specific --------------------------------------------------------- |
| 1401 | 1421 |
| 1402 // Expected id of the next content intent launched. Used to prevent scheduled | 1422 // Expected id of the next content intent launched. Used to prevent scheduled |
| 1403 // intents to be launched if aborted. | 1423 // intents to be launched if aborted. |
| 1404 size_t expected_content_intent_id_; | 1424 size_t expected_content_intent_id_; |
| 1405 | 1425 |
| 1406 // List of click-based content detectors. | 1426 // List of click-based content detectors. |
| 1407 typedef std::vector< linked_ptr<content::ContentDetector> > | 1427 typedef std::vector< linked_ptr<content::ContentDetector> > |
| 1408 ContentDetectorList; | 1428 ContentDetectorList; |
| 1409 ContentDetectorList content_detectors_; | 1429 ContentDetectorList content_detectors_; |
| 1430 | |
| 1431 // Holds the message used to return find results to the browser during | |
| 1432 // synchronous find-in-page requests. Only non-null during these requests. | |
| 1433 scoped_ptr<IPC::Message> synchronous_find_pending_message_; | |
|
jam
2012/09/19 16:55:43
nit: synchronous_find_pending_message_-> synchrono
Leandro Graciá Gil
2012/09/19 18:08:59
Done. Also grouped together the MACOSX messages as
| |
| 1434 | |
| 1435 // The active find-in-page match ordinal during synchronous requests. | |
| 1436 // Needed to be remembered across WebKit callbacks. | |
| 1437 int synchronous_find_active_match_ordinal_; | |
| 1410 #endif | 1438 #endif |
| 1411 | 1439 |
| 1412 // Misc ---------------------------------------------------------------------- | 1440 // Misc ---------------------------------------------------------------------- |
| 1413 | 1441 |
| 1414 // The current and pending file chooser completion objects. If the queue is | 1442 // The current and pending file chooser completion objects. If the queue is |
| 1415 // nonempty, the first item represents the currently running file chooser | 1443 // nonempty, the first item represents the currently running file chooser |
| 1416 // callback, and the remaining elements are the other file chooser completion | 1444 // callback, and the remaining elements are the other file chooser completion |
| 1417 // still waiting to be run (in order). | 1445 // still waiting to be run (in order). |
| 1418 struct PendingFileChooser; | 1446 struct PendingFileChooser; |
| 1419 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; | 1447 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1542 // bunch of stuff, you should probably create a helper class and put your | 1570 // bunch of stuff, you should probably create a helper class and put your |
| 1543 // data and methods on that to avoid bloating RenderView more. You can | 1571 // data and methods on that to avoid bloating RenderView more. You can |
| 1544 // use the Observer interface to filter IPC messages and receive frame change | 1572 // use the Observer interface to filter IPC messages and receive frame change |
| 1545 // notifications. | 1573 // notifications. |
| 1546 // --------------------------------------------------------------------------- | 1574 // --------------------------------------------------------------------------- |
| 1547 | 1575 |
| 1548 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1576 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1549 }; | 1577 }; |
| 1550 | 1578 |
| 1551 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1579 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |