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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 2902303002: phase based wheel scroll latching for mac (Closed)
Patch Set: in -> after 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurface.h> 9 #include <IOSurface/IOSurface.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 // Returns the TextSelection information for the active widget. If 481 // Returns the TextSelection information for the active widget. If
482 // |is_guest_view_hack_| is true, then it will return the TextSelection 482 // |is_guest_view_hack_| is true, then it will return the TextSelection
483 // information for this RenderWidgetHostViewMac (which is serving as a 483 // information for this RenderWidgetHostViewMac (which is serving as a
484 // platform view for a guest). 484 // platform view for a guest).
485 const TextInputManager::TextSelection* GetTextSelection(); 485 const TextInputManager::TextSelection* GetTextSelection();
486 486
487 // Get the focused view that should be used for retrieving the text selection. 487 // Get the focused view that should be used for retrieving the text selection.
488 RenderWidgetHostViewBase* GetFocusedViewForTextSelection(); 488 RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
489 489
490 bool WheelScrollLatchingEnabled() { return wheel_scroll_latching_enabled_; }
tdresser 2017/05/25 15:18:36 Is this needed? It appears redundant with https://
sahel 2017/05/25 16:00:04 Done.
491
492 base::OneShotTimer mouse_wheel_end_dispatch_timer_;
tdresser 2017/05/25 15:18:36 Make private.
sahel 2017/05/25 16:00:04 This is Stopped in RenderWidgetHostViewCocoa, shou
tdresser 2017/05/25 19:34:48 Yup. The fact that this is implemented via a timer
493
494 void SendSyntheticWheelEventWithPhaseEnded(
495 blink::WebMouseWheelEvent wheel_event,
496 bool should_route_event);
tdresser 2017/05/25 15:18:36 Can this be private?
sahel 2017/05/25 16:00:04 This is called in RenderWidgetHostViewCocoa, canno
tdresser 2017/05/25 19:34:48 It is? Isn't it only called in RenderWidgetHostVie
sahel 2017/05/26 18:03:25 Done.
497 void StartMouseWheelEndDispatchTimer(blink::WebMouseWheelEvent wheel_event,
498 bool should_route_event);
tdresser 2017/05/25 15:18:36 Can this be private?
sahel 2017/05/25 16:00:04 This is called in RenderWidgetHostViewCocoa, canno
tdresser 2017/05/25 19:34:47 Acknowledged.
499
490 // Returns the RenderWidgetHostDelegate corresponding to the currently focused 500 // Returns the RenderWidgetHostDelegate corresponding to the currently focused
491 // RenderWidgetHost. It is different from |render_widget_host_->delegate()| 501 // RenderWidgetHost. It is different from |render_widget_host_->delegate()|
492 // when there are focused inner WebContentses on the page. Also, this method 502 // when there are focused inner WebContentses on the page. Also, this method
493 // can return nullptr; for instance when |render_widget_host_| becomes nullptr 503 // can return nullptr; for instance when |render_widget_host_| becomes nullptr
494 // in the destruction path of the WebContentsImpl. 504 // in the destruction path of the WebContentsImpl.
495 RenderWidgetHostDelegate* GetFocusedRenderWidgetHostDelegate(); 505 RenderWidgetHostDelegate* GetFocusedRenderWidgetHostDelegate();
496 506
497 private: 507 private:
498 friend class RenderWidgetHostViewMacTest; 508 friend class RenderWidgetHostViewMacTest;
499 509
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 577
568 // Factory used to safely scope delayed calls to ShutdownHost(). 578 // Factory used to safely scope delayed calls to ShutdownHost().
569 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 579 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
570 580
571 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 581 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
572 }; 582 };
573 583
574 } // namespace content 584 } // namespace content
575 585
576 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 586 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698