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

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

Issue 10823077: Throttle SelectRange IPC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
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 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 } 1265 }
1266 1266
1267 void RenderViewImpl::OnSelectRange(const gfx::Point& start, 1267 void RenderViewImpl::OnSelectRange(const gfx::Point& start,
1268 const gfx::Point& end) { 1268 const gfx::Point& end) {
1269 if (!webview()) 1269 if (!webview())
1270 return; 1270 return;
1271 1271
1272 handling_select_range_ = true; 1272 handling_select_range_ = true;
1273 webview()->focusedFrame()->selectRange(start, end); 1273 webview()->focusedFrame()->selectRange(start, end);
1274 handling_select_range_ = false; 1274 handling_select_range_ = false;
1275 Send(new ViewHostMsg_SelectRange_ACK(routing_id_));
darin (slow to review) 2012/08/02 06:30:20 nit: I suggest sending the ACK before calling sele
Iain Merrick 2012/08/02 10:25:42 Done.
1275 } 1276 }
1276 1277
1277 void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length, 1278 void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length,
1278 int32 minimum_page_id) { 1279 int32 minimum_page_id) {
1279 DCHECK(history_length >= 0); 1280 DCHECK(history_length >= 0);
1280 DCHECK(history_list_offset_ == history_list_length_ - 1); 1281 DCHECK(history_list_offset_ == history_list_length_ - 1);
1281 DCHECK(minimum_page_id >= -1); 1282 DCHECK(minimum_page_id >= -1);
1282 1283
1283 // Generate the new list. 1284 // Generate the new list.
1284 std::vector<int32> new_history_page_ids(history_length, -1); 1285 std::vector<int32> new_history_page_ids(history_length, -1);
(...skipping 4435 matching lines...) Expand 10 before | Expand all | Expand 10 after
5720 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5721 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5721 return !!RenderThreadImpl::current()->compositor_thread(); 5722 return !!RenderThreadImpl::current()->compositor_thread();
5722 } 5723 }
5723 5724
5724 void RenderViewImpl::OnJavaBridgeInit() { 5725 void RenderViewImpl::OnJavaBridgeInit() {
5725 DCHECK(!java_bridge_dispatcher_); 5726 DCHECK(!java_bridge_dispatcher_);
5726 #if defined(ENABLE_JAVA_BRIDGE) 5727 #if defined(ENABLE_JAVA_BRIDGE)
5727 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5728 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5728 #endif 5729 #endif
5729 } 5730 }
OLDNEW
« content/browser/renderer_host/render_widget_host_impl.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698