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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 case ui::ET_GESTURE_SCROLL_END: | 224 case ui::ET_GESTURE_SCROLL_END: |
225 case ui::ET_SCROLL_FLING_START: | 225 case ui::ET_SCROLL_FLING_START: |
226 widget_->ReleaseCapture(); | 226 widget_->ReleaseCapture(); |
227 controller_->SetDraggingHandle(NULL); | 227 controller_->SetDraggingHandle(NULL); |
228 break; | 228 break; |
229 default: | 229 default: |
230 break; | 230 break; |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
234 virtual gfx::Size GetPreferredSize() OVERRIDE { | 234 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
235 gfx::Size image_size = GetHandleImageSize(); | 235 gfx::Size image_size = GetHandleImageSize(); |
236 return gfx::Size(image_size.width() + 2 * kSelectionHandleHorizPadding, | 236 return gfx::Size(image_size.width() + 2 * kSelectionHandleHorizPadding, |
237 image_size.height() + selection_rect_.height() + | 237 image_size.height() + selection_rect_.height() + |
238 kSelectionHandleVertPadding); | 238 kSelectionHandleVertPadding); |
239 } | 239 } |
240 | 240 |
241 bool IsWidgetVisible() const { | 241 bool IsWidgetVisible() const { |
242 return widget_->IsVisible(); | 242 return widget_->IsVisible(); |
243 } | 243 } |
244 | 244 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 622 |
623 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { | 623 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { |
624 return selection_handle_2_->IsWidgetVisible(); | 624 return selection_handle_2_->IsWidgetVisible(); |
625 } | 625 } |
626 | 626 |
627 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { | 627 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { |
628 return cursor_handle_->IsWidgetVisible(); | 628 return cursor_handle_->IsWidgetVisible(); |
629 } | 629 } |
630 | 630 |
631 } // namespace views | 631 } // namespace views |
OLD | NEW |