Index: ash/drag_drop/drag_drop_controller.cc |
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc |
index 7ba9868019d7543d39860cb1c005ef8739ee9da5..4ace7378a24e0e8e606f2d77116ee5b15fbdcd69 100644 |
--- a/ash/drag_drop/drag_drop_controller.cc |
+++ b/ash/drag_drop/drag_drop_controller.cc |
@@ -196,21 +196,22 @@ int DragDropController::StartDragAndDrop( |
drag_image_vertical_offset = kTouchDragImageVerticalOffset; |
} |
gfx::Point start_location = screen_location; |
- drag_image_final_bounds_for_cancel_animation_ = gfx::Rect( |
- start_location - provider->GetDragImageOffset(), |
- provider->GetDragImage().size()); |
+ drag_image_final_bounds_for_cancel_animation_ = |
+ gfx::Rect(start_location - provider->GetDragImageOffset(), |
+ provider->GetDragImage().size()); |
drag_image_.reset(new DragImageView(source_window->GetRootWindow(), source)); |
drag_image_->SetImage(provider->GetDragImage()); |
drag_image_offset_ = provider->GetDragImageOffset(); |
gfx::Rect drag_image_bounds(start_location, drag_image_->GetPreferredSize()); |
- drag_image_bounds = AdjustDragImageBoundsForScaleAndOffset(drag_image_bounds, |
- drag_image_vertical_offset, drag_image_scale, &drag_image_offset_); |
+ drag_image_bounds = AdjustDragImageBoundsForScaleAndOffset( |
+ drag_image_bounds, drag_image_vertical_offset, drag_image_scale, |
+ &drag_image_offset_); |
drag_image_->SetBoundsInScreen(drag_image_bounds); |
drag_image_->SetWidgetVisible(true); |
if (source == ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH) { |
- drag_image_->SetTouchDragOperationHintPosition(gfx::Point( |
- drag_image_offset_.x(), |
- drag_image_offset_.y() + drag_image_vertical_offset)); |
+ drag_image_->SetTouchDragOperationHintPosition( |
+ gfx::Point(drag_image_offset_.x(), |
+ drag_image_offset_.y() + drag_image_vertical_offset)); |
} |
drag_window_ = NULL; |
@@ -299,8 +300,8 @@ void DragDropController::DragUpdate(aura::Window* target, |
gfx::Point root_location_in_screen = event.root_location(); |
::wm::ConvertPointToScreen(target->GetRootWindow(), |
&root_location_in_screen); |
- drag_image_->SetScreenPosition( |
- root_location_in_screen - drag_image_offset_); |
+ drag_image_->SetScreenPosition(root_location_in_screen - |
+ drag_image_offset_); |
drag_image_->SetTouchDragOperation(op); |
} |
} |
@@ -422,8 +423,7 @@ void DragDropController::OnGestureEvent(ui::GestureEvent* event) { |
return; |
// Apply kTouchDragImageVerticalOffset to the location. |
- ui::GestureEvent touch_offset_event(*event, |
- static_cast<aura::Window*>(NULL), |
+ ui::GestureEvent touch_offset_event(*event, static_cast<aura::Window*>(NULL), |
static_cast<aura::Window*>(NULL)); |
gfx::PointF touch_offset_location = touch_offset_event.location_f(); |
gfx::PointF touch_offset_root_location = touch_offset_event.root_location_f(); |
@@ -456,10 +456,10 @@ void DragDropController::OnGestureEvent(ui::GestureEvent* event) { |
// drag drop is still in progress. The drag drop ends only when the nested |
// message loop ends. Due to this stupidity, we have to defer forwarding |
// the long tap. |
- pending_long_tap_.reset( |
- new ui::GestureEvent(*event, |
- static_cast<aura::Window*>(drag_drop_tracker_->capture_window()), |
- static_cast<aura::Window*>(drag_source_window_))); |
+ pending_long_tap_.reset(new ui::GestureEvent( |
+ *event, |
+ static_cast<aura::Window*>(drag_drop_tracker_->capture_window()), |
+ static_cast<aura::Window*>(drag_source_window_))); |
DoDragCancel(kTouchCancelAnimationDuration); |
break; |
default: |
@@ -514,8 +514,8 @@ void DragDropController::DoDragCancel(int drag_cancel_animation_duration_ms) { |
// |drag_window_| can be NULL if we have just started the drag and have not |
// received any DragUpdates, or, if the |drag_window_| gets destroyed during |
// a drag/drop. |
- aura::client::DragDropDelegate* delegate = drag_window_? |
- aura::client::GetDragDropDelegate(drag_window_) : NULL; |
+ aura::client::DragDropDelegate* delegate = |
+ drag_window_ ? aura::client::GetDragDropDelegate(drag_window_) : NULL; |
if (delegate) |
delegate->OnDragExited(); |
@@ -542,9 +542,8 @@ void DragDropController::StartCanceledAnimation(int animation_duration_ms) { |
drag_image_->SetTouchDragOperationHintOff(); |
drag_image_initial_bounds_for_cancel_animation_ = |
drag_image_->GetBoundsInScreen(); |
- cancel_animation_.reset(CreateCancelAnimation(animation_duration_ms, |
- kCancelAnimationFrameRate, |
- this)); |
+ cancel_animation_.reset(CreateCancelAnimation( |
+ animation_duration_ms, kCancelAnimationFrameRate, this)); |
cancel_animation_->Start(); |
} |