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

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

Issue 255028: Pass unhandled keyup messages coming in from the renderer to the underlying v... (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 | chrome/browser/tab_contents/tab_contents_view_gtk.cc » ('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 (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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // TODO(brettw) why do we have to filter these types of events here. Can't 1439 view->HandleKeyboardEvent(event);
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
1450 void RenderViewHost::OnUserGesture() { 1443 void RenderViewHost::OnUserGesture() {
1451 RenderViewHostDelegate::BrowserIntegration* integration_delegate = 1444 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1452 delegate_->GetBrowserIntegrationDelegate(); 1445 delegate_->GetBrowserIntegrationDelegate();
1453 if (integration_delegate) 1446 if (integration_delegate)
1454 integration_delegate->OnUserGesture(); 1447 integration_delegate->OnUserGesture();
1455 } 1448 }
1456 1449
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 #endif 1678 #endif
1686 } 1679 }
1687 1680
1688 void RenderViewHost::OnCSSInserted() { 1681 void RenderViewHost::OnCSSInserted() {
1689 delegate_->DidInsertCSS(); 1682 delegate_->DidInsertCSS();
1690 } 1683 }
1691 1684
1692 void RenderViewHost::UpdateBrowserWindowId(int window_id) { 1685 void RenderViewHost::UpdateBrowserWindowId(int window_id) {
1693 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); 1686 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id));
1694 } 1687 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698