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

Side by Side Diff: cc/input/input_handler.h

Issue 130443005: [#5] Pass gfx structs by const ref (gfx::Vector2dF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated the review comments Created 6 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
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/input/layer_scroll_offset_delegate.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_INPUT_INPUT_HANDLER_H_ 5 #ifndef CC_INPUT_INPUT_HANDLER_H_
6 #define CC_INPUT_INPUT_HANDLER_H_ 6 #define CC_INPUT_INPUT_HANDLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // scrolling layer's (logical pixel) space. If there is no room to move the 78 // scrolling layer's (logical pixel) space. If there is no room to move the
79 // layer in the requested direction, its first ancestor layer that can be 79 // layer in the requested direction, its first ancestor layer that can be
80 // scrolled will be moved instead. If no layer can be moved in the requested 80 // scrolled will be moved instead. If no layer can be moved in the requested
81 // direction at all, then false is returned. If any layer is moved, then 81 // direction at all, then false is returned. If any layer is moved, then
82 // true is returned. 82 // true is returned.
83 // If the scroll delta hits the root layer, and the layer can no longer move, 83 // If the scroll delta hits the root layer, and the layer can no longer move,
84 // the root overscroll accumulated within this ScrollBegin() scope is reported 84 // the root overscroll accumulated within this ScrollBegin() scope is reported
85 // to the client. 85 // to the client.
86 // Should only be called if ScrollBegin() returned ScrollStarted. 86 // Should only be called if ScrollBegin() returned ScrollStarted.
87 virtual bool ScrollBy(gfx::Point viewport_point, 87 virtual bool ScrollBy(gfx::Point viewport_point,
88 gfx::Vector2dF scroll_delta) = 0; 88 const gfx::Vector2dF& scroll_delta) = 0;
89 89
90 virtual bool ScrollVerticallyByPage( 90 virtual bool ScrollVerticallyByPage(
91 gfx::Point viewport_point, 91 gfx::Point viewport_point,
92 ScrollDirection direction) = 0; 92 ScrollDirection direction) = 0;
93 93
94 // Returns ScrollStarted if a layer was being actively being scrolled, 94 // Returns ScrollStarted if a layer was being actively being scrolled,
95 // ScrollIgnored if not. 95 // ScrollIgnored if not.
96 virtual ScrollStatus FlingScrollBegin() = 0; 96 virtual ScrollStatus FlingScrollBegin() = 0;
97 97
98 virtual void NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) = 0; 98 virtual void NotifyCurrentFlingVelocity(const gfx::Vector2dF& velocity) = 0;
99 99
100 virtual void MouseMoveAt(gfx::Point mouse_position) = 0; 100 virtual void MouseMoveAt(gfx::Point mouse_position) = 0;
101 101
102 // Stop scrolling the selected layer. Should only be called if ScrollBegin() 102 // Stop scrolling the selected layer. Should only be called if ScrollBegin()
103 // returned ScrollStarted. 103 // returned ScrollStarted.
104 virtual void ScrollEnd() = 0; 104 virtual void ScrollEnd() = 0;
105 105
106 virtual void SetRootLayerScrollOffsetDelegate( 106 virtual void SetRootLayerScrollOffsetDelegate(
107 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) = 0; 107 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) = 0;
108 108
(...skipping 30 matching lines...) Expand all
139 InputHandler() {} 139 InputHandler() {}
140 virtual ~InputHandler() {} 140 virtual ~InputHandler() {}
141 141
142 private: 142 private:
143 DISALLOW_COPY_AND_ASSIGN(InputHandler); 143 DISALLOW_COPY_AND_ASSIGN(InputHandler);
144 }; 144 };
145 145
146 } // namespace cc 146 } // namespace cc
147 147
148 #endif // CC_INPUT_INPUT_HANDLER_H_ 148 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/input/layer_scroll_offset_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698