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

Unified Diff: chrome/browser/tab_contents/tab_contents_view.cc

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/tab_contents_view.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents_view.cc (revision 34219)
+++ chrome/browser/tab_contents/tab_contents_view.cc (working copy)
@@ -58,12 +58,18 @@
ShowCreatedWidgetInternal(widget_host_view, initial_pos);
}
-bool TabContentsView::IsReservedAccelerator(
- const NativeWebKeyboardEvent& event) {
- return tab_contents()->delegate() &&
- tab_contents()->delegate()->IsReservedAccelerator(event);
+bool TabContentsView::PreHandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
+ return tab_contents_->delegate() &&
+ tab_contents_->delegate()->PreHandleKeyboardEvent(
+ event, is_keyboard_shortcut);
}
+void TabContentsView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
+ if (tab_contents_->delegate())
+ tab_contents_->delegate()->HandleKeyboardEvent(event);
+}
+
RenderWidgetHostView* TabContentsView::CreateNewWidgetInternal(
int route_id, bool activatable) {
return delegate_view_helper_.CreateNewWidget(route_id, activatable,
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view.h ('k') | chrome/browser/tab_contents/tab_contents_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698