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

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: Created 6 years, 2 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/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 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 3204
3205 // TODO(avi): Remove. http://crbug.com/170921 3205 // TODO(avi): Remove. http://crbug.com/170921
3206 int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP; 3206 int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP;
3207 NotificationDetails det = NotificationService::NoDetails(); 3207 NotificationDetails det = NotificationService::NoDetails();
3208 if (details) 3208 if (details)
3209 det = Details<LoadNotificationDetails>(details); 3209 det = Details<LoadNotificationDetails>(details);
3210 NotificationService::current()->Notify( 3210 NotificationService::current()->Notify(
3211 type, Source<NavigationController>(&controller_), det); 3211 type, Source<NavigationController>(&controller_), det);
3212 } 3212 }
3213 3213
3214 void WebContentsImpl::MoveSelectionExtent(const gfx::Point& position) {
3215 RenderFrameHost* focused_frame = GetFocusedFrame();
3216 if (!focused_frame)
3217 return;
3218
3219 focused_frame->Send(new InputMsg_MoveSelectionExtent(
3220 focused_frame->GetRoutingID(), position));
3221 }
3222
3214 void WebContentsImpl::SelectRange(const gfx::Point& start, 3223 void WebContentsImpl::SelectRange(const gfx::Point& start,
3215 const gfx::Point& end) { 3224 const gfx::Point& end) {
3216 RenderFrameHost* focused_frame = GetFocusedFrame(); 3225 RenderFrameHost* focused_frame = GetFocusedFrame();
3217 if (!focused_frame) 3226 if (!focused_frame)
3218 return; 3227 return;
3219 3228
3220 focused_frame->Send( 3229 focused_frame->Send(
3221 new InputMsg_SelectRange(focused_frame->GetRoutingID(), start, end)); 3230 new InputMsg_SelectRange(focused_frame->GetRoutingID(), start, end));
3222 } 3231 }
3223 3232
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
4371 node->render_manager()->ResumeResponseDeferredAtStart(); 4380 node->render_manager()->ResumeResponseDeferredAtStart();
4372 } 4381 }
4373 4382
4374 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4383 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4375 force_disable_overscroll_content_ = force_disable; 4384 force_disable_overscroll_content_ = force_disable;
4376 if (view_) 4385 if (view_)
4377 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4386 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4378 } 4387 }
4379 4388
4380 } // namespace content 4389 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698