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

Unified Diff: chrome/browser/ui/views/dropdown_bar_host_gtk.cc

Issue 8621006: Remove most obvious TOUCH_UI code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert file that CQ does not like. Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/dialog_stubs_gtk.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/dropdown_bar_host_gtk.cc
diff --git a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
index a064f3f49925f8e54b24f38f75995944512194af..dfbdadd3ecd1f7aa617b57773c0a9bea5919dadf 100644
--- a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
@@ -11,10 +11,6 @@
#include "ui/views/widget/widget.h"
#include "views/controls/textfield/textfield.h"
-#if defined(TOUCH_UI)
-#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
-#endif
-
void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
bool no_redraw) {
host_->SetBounds(new_pos);
@@ -24,32 +20,5 @@ void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
const TabContents* contents,
const views::KeyEvent& key_event) {
-#if defined(TOUCH_UI)
- // TODO(oshima): This is a copy from
- // RenderWidgetHostViewViews::OnKeyPressed().
- // Refactor and eliminate the dup code.
- NativeWebKeyboardEvent wke;
- wke.type = WebKit::WebInputEvent::KeyDown;
- wke.windowsKeyCode = key_event.key_code();
- wke.setKeyIdentifierFromWindowsKeyCode();
-
- wke.text[0] = wke.unmodifiedText[0] =
- static_cast<unsigned short>(gdk_keyval_to_unicode(
- ui::GdkKeyCodeForWindowsKeyCode(key_event.key_code(),
- key_event.IsShiftDown() ^ key_event.IsCapsLockDown())));
-
- // Due to a bug in GDK, gdk_keyval_to_unicode(keyval) returns 0 if keyval
- // is GDK_Return. It should instead return '\r'. This is causing
- // http://code.google.com/p/chromium/issues/detail?id=75779
- // Hence, the ugly hack below.
- // TODO(varunjain): remove the hack when the GDK bug
- // https://bugzilla.gnome.org/show_bug.cgi?id=644836 gets sorted out.
- if (key_event.key_code() == ui::VKEY_RETURN) {
- wke.text[0] = wke.unmodifiedText[0] = '\r';
- }
-
- return wke;
-#else
return NativeWebKeyboardEvent(key_event.gdk_event());
-#endif
}
« no previous file with comments | « chrome/browser/ui/views/dialog_stubs_gtk.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698