Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/test/test_views.cc ('k') | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/test/test_views.cc ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698