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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 332563003: Remove RenderViewImpl::OnNavigate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « content/renderer/render_view_impl.h ('k') | no next file » | 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) 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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 return true; 1061 return true;
1062 1062
1063 bool handled = true; 1063 bool handled = true;
1064 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) 1064 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
1065 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) 1065 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
1066 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) 1066 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
1067 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, 1067 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
1068 OnScrollFocusedEditableNodeIntoRect) 1068 OnScrollFocusedEditableNodeIntoRect)
1069 IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent, 1069 IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
1070 OnSetEditCommandsForNextKeyEvent) 1070 OnSetEditCommandsForNextKeyEvent)
1071 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate)
1072 IPC_MESSAGE_HANDLER(ViewMsg_Stop, OnStop) 1071 IPC_MESSAGE_HANDLER(ViewMsg_Stop, OnStop)
1073 IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt) 1072 IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
1074 IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt) 1073 IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt)
1075 IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind) 1074 IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
1076 IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding) 1075 IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding)
1077 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) 1076 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
1078 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, 1077 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL,
1079 OnSetZoomLevelForLoadingURL) 1078 OnSetZoomLevelForLoadingURL)
1080 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding) 1079 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
1081 IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault, 1080 IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1156
1158 void RenderViewImpl::OnSelectWordAroundCaret() { 1157 void RenderViewImpl::OnSelectWordAroundCaret() {
1159 if (!webview()) 1158 if (!webview())
1160 return; 1159 return;
1161 1160
1162 handling_input_event_ = true; 1161 handling_input_event_ = true;
1163 webview()->focusedFrame()->selectWordAroundCaret(); 1162 webview()->focusedFrame()->selectWordAroundCaret();
1164 handling_input_event_ = false; 1163 handling_input_event_ = false;
1165 } 1164 }
1166 1165
1167 void RenderViewImpl::OnNavigate(const FrameMsg_Navigate_Params& params) {
1168 FOR_EACH_OBSERVER(RenderViewObserver, observers_, Navigate(params.url));
1169 }
1170
1171 bool RenderViewImpl::IsBackForwardToStaleEntry( 1166 bool RenderViewImpl::IsBackForwardToStaleEntry(
1172 const FrameMsg_Navigate_Params& params, 1167 const FrameMsg_Navigate_Params& params,
1173 bool is_reload) { 1168 bool is_reload) {
1174 // Make sure this isn't a back/forward to an entry we have already cropped 1169 // Make sure this isn't a back/forward to an entry we have already cropped
1175 // or replaced from our history, before the browser knew about it. If so, 1170 // or replaced from our history, before the browser knew about it. If so,
1176 // a new navigation has committed in the mean time, and we can ignore this. 1171 // a new navigation has committed in the mean time, and we can ignore this.
1177 bool is_back_forward = !is_reload && params.page_state.IsValid(); 1172 bool is_back_forward = !is_reload && params.page_state.IsValid();
1178 1173
1179 // Note: if the history_list_length_ is 0 for a back/forward, we must be 1174 // Note: if the history_list_length_ is 0 for a back/forward, we must be
1180 // restoring from a previous session. We'll update our state in OnNavigate. 1175 // restoring from a previous session. We'll update our state in OnNavigate.
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 std::vector<gfx::Size> sizes; 4033 std::vector<gfx::Size> sizes;
4039 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4034 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4040 if (!url.isEmpty()) 4035 if (!url.isEmpty())
4041 urls.push_back( 4036 urls.push_back(
4042 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4037 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4043 } 4038 }
4044 SendUpdateFaviconURL(urls); 4039 SendUpdateFaviconURL(urls);
4045 } 4040 }
4046 4041
4047 } // namespace content 4042 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698