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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 657803002: Update touch selection to only modify one selection point at a time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/input_messages.h » ('j') | 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after
3167 3167
3168 // TODO(avi): Remove. http://crbug.com/170921 3168 // TODO(avi): Remove. http://crbug.com/170921
3169 int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP; 3169 int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP;
3170 NotificationDetails det = NotificationService::NoDetails(); 3170 NotificationDetails det = NotificationService::NoDetails();
3171 if (details) 3171 if (details)
3172 det = Details<LoadNotificationDetails>(details); 3172 det = Details<LoadNotificationDetails>(details);
3173 NotificationService::current()->Notify( 3173 NotificationService::current()->Notify(
3174 type, Source<NavigationController>(&controller_), det); 3174 type, Source<NavigationController>(&controller_), det);
3175 } 3175 }
3176 3176
3177 void WebContentsImpl::SelectRange(const gfx::Point& start, 3177 void WebContentsImpl::MoveRangeSelectionExtent(const gfx::Point& extent) {
3178 const gfx::Point& end) { 3178 RenderFrameHost* focused_frame = GetFocusedFrame();
3179 if (!focused_frame)
3180 return;
3181
3182 focused_frame->Send(new InputMsg_MoveRangeSelectionExtent(
3183 focused_frame->GetRoutingID(), extent));
3184 }
3185
3186 void WebContentsImpl::SelectRange(const gfx::Point& base,
3187 const gfx::Point& extent) {
3179 RenderFrameHost* focused_frame = GetFocusedFrame(); 3188 RenderFrameHost* focused_frame = GetFocusedFrame();
3180 if (!focused_frame) 3189 if (!focused_frame)
3181 return; 3190 return;
3182 3191
3183 focused_frame->Send( 3192 focused_frame->Send(
3184 new InputMsg_SelectRange(focused_frame->GetRoutingID(), start, end)); 3193 new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent));
3185 } 3194 }
3186 3195
3187 void WebContentsImpl::UpdateMaxPageIDIfNecessary(RenderViewHost* rvh) { 3196 void WebContentsImpl::UpdateMaxPageIDIfNecessary(RenderViewHost* rvh) {
3188 // If we are creating a RVH for a restored controller, then we need to make 3197 // If we are creating a RVH for a restored controller, then we need to make
3189 // sure the RenderView starts with a next_page_id_ larger than the number 3198 // sure the RenderView starts with a next_page_id_ larger than the number
3190 // of restored entries. This must be called before the RenderView starts 3199 // of restored entries. This must be called before the RenderView starts
3191 // navigating (to avoid a race between the browser updating max_page_id and 3200 // navigating (to avoid a race between the browser updating max_page_id and
3192 // the renderer updating next_page_id_). Because of this, we only call this 3201 // the renderer updating next_page_id_). Because of this, we only call this
3193 // from CreateRenderView and allow that to notify the RenderView for us. 3202 // from CreateRenderView and allow that to notify the RenderView for us.
3194 int max_restored_page_id = controller_.GetMaxRestoredPageID(); 3203 int max_restored_page_id = controller_.GetMaxRestoredPageID();
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4335 node->render_manager()->ResumeResponseDeferredAtStart(); 4344 node->render_manager()->ResumeResponseDeferredAtStart();
4336 } 4345 }
4337 4346
4338 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4347 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4339 force_disable_overscroll_content_ = force_disable; 4348 force_disable_overscroll_content_ = force_disable;
4340 if (view_) 4349 if (view_)
4341 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4350 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4342 } 4351 }
4343 4352
4344 } // namespace content 4353 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/input_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698