diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/ui_controls_gtk.cc | 10 | ||||
-rw-r--r-- | chrome/browser/notifications/balloon_collection_gtk.cc | 11 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/constrained_window_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/constrained_window_gtk.h | 8 | ||||
-rw-r--r-- | chrome/browser/ui/views/dialog_stubs_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/dropdown_bar_host_gtk.cc | 31 |
6 files changed, 5 insertions, 63 deletions
diff --git a/chrome/browser/automation/ui_controls_gtk.cc b/chrome/browser/automation/ui_controls_gtk.cc index 3c7e601a..d9b02d1 100644 --- a/chrome/browser/automation/ui_controls_gtk.cc +++ b/chrome/browser/automation/ui_controls_gtk.cc @@ -42,16 +42,7 @@ class EventWaiter : public MessageLoopForUI::Observer { virtual ~EventWaiter() { MessageLoopForUI::current()->RemoveObserver(this); } -#if defined(TOUCH_UI) - // MessageLoop::Observer implementation: - virtual base::EventStatus WillProcessEvent(const base::NativeEvent& event) { - NOTIMPLEMENTED(); - return base::EVENT_CONTINUE; - } - virtual void DidProcessEvent(const base::NativeEvent& event) { - } -#else // MessageLoop::Observer implementation: virtual void WillProcessEvent(GdkEvent* event) { if ((event->type == type_) && (--count_ == 0)) { @@ -69,7 +60,6 @@ class EventWaiter : public MessageLoopForUI::Observer { virtual void DidProcessEvent(GdkEvent* event) { // No-op. } -#endif private: base::Closure task_; diff --git a/chrome/browser/notifications/balloon_collection_gtk.cc b/chrome/browser/notifications/balloon_collection_gtk.cc index 5b8a784..c5e499f 100644 --- a/chrome/browser/notifications/balloon_collection_gtk.cc +++ b/chrome/browser/notifications/balloon_collection_gtk.cc @@ -47,16 +47,6 @@ void BalloonCollectionImpl::PositionBalloons(bool reposition) { PositionBalloonsInternal(reposition); } -#if defined(TOUCH_UI) -base::EventStatus BalloonCollectionImpl::WillProcessEvent( - const base::NativeEvent& event) { - return base::EVENT_CONTINUE; -} - -void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { - NOTIMPLEMENTED(); -} -#else void BalloonCollectionImpl::WillProcessEvent(GdkEvent* event) { } @@ -70,7 +60,6 @@ void BalloonCollectionImpl::DidProcessEvent(GdkEvent* event) { break; } } -#endif bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { GdkScreen* screen = gdk_screen_get_default(); diff --git a/chrome/browser/ui/gtk/constrained_window_gtk.cc b/chrome/browser/ui/gtk/constrained_window_gtk.cc index 9d9f23f..3f32653 100644 --- a/chrome/browser/ui/gtk/constrained_window_gtk.cc +++ b/chrome/browser/ui/gtk/constrained_window_gtk.cc @@ -16,9 +16,7 @@ #include "ui/base/gtk/gtk_compat.h" #include "ui/base/gtk/gtk_hig_constants.h" -#if defined(TOUCH_UI) -#include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" -#elif defined(TOOLKIT_VIEWS) +#if defined(TOOLKIT_VIEWS) #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h" #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" #else @@ -135,7 +133,7 @@ void ConstrainedWindowGtk::FocusConstrainedWindow() { ConstrainedWindowGtk::TabContentsViewType* ConstrainedWindowGtk::ContainingView() { -#if defined(TOOLKIT_VIEWS) && !defined(TOUCH_UI) +#if defined(TOOLKIT_VIEWS) return static_cast<NativeTabContentsViewGtk*>( static_cast<TabContentsViewViews*>(wrapper_->view())-> native_tab_contents_view()); diff --git a/chrome/browser/ui/gtk/constrained_window_gtk.h b/chrome/browser/ui/gtk/constrained_window_gtk.h index ca0be17..34abb8b 100644 --- a/chrome/browser/ui/gtk/constrained_window_gtk.h +++ b/chrome/browser/ui/gtk/constrained_window_gtk.h @@ -17,9 +17,7 @@ class TabContentsWrapper; typedef struct _GdkColor GdkColor; -#if defined(TOUCH_UI) -class TabContentsViewViews; -#elif defined(TOOLKIT_VIEWS) +#if defined(TOOLKIT_VIEWS) class NativeTabContentsViewGtk; #else class ChromeTabContentsViewWrapperGtk; @@ -51,9 +49,7 @@ class ConstrainedWindowGtkDelegate { // centers the dialog. It is thus an order of magnitude simpler. class ConstrainedWindowGtk : public ConstrainedWindow { public: -#if defined(TOUCH_UI) - typedef TabContentsViewViews TabContentsViewType; -#elif defined(TOOLKIT_VIEWS) +#if defined(TOOLKIT_VIEWS) typedef NativeTabContentsViewGtk TabContentsViewType; #else typedef ChromeTabContentsViewWrapperGtk TabContentsViewType; diff --git a/chrome/browser/ui/views/dialog_stubs_gtk.cc b/chrome/browser/ui/views/dialog_stubs_gtk.cc index 2480196..5306594 100644 --- a/chrome/browser/ui/views/dialog_stubs_gtk.cc +++ b/chrome/browser/ui/views/dialog_stubs_gtk.cc @@ -17,7 +17,7 @@ #include "chrome/browser/ui/gtk/task_manager_gtk.h" #endif -#if !defined(OS_CHROMEOS) && !defined(TOUCH_UI) +#if !defined(OS_CHROMEOS) #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" #endif diff --git a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc index a064f3f..dfbdadd 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 } |