Commit a8b55d32 authored by saintlou@chromium.org's avatar saintlou@chromium.org

Remove remaining defined(TOUCH_UI) under views/controls


BUG=105046
TEST=none


Review URL: http://codereview.chromium.org/8651006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111272 0039d316-1c4b-4281-b951-d872f2087c98
parent fba36582
......@@ -26,16 +26,10 @@
#if defined(USE_AURA)
#include "ui/aura/desktop.h"
#endif
#if defined(TOOLKIT_USES_GTK)
#elif defined(TOOLKIT_USES_GTK)
#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
#endif
#if defined(TOUCH_UI)
#include "ui/views/focus/accelerator_handler.h"
#endif
using base::Time;
using base::TimeDelta;
using ui::OSExchangeData;
......@@ -917,16 +911,6 @@ base::MessagePumpDispatcher::DispatchStatus
base::MessagePumpDispatcher::EVENT_QUIT :
base::MessagePumpDispatcher::EVENT_PROCESSED;
}
#elif defined(TOUCH_UI)
base::MessagePumpDispatcher::DispatchStatus
MenuController::Dispatch(XEvent* xev) {
if (!DispatchXEvent(xev))
return EVENT_IGNORED;
return exit_type_ != EXIT_NONE ?
base::MessagePumpDispatcher::EVENT_QUIT :
base::MessagePumpDispatcher::EVENT_PROCESSED;
}
#else
bool MenuController::Dispatch(GdkEvent* event) {
if (exit_type_ == EXIT_ALL || exit_type_ == EXIT_DESTROYED) {
......
......@@ -292,34 +292,24 @@ void NativeTextfieldViews::ShowContextMenuForView(View* source,
void NativeTextfieldViews::WriteDragDataForView(views::View* sender,
const gfx::Point& press_pt,
OSExchangeData* data) {
#if !defined(TOUCH_UI)
DCHECK_NE(ui::DragDropTypes::DRAG_NONE,
GetDragOperationsForView(sender, press_pt));
#endif
data->SetString(GetSelectedText());
}
int NativeTextfieldViews::GetDragOperationsForView(views::View* sender,
const gfx::Point& p) {
#if defined(TOUCH_UI)
return ui::DragDropTypes::DRAG_NONE;
#else
if (!textfield_->IsEnabled() || !GetRenderText()->IsPointInSelection(p))
return ui::DragDropTypes::DRAG_NONE;
if (sender == this && !textfield_->read_only())
return ui::DragDropTypes::DRAG_MOVE | ui::DragDropTypes::DRAG_COPY;
return ui::DragDropTypes::DRAG_COPY;
#endif
}
bool NativeTextfieldViews::CanStartDragForView(View* sender,
const gfx::Point& press_pt,
const gfx::Point& p) {
#if defined(TOUCH_UI)
return false;
#else
return GetRenderText()->IsPointInSelection(press_pt);
#endif
}
/////////////////////////////////////////////////////////////////
......@@ -1050,10 +1040,7 @@ void NativeTextfieldViews::HandleMousePressEvent(const MouseEvent& event) {
initiating_drag_ = false;
bool can_drag = true;
#if defined(TOUCH_UI)
// Temporarily disable drag and drop on touch builds; see crbug.com/97845.
can_drag = false;
#endif
switch(aggregated_clicks_) {
case 0:
if (can_drag && GetRenderText()->IsPointInSelection(event.location()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment