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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_gtk.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_gtk.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents_view_gtk.cc (revision 34219)
+++ chrome/browser/tab_contents/tab_contents_view_gtk.cc (working copy)
@@ -318,36 +318,6 @@
}
}
-bool TabContentsViewGtk::HandleKeyboardEvent(
- const NativeWebKeyboardEvent& event) {
- // This may be an accelerator. Try to pass it on to our browser window
- // to handle.
- GtkWindow* window = GetTopLevelNativeWindow();
- if (!window) {
- NOTREACHED();
- return false;
- }
-
- // Filter out pseudo key events created by GtkIMContext signal handlers.
- // Since GtkIMContext signal handlers don't use GdkEventKey objects, its
- // |event.os_event| values are dummy values (or NULL.)
- // We should filter out these pseudo key events to prevent unexpected
- // behaviors caused by them.
- // We should also filter out the KeyUp event as it should not be processed
- // as an accelerator.
- if (event.type == WebKit::WebInputEvent::Char ||
- event.type == WebKit::WebInputEvent::KeyUp)
- return false;
-
- BrowserWindowGtk* browser_window =
- BrowserWindowGtk::GetBrowserWindowForNativeWindow(window);
-
- // If this is a dialog, the top level window isn't a browser. In this case,
- // we just return false.
- return browser_window ?
- browser_window->HandleKeyboardEvent(event.os_event) : false;
-}
-
void TabContentsViewGtk::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_gtk.h ('k') | chrome/browser/tab_contents/tab_contents_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698