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

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

Issue 2918053002: Move middle-click autoscroll to synthetic fling. (Closed)
Patch Set: Delete redundant cursor shape print Created 3 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
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_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 // TODO(darin): Eliminate this temporary. 1420 // TODO(darin): Eliminate this temporary.
1421 WebCursor cursor; 1421 WebCursor cursor;
1422 InitializeCursorFromWebCursorInfo(&cursor, cursor_info); 1422 InitializeCursorFromWebCursorInfo(&cursor, cursor_info);
1423 // Only send a SetCursor message if we need to make a change. 1423 // Only send a SetCursor message if we need to make a change.
1424 if (!current_cursor_.IsEqual(cursor)) { 1424 if (!current_cursor_.IsEqual(cursor)) {
1425 current_cursor_ = cursor; 1425 current_cursor_ = cursor;
1426 Send(new ViewHostMsg_SetCursor(routing_id_, cursor)); 1426 Send(new ViewHostMsg_SetCursor(routing_id_, cursor));
1427 } 1427 }
1428 } 1428 }
1429 1429
1430 void RenderWidget::AutoscrollStart(const blink::WebFloatPoint& point) {
1431 Send(new ViewHostMsg_AutoscrollStart(routing_id_, point));
1432 }
1433
1434 void RenderWidget::AutoscrollFling(const blink::WebFloatSize& velocity) {
1435 Send(new ViewHostMsg_AutoscrollFling(routing_id_, velocity));
1436 }
1437
1438 void RenderWidget::AutoscrollEnd() {
1439 Send(new ViewHostMsg_AutoscrollEnd(routing_id_));
1440 }
1441
1430 // We are supposed to get a single call to Show for a newly created RenderWidget 1442 // We are supposed to get a single call to Show for a newly created RenderWidget
1431 // that was created via RenderWidget::CreateWebView. So, we wait until this 1443 // that was created via RenderWidget::CreateWebView. So, we wait until this
1432 // point to dispatch the ShowWidget message. 1444 // point to dispatch the ShowWidget message.
1433 // 1445 //
1434 // This method provides us with the information about how to display the newly 1446 // This method provides us with the information about how to display the newly
1435 // created RenderWidget (i.e., as a blocked popup or as a new tab). 1447 // created RenderWidget (i.e., as a blocked popup or as a new tab).
1436 // 1448 //
1437 void RenderWidget::Show(WebNavigationPolicy policy) { 1449 void RenderWidget::Show(WebNavigationPolicy policy) {
1438 DCHECK(!did_show_) << "received extraneous Show call"; 1450 DCHECK(!did_show_) << "received extraneous Show call";
1439 DCHECK(routing_id_ != MSG_ROUTING_NONE); 1451 DCHECK(routing_id_ != MSG_ROUTING_NONE);
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 // browser side (https://crbug.com/669219). 2375 // browser side (https://crbug.com/669219).
2364 // If there is no WebFrameWidget, then there will be no 2376 // If there is no WebFrameWidget, then there will be no
2365 // InputMethodControllers for a WebLocalFrame. 2377 // InputMethodControllers for a WebLocalFrame.
2366 return nullptr; 2378 return nullptr;
2367 } 2379 }
2368 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2380 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2369 ->GetActiveWebInputMethodController(); 2381 ->GetActiveWebInputMethodController();
2370 } 2382 }
2371 2383
2372 } // namespace content 2384 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698