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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 27244: Don't send WebInputEvents from the renderer to the browser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
7 7
8 #include <queue>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/gfx/size.h" 11 #include "base/gfx/size.h"
11 #include "base/timer.h" 12 #include "base/timer.h"
12 #include "chrome/common/ipc_channel.h" 13 #include "chrome/common/ipc_channel.h"
13 #include "testing/gtest/include/gtest/gtest_prod.h" 14 #include "testing/gtest/include/gtest/gtest_prod.h"
15 #include "webkit/glue/webinputevent.h"
14 16
15 namespace gfx { 17 namespace gfx {
16 class Rect; 18 class Rect;
17 } 19 }
18 20
19 class BackingStore; 21 class BackingStore;
20 class PaintObserver; 22 class PaintObserver;
21 class RenderProcessHost; 23 class RenderProcessHost;
22 class RenderWidgetHostView; 24 class RenderWidgetHostView;
23 class TransportDIB; 25 class TransportDIB;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 virtual gfx::Rect GetRootWindowResizerRect() const; 216 virtual gfx::Rect GetRootWindowResizerRect() const;
215 217
216 protected: 218 protected:
217 // Called when we receive a notification indicating that the renderer 219 // Called when we receive a notification indicating that the renderer
218 // process has gone. This will reset our state so that our state will be 220 // process has gone. This will reset our state so that our state will be
219 // consistent if a new renderer is created. 221 // consistent if a new renderer is created.
220 void RendererExited(); 222 void RendererExited();
221 223
222 // Called when we an InputEvent was not processed by the renderer. This is 224 // Called when we an InputEvent was not processed by the renderer. This is
223 // overridden by RenderView to send upwards to its delegate. 225 // overridden by RenderView to send upwards to its delegate.
224 virtual void UnhandledInputEvent(const WebInputEvent& event) {} 226 virtual void UnhandledKeyboardEvent(const WebKeyboardEvent& event) {}
225 227
226 // Notification that the user pressed the enter key or the spacebar. The 228 // Notification that the user pressed the enter key or the spacebar. The
227 // render view host overrides this to forward the information to its delegate 229 // render view host overrides this to forward the information to its delegate
228 // (see corresponding function in RenderViewHostDelegate). 230 // (see corresponding function in RenderViewHostDelegate).
229 virtual void OnEnterOrSpace() {} 231 virtual void OnEnterOrSpace() {}
230 232
231 // Callbacks for notification when the renderer becomes unresponsive to user 233 // Callbacks for notification when the renderer becomes unresponsive to user
232 // input events, and subsequently responsive again. RenderViewHost overrides 234 // input events, and subsequently responsive again. RenderViewHost overrides
233 // these to tell its delegate to show the user a warning. 235 // these to tell its delegate to show the user a warning.
234 virtual void NotifyRendererUnresponsive() {} 236 virtual void NotifyRendererUnresponsive() {}
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // Optional observer that listens for notifications of painting. 345 // Optional observer that listens for notifications of painting.
344 scoped_ptr<PaintObserver> paint_observer_; 346 scoped_ptr<PaintObserver> paint_observer_;
345 347
346 // Set when we call DidPaintRect/DidScrollRect on the view. 348 // Set when we call DidPaintRect/DidScrollRect on the view.
347 bool view_being_painted_; 349 bool view_being_painted_;
348 350
349 // Used for UMA histogram logging to measure the time for a repaint view 351 // Used for UMA histogram logging to measure the time for a repaint view
350 // operation to finish. 352 // operation to finish.
351 base::TimeTicks repaint_start_time_; 353 base::TimeTicks repaint_start_time_;
352 354
355 // A queue of keyboard events. We can't trust data from the renderer so we
356 // stuff key events into a queue and pop them out on ACK, feeding our copy
357 // back to whatever unhandled handler instead of the returned version.
358 std::queue<WebKeyboardEvent> key_queue_;
darin (slow to review) 2009/02/26 23:58:38 i would have expected this queue to contain the na
Elliot Glaysher 2009/02/27 00:06:45 The goal was to stop passing a WebKeyboardEvent ba
359
353 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 360 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
354 }; 361 };
355 362
356 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 363 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698