| Index: ui/views/touchui/touch_selection_controller_impl.cc
|
| ===================================================================
|
| --- ui/views/touchui/touch_selection_controller_impl.cc (revision 245822)
|
| +++ ui/views/touchui/touch_selection_controller_impl.cc (working copy)
|
| @@ -16,7 +16,6 @@
|
| #include "ui/gfx/screen.h"
|
| #include "ui/gfx/size.h"
|
| #include "ui/views/corewm/shadow_types.h"
|
| -#include "ui/views/corewm/window_animations.h"
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/wm/public/masked_window_targeter.h"
|
|
|
| @@ -58,8 +57,6 @@
|
|
|
| const int kContextMenuTimoutMs = 200;
|
|
|
| -const int kSelectionHandleQuickFadeDurationMs = 50;
|
| -
|
| // Creates a widget to host SelectionHandleView.
|
| views::Widget* CreateTouchSelectionPopupWidget(
|
| gfx::NativeView context,
|
| @@ -157,7 +154,6 @@
|
| }
|
|
|
| virtual ~EditingHandleView() {
|
| - SetWidgetVisible(false, false);
|
| }
|
|
|
| // Overridden from views::WidgetDelegateView:
|
| @@ -232,22 +228,13 @@
|
| return widget_->IsVisible();
|
| }
|
|
|
| - void SetWidgetVisible(bool visible, bool quick) {
|
| + void SetWidgetVisible(bool visible) {
|
| if (widget_->IsVisible() == visible)
|
| return;
|
| - if (visible) {
|
| - corewm::SetWindowShowAnimationDuration(
|
| - widget_->GetNativeView(),
|
| - base::TimeDelta::FromMilliseconds(
|
| - quick ? kSelectionHandleQuickFadeDurationMs : 0));
|
| + if (visible)
|
| widget_->Show();
|
| - } else {
|
| - corewm::SetWindowHideAnimationDuration(
|
| - widget_->GetNativeView(),
|
| - base::TimeDelta::FromMilliseconds(
|
| - quick ? kSelectionHandleQuickFadeDurationMs : 0));
|
| + else
|
| widget_->Hide();
|
| - }
|
| }
|
|
|
| void SetSelectionRectInScreen(const gfx::Rect& rect) {
|
| @@ -389,13 +376,13 @@
|
|
|
| // Check if there is any selection at all.
|
| if (screen_pos_1 == screen_pos_2) {
|
| - selection_handle_1_->SetWidgetVisible(false, false);
|
| - selection_handle_2_->SetWidgetVisible(false, false);
|
| + selection_handle_1_->SetWidgetVisible(false);
|
| + selection_handle_2_->SetWidgetVisible(false);
|
| SetHandleSelectionRect(cursor_handle_.get(), r1, screen_rect_1);
|
| return;
|
| }
|
|
|
| - cursor_handle_->SetWidgetVisible(false, false);
|
| + cursor_handle_->SetWidgetVisible(false);
|
| SetHandleSelectionRect(selection_handle_1_.get(), r1, screen_rect_1);
|
| SetHandleSelectionRect(selection_handle_2_.get(), r2, screen_rect_2);
|
| }
|
| @@ -405,12 +392,6 @@
|
| return !!dragging_handle_;
|
| }
|
|
|
| -void TouchSelectionControllerImpl::HideHandles(bool quick) {
|
| - selection_handle_1_->SetWidgetVisible(false, quick);
|
| - selection_handle_2_->SetWidgetVisible(false, quick);
|
| - cursor_handle_->SetWidgetVisible(false, quick);
|
| -}
|
| -
|
| void TouchSelectionControllerImpl::SetDraggingHandle(
|
| EditingHandleView* handle) {
|
| dragging_handle_ = handle;
|
| @@ -460,7 +441,7 @@
|
| EditingHandleView* handle,
|
| const gfx::Rect& rect,
|
| const gfx::Rect& rect_in_screen) {
|
| - handle->SetWidgetVisible(client_view_->GetBounds().Contains(rect), false);
|
| + handle->SetWidgetVisible(client_view_->GetBounds().Contains(rect));
|
| if (handle->IsWidgetVisible())
|
| handle->SetSelectionRectInScreen(rect_in_screen);
|
| }
|
|
|