diff options
author | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 20:30:11 +0000 |
---|---|---|
committer | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 20:30:11 +0000 |
commit | 2a4e56176f21ed9c2a8d53f6fa2b77f8cd789d59 (patch) | |
tree | 1d4f7eab471c88492b1612144cf2dca46e8a6ed4 | |
parent | 963b13d90a9113c2f6f15043e373ffec9fe713c8 (diff) | |
download | chromium_src-2a4e56176f21ed9c2a8d53f6fa2b77f8cd789d59.zip chromium_src-2a4e56176f21ed9c2a8d53f6fa2b77f8cd789d59.tar.gz chromium_src-2a4e56176f21ed9c2a8d53f6fa2b77f8cd789d59.tar.bz2 |
Redo of Issue http://codereview.chromium.org/8621006/
Removed most obvious TOUCH_UI tests. Either obvious because we have USE_AURA | TOUCH_UI or because it is in a GTK module.
This CL focuses mainly on Views cleanup.
BUG=105046
TEST=none
Review URL: http://codereview.chromium.org/8632016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111204 0039d316-1c4b-4281-b951-d872f2087c98
-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 | ||||
-rw-r--r-- | ui/ui.gyp | 7 | ||||
-rw-r--r-- | views/controls/menu/menu_config_aura.cc | 5 | ||||
-rw-r--r-- | views/controls/menu/menu_config_linux.cc | 5 | ||||
-rw-r--r-- | views/controls/menu/menu_controller.h | 2 | ||||
-rw-r--r-- | views/controls/menu/menu_host.cc | 3 | ||||
-rw-r--r-- | views/controls/menu/menu_item_view.cc | 8 | ||||
-rw-r--r-- | views/controls/menu/nested_dispatcher_gtk.cc | 11 | ||||
-rw-r--r-- | views/controls/menu/nested_dispatcher_gtk.h | 8 | ||||
-rw-r--r-- | views/controls/native_control_gtk.cc | 150 | ||||
-rw-r--r-- | views/controls/native_control_gtk.h | 10 | ||||
-rw-r--r-- | views/controls/textfield/native_textfield_views_unittest.cc | 2 | ||||
-rw-r--r-- | views/mouse_watcher.cc | 2 | ||||
-rw-r--r-- | views/views.gyp | 5 |
19 files changed, 7 insertions, 279 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 } @@ -6,13 +6,6 @@ 'variables': { 'chromium_code': 1, }, - 'target_defaults': { - 'conditions': [ - ['touchui==0', {'sources/': [ - ['exclude', '_(touch)\\.cc$'], - ]}], - ], - }, 'includes': [ 'ui_resources.gypi', ], diff --git a/views/controls/menu/menu_config_aura.cc b/views/controls/menu/menu_config_aura.cc index d0aca45..298f924 100644 --- a/views/controls/menu/menu_config_aura.cc +++ b/views/controls/menu/menu_config_aura.cc @@ -14,12 +14,7 @@ namespace views { MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); -#if defined(TOUCH_UI) - config->font = rb.GetFont(ResourceBundle::LargeFont); - config->show_accelerators = false; -#else config->font = rb.GetFont(ResourceBundle::BaseFont); -#endif config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; diff --git a/views/controls/menu/menu_config_linux.cc b/views/controls/menu/menu_config_linux.cc index d0aca45..298f924 100644 --- a/views/controls/menu/menu_config_linux.cc +++ b/views/controls/menu/menu_config_linux.cc @@ -14,12 +14,7 @@ namespace views { MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); -#if defined(TOUCH_UI) - config->font = rb.GetFont(ResourceBundle::LargeFont); - config->show_accelerators = false; -#else config->font = rb.GetFont(ResourceBundle::BaseFont); -#endif config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; diff --git a/views/controls/menu/menu_controller.h b/views/controls/menu/menu_controller.h index e85cfdd..b3023f1 100644 --- a/views/controls/menu/menu_controller.h +++ b/views/controls/menu/menu_controller.h @@ -223,7 +223,7 @@ class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher { #elif defined(USE_WAYLAND) virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( base::wayland::WaylandEvent* event); -#elif defined(TOUCH_UI) || defined(USE_AURA) +#elif defined(USE_AURA) virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); #else virtual bool Dispatch(GdkEvent* event); diff --git a/views/controls/menu/menu_host.cc b/views/controls/menu/menu_host.cc index 075fa82..740cc81 100644 --- a/views/controls/menu/menu_host.cc +++ b/views/controls/menu/menu_host.cc @@ -48,9 +48,6 @@ void MenuHost::ShowMenuHost(bool do_capture) { // process of showing. ignore_capture_lost_ = true; Show(); -#if defined(TOUCH_UI) - Activate(); -#endif if (do_capture) native_widget_private()->SetMouseCapture(); ignore_capture_lost_ = false; diff --git a/views/controls/menu/menu_item_view.cc b/views/controls/menu/menu_item_view.cc index 9d0d119..c361648 100644 --- a/views/controls/menu/menu_item_view.cc +++ b/views/controls/menu/menu_item_view.cc @@ -54,10 +54,6 @@ class EmptyMenuMenuItem : public MenuItemView { // Padding between child views. static const int kChildXPadding = 8; -#if defined(TOUCH_UI) -const int kMinItemHeightTouch = 40; -#endif - // MenuItemView --------------------------------------------------------------- // static @@ -750,11 +746,7 @@ gfx::Size MenuItemView::CalculatePreferredSize() { } const gfx::Font& font = GetFont(); -#if defined(TOUCH_UI) - int height = std::max(font.GetHeight(), kMinItemHeightTouch); -#else int height = font.GetHeight(); -#endif return gfx::Size( font.GetStringWidth(title_) + label_start_ + item_right_margin_ + child_size.width(), diff --git a/views/controls/menu/nested_dispatcher_gtk.cc b/views/controls/menu/nested_dispatcher_gtk.cc index 6504acc..cb3d189 100644 --- a/views/controls/menu/nested_dispatcher_gtk.cc +++ b/views/controls/menu/nested_dispatcher_gtk.cc @@ -4,10 +4,6 @@ #include "views/controls/menu/nested_dispatcher_gtk.h" -#if defined(TOUCH_UI) -#include "ui/views/focus/accelerator_handler.h" -#endif - namespace views { NestedDispatcherGtk::NestedDispatcherGtk(MessageLoopForUI::Dispatcher* creator, @@ -32,15 +28,8 @@ void NestedDispatcherGtk::CreatorDestroyed() { creator_ = NULL; } -#if defined(TOUCH_UI) -base::MessagePumpDispatcher::DispatchStatus - NestedDispatcherGtk::Dispatch(XEvent* xevent) { - return creator_->Dispatch(xevent); -} -#else bool NestedDispatcherGtk::Dispatch(GdkEvent* event) { return creator_ && creator_->Dispatch(event); } -#endif // defined(TOUCH_UI) } // namespace views diff --git a/views/controls/menu/nested_dispatcher_gtk.h b/views/controls/menu/nested_dispatcher_gtk.h index 0520b4d..eaad46e 100644 --- a/views/controls/menu/nested_dispatcher_gtk.h +++ b/views/controls/menu/nested_dispatcher_gtk.h @@ -8,10 +8,6 @@ #include "base/message_loop.h" -#if defined(TOUCH_UI) -typedef union _XEvent XEvent; -#endif - namespace views { // A nested dispatcher that can out-live the creator of this @@ -37,12 +33,8 @@ class NestedDispatcherGtk : public MessageLoopForUI::Dispatcher { private: virtual ~NestedDispatcherGtk() {} -#if defined(TOUCH_UI) - virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); -#else // Overriden from MessageLoopForUI::Dispatcher: virtual bool Dispatch(GdkEvent* event); -#endif // Creator of the nested loop. MessageLoopForUI::Dispatcher* creator_; diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc index 52b2d45..24410f4 100644 --- a/views/controls/native_control_gtk.cc +++ b/views/controls/native_control_gtk.cc @@ -11,135 +11,8 @@ #include "ui/views/focus/focus_manager.h" #include "ui/views/widget/widget.h" -#if defined(TOUCH_UI) -namespace { - -GdkEvent* MouseButtonEvent(const views::MouseEvent& mouseev, - const views::NativeViewHost* source) { - GdkEvent* event = NULL; - switch (mouseev.type()) { - case ui::ET_MOUSE_PRESSED: - event = gdk_event_new(GDK_BUTTON_PRESS); - break; - case ui::ET_MOUSE_RELEASED: - event = gdk_event_new(GDK_BUTTON_RELEASE); - break; - default: - NOTREACHED(); - return NULL; - } - event->button.send_event = false; - event->button.time = GDK_CURRENT_TIME; - - // Ideally using native_view()->window should work, but it doesn't. - event->button.window = gdk_window_at_pointer(NULL, NULL); - g_object_ref(event->button.window); - event->button.x = mouseev.location().x(); - event->button.y = mouseev.location().y(); - - gfx::Point point = mouseev.location(); - views::View::ConvertPointToScreen(source, &point); - event->button.x_root = point.x(); - event->button.y_root = point.y(); - - event->button.axes = NULL; - - // Ideally, this should reconstruct the state from mouseev.flags(). - GdkModifierType modifier; - gdk_window_get_pointer(event->button.window, NULL, NULL, &modifier); - event->button.state = modifier; - - event->button.button = (mouseev.flags() & ui::EF_LEFT_BUTTON_DOWN) ? 1 : - (mouseev.flags() & ui::EF_RIGHT_BUTTON_DOWN) ? 3 : - 2; - event->button.device = gdk_device_get_core_pointer(); - return event; -} - -GdkEvent* MouseMoveEvent(const views::MouseEvent& mouseev, - const views::NativeViewHost* source) { - GdkEvent* event = gdk_event_new(GDK_MOTION_NOTIFY); - event->motion.send_event = false; - event->motion.time = GDK_CURRENT_TIME; - - event->motion.window = source->native_view()->window; - g_object_ref(event->motion.window); - event->motion.x = mouseev.location().x(); - event->motion.y = mouseev.location().y(); - - gfx::Point point = mouseev.location(); - views::View::ConvertPointToScreen(source, &point); - event->motion.x_root = point.x(); - event->motion.y_root = point.y(); - - event->motion.device = gdk_device_get_core_pointer(); - return event; -} - -GdkEvent* MouseCrossEvent(const views::MouseEvent& mouseev, - const views::NativeViewHost* source) { - GdkEvent* event = NULL; - switch (mouseev.type()) { - case ui::ET_MOUSE_ENTERED: - event = gdk_event_new(GDK_ENTER_NOTIFY); - break; - case ui::ET_MOUSE_EXITED: - event = gdk_event_new(GDK_LEAVE_NOTIFY); - break; - default: - NOTREACHED(); - return NULL; - } - event->crossing.send_event = false; - event->crossing.time = GDK_CURRENT_TIME; - - event->crossing.window = source->native_view()->window; - g_object_ref(event->crossing.window); - - event->crossing.x = event->crossing.y = 0; - event->crossing.x_root = event->crossing.y_root = 0; - event->crossing.mode = GDK_CROSSING_NORMAL; - event->crossing.detail = GDK_NOTIFY_VIRTUAL; - event->crossing.focus = false; - event->crossing.state = 0; - - return event; -} - -} // namespace -#endif // defined(TOUCH_UI) - namespace views { -#if defined(TOUCH_UI) -void NativeControlGtk::FakeNativeMouseEvent(const MouseEvent& mouseev) { - GdkEvent* event = NULL; - switch (mouseev.type()) { - case ui::ET_MOUSE_PRESSED: - case ui::ET_MOUSE_RELEASED: - event = MouseButtonEvent(mouseev, this); - break; - case ui::ET_MOUSE_MOVED: - event = MouseMoveEvent(mouseev, this); - break; - case ui::ET_MOUSE_ENTERED: - case ui::ET_MOUSE_EXITED: - event = MouseCrossEvent(mouseev, this); - break; - default: - NOTREACHED(); - return; - } - - if (event) { - // Do not gdk_event_put, since that will end up going through the - // message-loop and turn into an infinite loop. - gtk_widget_event(native_view(), event); - gdk_event_free(event); - } -} -#endif // defined(TOUCH_UI) - NativeControlGtk::NativeControlGtk() { } @@ -189,29 +62,6 @@ void NativeControlGtk::OnFocus() { parent(), ui::AccessibilityTypes::EVENT_FOCUS, true); } -#if defined(TOUCH_UI) -bool NativeControlGtk::OnMousePressed(const MouseEvent& mouseev) { - FakeNativeMouseEvent(mouseev); - return true; -} - -void NativeControlGtk::OnMouseReleased(const MouseEvent& mouseev) { - FakeNativeMouseEvent(mouseev); -} - -void NativeControlGtk::OnMouseMoved(const MouseEvent& mouseev) { - FakeNativeMouseEvent(mouseev); -} - -void NativeControlGtk::OnMouseEntered(const MouseEvent& mouseev) { - FakeNativeMouseEvent(mouseev); -} - -void NativeControlGtk::OnMouseExited(const MouseEvent& mouseev) { - FakeNativeMouseEvent(mouseev); -} -#endif // defined(TOUCH_UI) - void NativeControlGtk::NativeControlCreated(GtkWidget* native_control) { Attach(native_control); diff --git a/views/controls/native_control_gtk.h b/views/controls/native_control_gtk.h index 0333e36..89e1cb0 100644 --- a/views/controls/native_control_gtk.h +++ b/views/controls/native_control_gtk.h @@ -25,16 +25,6 @@ class NativeControlGtk : public NativeViewHost { virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); virtual void VisibilityChanged(View* starting_from, bool is_visible); virtual void OnFocus(); -#if defined(TOUCH_UI) - virtual bool OnMousePressed(const MouseEvent& event); - virtual void OnMouseReleased(const MouseEvent& event); - virtual void OnMouseMoved(const MouseEvent& event); - virtual void OnMouseExited(const MouseEvent& event); - virtual void OnMouseEntered(const MouseEvent& event); - - // Fake a mouse event. - void FakeNativeMouseEvent(const MouseEvent& event); -#endif // Called when the NativeControlGtk is attached to a View hierarchy with a // valid Widget. The NativeControlGtk should use this opportunity to create diff --git a/views/controls/textfield/native_textfield_views_unittest.cc b/views/controls/textfield/native_textfield_views_unittest.cc index 9033f81..7e8b3ef 100644 --- a/views/controls/textfield/native_textfield_views_unittest.cc +++ b/views/controls/textfield/native_textfield_views_unittest.cc @@ -797,7 +797,6 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_AcceptDrop) { } #endif -#if !defined(TOUCH_UI) TEST_F(NativeTextfieldViewsTest, MAYBE_DragAndDrop_InitiateDrag) { InitTextfield(Textfield::STYLE_DEFAULT); textfield_->SetText(ASCIIToUTF16("hello string world")); @@ -969,7 +968,6 @@ TEST_F(NativeTextfieldViewsTest, MAYBE_DragAndDrop_Canceled) { textfield_view_->OnDragDone(); EXPECT_EQ(ASCIIToUTF16("hello world"), textfield_->text()); } -#endif TEST_F(NativeTextfieldViewsTest, ReadOnlyTest) { InitTextfield(Textfield::STYLE_DEFAULT); diff --git a/views/mouse_watcher.cc b/views/mouse_watcher.cc index 3b2b039..d074860 100644 --- a/views/mouse_watcher.cc +++ b/views/mouse_watcher.cc @@ -77,7 +77,7 @@ class MouseWatcher::Observer : public MessageLoopForUI::Observer { } return EVENT_CONTINUE; } -#elif defined(TOUCH_UI) || defined(USE_AURA) +#elif defined(USE_AURA) virtual base::EventStatus WillProcessEvent( const base::NativeEvent& event) OVERRIDE { return base::EVENT_CONTINUE; diff --git a/views/views.gyp b/views/views.gyp index 02b90bd..2759c4d 100644 --- a/views/views.gyp +++ b/views/views.gyp @@ -13,11 +13,6 @@ ['include', '/win/'], ['include', '/win_[^/]*\\.cc$'], ]}], - ['touchui==0', { - 'sources/': [ - ['exclude', '_(touch)\\.cc$'], - ], - }], ['use_aura==1', { 'sources/': [ ['exclude', '_win\\.(h|cc)$'], ['exclude', '_gtk\\.(h|cc)$'], |