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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.h

Issue 2430183002: Move arrow scrolling into KeyboardEventManager. (Closed)
Patch Set: Add keyEvent() null check to fix test Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // Returns the page object associated with this widget. This may be null when 156 // Returns the page object associated with this widget. This may be null when
157 // the page is shutting down, but will be valid at all other times. 157 // the page is shutting down, but will be valid at all other times.
158 Page* page() const { return view()->page(); } 158 Page* page() const { return view()->page(); }
159 159
160 // Event related methods: 160 // Event related methods:
161 void mouseContextMenu(const WebMouseEvent&); 161 void mouseContextMenu(const WebMouseEvent&);
162 162
163 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } 163 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
164 164
165 // Returns true if the event leads to scrolling.
166 static bool mapKeyCodeForScroll(int keyCode,
167 ScrollDirection*,
168 ScrollGranularity*);
169
170 Color baseBackgroundColor() const { return m_baseBackgroundColor; } 165 Color baseBackgroundColor() const { return m_baseBackgroundColor; }
171 166
172 DECLARE_TRACE(); 167 DECLARE_TRACE();
173 168
174 private: 169 private:
175 friend class WebFrameWidget; // For WebFrameWidget::create. 170 friend class WebFrameWidget; // For WebFrameWidget::create.
176 171
177 explicit WebFrameWidgetImpl(WebWidgetClient*, WebLocalFrame*); 172 explicit WebFrameWidgetImpl(WebWidgetClient*, WebLocalFrame*);
178 173
179 // Perform a hit test for a point relative to the root frame of the page. 174 // Perform a hit test for a point relative to the root frame of the page.
180 HitTestResult hitTestResultForRootFramePos(const IntPoint& posInRootFrame); 175 HitTestResult hitTestResultForRootFramePos(const IntPoint& posInRootFrame);
181 176
182 // Returns true if the event was actually processed.
183 WebInputEventResult keyEventDefault(const WebKeyboardEvent&);
184
185 // Returns true if the view was scrolled.
186 WebInputEventResult scrollViewWithKeyboard(int keyCode, int modifiers);
187
188 void initializeLayerTreeView(); 177 void initializeLayerTreeView();
189 178
190 void setIsAcceleratedCompositingActive(bool); 179 void setIsAcceleratedCompositingActive(bool);
191 void updateLayerTreeViewport(); 180 void updateLayerTreeViewport();
192 void updateLayerTreeBackgroundColor(); 181 void updateLayerTreeBackgroundColor();
193 void updateLayerTreeDeviceScaleFactor(); 182 void updateLayerTreeDeviceScaleFactor();
194 183
195 // PageWidgetEventHandler functions 184 // PageWidgetEventHandler functions
196 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; 185 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override;
197 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; 186 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 246
258 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, 247 DEFINE_TYPE_CASTS(WebFrameWidgetImpl,
259 WebFrameWidgetBase, 248 WebFrameWidgetBase,
260 widget, 249 widget,
261 widget->forSubframe(), 250 widget->forSubframe(),
262 widget.forSubframe()); 251 widget.forSubframe());
263 252
264 } // namespace blink 253 } // namespace blink
265 254
266 #endif 255 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/KeyboardEventManager.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698