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

Side by Side Diff: content/renderer/input/input_handler_manager.h

Issue 1566303004: Smooth scroll on Windows should respect OS level animation disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_
7 7
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 InputHandlerManager( 46 InputHandlerManager(
47 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 47 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
48 InputHandlerManagerClient* client, 48 InputHandlerManagerClient* client,
49 scheduler::RendererScheduler* renderer_scheduler); 49 scheduler::RendererScheduler* renderer_scheduler);
50 ~InputHandlerManager(); 50 ~InputHandlerManager();
51 51
52 // Callable from the main thread only. 52 // Callable from the main thread only.
53 void AddInputHandler( 53 void AddInputHandler(
54 int routing_id, 54 int routing_id,
55 const base::WeakPtr<cc::InputHandler>& input_handler, 55 const base::WeakPtr<cc::InputHandler>& input_handler,
56 const base::WeakPtr<RenderViewImpl>& render_view_impl); 56 const base::WeakPtr<RenderViewImpl>& render_view_impl,
57 bool enable_smooth_scrolling);
57 58
58 void ObserveWheelEventAndResultOnMainThread( 59 void ObserveWheelEventAndResultOnMainThread(
59 int routing_id, 60 int routing_id,
60 const blink::WebMouseWheelEvent& wheel_event, 61 const blink::WebMouseWheelEvent& wheel_event,
61 const cc::InputHandlerScrollResult& scroll_result); 62 const cc::InputHandlerScrollResult& scroll_result);
62 63
63 // Callback only from the compositor's thread. 64 // Callback only from the compositor's thread.
64 void RemoveInputHandler(int routing_id); 65 void RemoveInputHandler(int routing_id);
65 66
66 // Called from the compositor's thread. 67 // Called from the compositor's thread.
67 InputEventAckState HandleInputEvent(int routing_id, 68 InputEventAckState HandleInputEvent(int routing_id,
68 const blink::WebInputEvent* input_event, 69 const blink::WebInputEvent* input_event,
69 ui::LatencyInfo* latency_info); 70 ui::LatencyInfo* latency_info);
70 71
71 // Called from the compositor's thread. 72 // Called from the compositor's thread.
72 void DidOverscroll(int routing_id, const DidOverscrollParams& params); 73 void DidOverscroll(int routing_id, const DidOverscrollParams& params);
73 74
74 // Called from the compositor's thread. 75 // Called from the compositor's thread.
75 void DidStopFlinging(int routing_id); 76 void DidStopFlinging(int routing_id);
76 77
77 // Called from the compositor's thread. 78 // Called from the compositor's thread.
78 void DidAnimateForInput(); 79 void DidAnimateForInput();
79 80
80 private: 81 private:
81 // Called from the compositor's thread. 82 // Called from the compositor's thread.
82 void AddInputHandlerOnCompositorThread( 83 void AddInputHandlerOnCompositorThread(
83 int routing_id, 84 int routing_id,
84 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, 85 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
85 const base::WeakPtr<cc::InputHandler>& input_handler, 86 const base::WeakPtr<cc::InputHandler>& input_handler,
86 const base::WeakPtr<RenderViewImpl>& render_view_impl); 87 const base::WeakPtr<RenderViewImpl>& render_view_impl,
88 bool enable_smooth_scrolling);
87 89
88 void ObserveWheelEventAndResultOnCompositorThread( 90 void ObserveWheelEventAndResultOnCompositorThread(
89 int routing_id, 91 int routing_id,
90 const blink::WebMouseWheelEvent& wheel_event, 92 const blink::WebMouseWheelEvent& wheel_event,
91 const cc::InputHandlerScrollResult& scroll_result); 93 const cc::InputHandlerScrollResult& scroll_result);
92 94
93 typedef base::ScopedPtrHashMap<int, // routing_id 95 typedef base::ScopedPtrHashMap<int, // routing_id
94 scoped_ptr<InputHandlerWrapper>> 96 scoped_ptr<InputHandlerWrapper>>
95 InputHandlerMap; 97 InputHandlerMap;
96 InputHandlerMap input_handlers_; 98 InputHandlerMap input_handlers_;
97 99
98 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 100 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
99 InputHandlerManagerClient* client_; 101 InputHandlerManagerClient* client_;
100 scheduler::RendererScheduler* renderer_scheduler_; // Not owned. 102 scheduler::RendererScheduler* renderer_scheduler_; // Not owned.
101 }; 103 };
102 104
103 } // namespace content 105 } // namespace content
104 106
105 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ 107 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/renderer/input/input_handler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698