| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/touchui/touch_selection_controller_impl.h" | 5 #include "ui/views/touchui/touch_selection_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
| 9 #include "grit/ui_strings.h" | 9 #include "grit/ui_strings.h" |
| 10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 case ui::ET_GESTURE_SCROLL_END: | 223 case ui::ET_GESTURE_SCROLL_END: |
| 224 case ui::ET_SCROLL_FLING_START: | 224 case ui::ET_SCROLL_FLING_START: |
| 225 widget_->ReleaseCapture(); | 225 widget_->ReleaseCapture(); |
| 226 controller_->SetDraggingHandle(NULL); | 226 controller_->SetDraggingHandle(NULL); |
| 227 break; | 227 break; |
| 228 default: | 228 default: |
| 229 break; | 229 break; |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 | 232 |
| 233 virtual gfx::Size GetPreferredSize() OVERRIDE { | 233 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
| 234 gfx::Size image_size = GetHandleImageSize(); | 234 gfx::Size image_size = GetHandleImageSize(); |
| 235 return gfx::Size(image_size.width() + 2 * kSelectionHandleHorizPadding, | 235 return gfx::Size(image_size.width() + 2 * kSelectionHandleHorizPadding, |
| 236 image_size.height() + selection_rect_.height() + | 236 image_size.height() + selection_rect_.height() + |
| 237 kSelectionHandleVertPadding); | 237 kSelectionHandleVertPadding); |
| 238 } | 238 } |
| 239 | 239 |
| 240 bool IsWidgetVisible() const { | 240 bool IsWidgetVisible() const { |
| 241 return widget_->IsVisible(); | 241 return widget_->IsVisible(); |
| 242 } | 242 } |
| 243 | 243 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 | 621 |
| 622 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { | 622 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { |
| 623 return selection_handle_2_->IsWidgetVisible(); | 623 return selection_handle_2_->IsWidgetVisible(); |
| 624 } | 624 } |
| 625 | 625 |
| 626 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { | 626 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { |
| 627 return cursor_handle_->IsWidgetVisible(); | 627 return cursor_handle_->IsWidgetVisible(); |
| 628 } | 628 } |
| 629 | 629 |
| 630 } // namespace views | 630 } // namespace views |
| OLD | NEW |