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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 246078: Revert my attempt at cleaning up RenderViewHost::UnhandledKeyboardEvent in my... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 bool RenderViewHost::ShouldSendToRenderer(const NativeWebKeyboardEvent& event) { 1428 bool RenderViewHost::ShouldSendToRenderer(const NativeWebKeyboardEvent& event) {
1429 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1429 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1430 if (!view) 1430 if (!view)
1431 return true; 1431 return true;
1432 return !view->IsReservedAccelerator(event); 1432 return !view->IsReservedAccelerator(event);
1433 } 1433 }
1434 1434
1435 void RenderViewHost::UnhandledKeyboardEvent( 1435 void RenderViewHost::UnhandledKeyboardEvent(
1436 const NativeWebKeyboardEvent& event) { 1436 const NativeWebKeyboardEvent& event) {
1437 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1437 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1438 if (view) 1438 if (view) {
1439 view->HandleKeyboardEvent(event); 1439 // TODO(brettw) why do we have to filter these types of events here. Can't
1440 // the renderer just send us the ones we care abount, or maybe the view
1441 // should be able to decide which ones it wants or not?
1442 if ((event.type == WebInputEvent::RawKeyDown) ||
1443 (event.type == WebInputEvent::KeyDown) ||
1444 (event.type == WebInputEvent::Char)) {
1445 view->HandleKeyboardEvent(event);
1446 }
1447 }
1440 } 1448 }
1441 1449
1442 void RenderViewHost::OnUserGesture() { 1450 void RenderViewHost::OnUserGesture() {
1443 RenderViewHostDelegate::BrowserIntegration* integration_delegate = 1451 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1444 delegate_->GetBrowserIntegrationDelegate(); 1452 delegate_->GetBrowserIntegrationDelegate();
1445 if (integration_delegate) 1453 if (integration_delegate)
1446 integration_delegate->OnUserGesture(); 1454 integration_delegate->OnUserGesture();
1447 } 1455 }
1448 1456
1449 void RenderViewHost::OnMissingPluginStatus(int status) { 1457 void RenderViewHost::OnMissingPluginStatus(int status) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 #endif 1685 #endif
1678 } 1686 }
1679 1687
1680 void RenderViewHost::OnCSSInserted() { 1688 void RenderViewHost::OnCSSInserted() {
1681 delegate_->DidInsertCSS(); 1689 delegate_->DidInsertCSS();
1682 } 1690 }
1683 1691
1684 void RenderViewHost::UpdateBrowserWindowId(int window_id) { 1692 void RenderViewHost::UpdateBrowserWindowId(int window_id) {
1685 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); 1693 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id));
1686 } 1694 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698