summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_view_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/renderer_host/render_view_host.cc')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 2b66289..c0cb864 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -1425,19 +1425,18 @@ void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) {
UserMetrics::RecordComputedAction(action.c_str(), process()->profile());
}
+bool RenderViewHost::ShouldSendToRenderer(const NativeWebKeyboardEvent& event) {
+ RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
+ if (!view)
+ return true;
+ return !view->IsReservedAccelerator(event);
+}
+
void RenderViewHost::UnhandledKeyboardEvent(
const NativeWebKeyboardEvent& event) {
RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
- if (view) {
- // TODO(brettw) why do we have to filter these types of events here. Can't
- // the renderer just send us the ones we care abount, or maybe the view
- // should be able to decide which ones it wants or not?
- if ((event.type == WebInputEvent::RawKeyDown) ||
- (event.type == WebInputEvent::KeyDown) ||
- (event.type == WebInputEvent::Char)) {
- view->HandleKeyboardEvent(event);
- }
- }
+ if (view)
+ view->HandleKeyboardEvent(event);
}
void RenderViewHost::OnUserGesture() {