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

Side by Side Diff: ash/drag_drop/drag_image_view.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « ash/drag_drop/drag_image_view.h ('k') | ash/launcher/launcher_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/drag_drop/drag_image_view.h" 5 #include "ash/drag_drop/drag_image_view.h"
6 6
7 #include "ash/wm/shadow_types.h" 7 #include "ash/wm/shadow_types.h"
8 #include "ui/views/widget/widget.h" 8 #include "ui/views/widget/widget.h"
9 9
10 namespace ash { 10 namespace ash {
(...skipping 23 matching lines...) Expand all
34 widget_->SetAlwaysOnTop(true); 34 widget_->SetAlwaysOnTop(true);
35 35
36 // We are owned by the DragDropController. 36 // We are owned by the DragDropController.
37 set_owned_by_client(); 37 set_owned_by_client();
38 } 38 }
39 39
40 DragImageView::~DragImageView() { 40 DragImageView::~DragImageView() {
41 widget_->Hide(); 41 widget_->Hide();
42 } 42 }
43 43
44 void DragImageView::SetScreenBounds(const gfx::Rect& bounds) { 44 void DragImageView::SetBoundsInScreen(const gfx::Rect& bounds) {
45 widget_->SetBounds(bounds); 45 widget_->SetBounds(bounds);
46 } 46 }
47 47
48 void DragImageView::SetScreenPosition(const gfx::Point& position) { 48 void DragImageView::SetScreenPosition(const gfx::Point& position) {
49 widget_->SetBounds(gfx::Rect(position, GetPreferredSize())); 49 widget_->SetBounds(gfx::Rect(position, GetPreferredSize()));
50 } 50 }
51 51
52 void DragImageView::SetWidgetVisible(bool visible) { 52 void DragImageView::SetWidgetVisible(bool visible) {
53 if (visible != widget_->IsVisible()) { 53 if (visible != widget_->IsVisible()) {
54 if (visible) 54 if (visible)
55 widget_->Show(); 55 widget_->Show();
56 else 56 else
57 widget_->Hide(); 57 widget_->Hide();
58 } 58 }
59 } 59 }
60 60
61 } // namespace internal 61 } // namespace internal
62 } // namespace ash 62 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_image_view.h ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698