summaryrefslogtreecommitdiffstats
path: root/ash/drag_drop
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 19:17:04 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 19:17:04 +0000
commite2f64d101a1e624bf300f598fea6c336db64f4a2 (patch)
tree9cd0c6a963f1152e2a1ec0667df1242a38fb627b /ash/drag_drop
parent7f1a51c32f9c8c5a44118483c1255328d7983fce (diff)
downloadchromium_src-e2f64d101a1e624bf300f598fea6c336db64f4a2.zip
chromium_src-e2f64d101a1e624bf300f598fea6c336db64f4a2.tar.gz
chromium_src-e2f64d101a1e624bf300f598fea6c336db64f4a2.tar.bz2
Rename bounds accessors to be intuitive and consistent
GetClientAreaScreenBounds -> GetClientAreaBoundsInScreen Get/Set ParentBounds -> Get/Set BoundsInParent GetWorkAreaScreenBounds -> GetWorkAreaBoundsInScreen GetClientAreaScreenBounds -> GetClientAreaBoundsInScreen GetWindowScreenBounds -> GetWindowBoundsInScreen GetScreenBounds -> GetBoundsInScreen GetRootWindowBounds -> GetBoundsInRootWindow BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10795013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop')
-rw-r--r--ash/drag_drop/drag_drop_controller.cc2
-rw-r--r--ash/drag_drop/drag_drop_controller_unittest.cc4
-rw-r--r--ash/drag_drop/drag_image_view.cc2
-rw-r--r--ash/drag_drop/drag_image_view.h7
4 files changed, 9 insertions, 6 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 5fdfa0e..34028ae 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -73,7 +73,7 @@ int DragDropController::StartDragAndDrop(const ui::OSExchangeData& data,
drag_image_.reset(new DragImageView);
drag_image_->SetImage(provider.drag_image());
drag_image_offset_ = provider.drag_image_offset();
- drag_image_->SetScreenBounds(gfx::Rect(
+ drag_image_->SetBoundsInScreen(gfx::Rect(
root_location.Subtract(drag_image_offset_),
drag_image_->GetPreferredSize()));
drag_image_->SetWidgetVisible(true);
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 31c1b97..c4a7d9d 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -395,8 +395,8 @@ TEST_F(DragDropControllerTest, DragDropInMultipleViewsMultipleWidgetsTest) {
scoped_ptr<views::Widget> widget2(CreateNewWidget());
DragTestView* drag_view2 = new DragTestView;
AddViewToWidgetAndResize(widget2.get(), drag_view2);
- gfx::Rect widget1_bounds = widget1->GetClientAreaScreenBounds();
- gfx::Rect widget2_bounds = widget2->GetClientAreaScreenBounds();
+ gfx::Rect widget1_bounds = widget1->GetClientAreaBoundsInScreen();
+ gfx::Rect widget2_bounds = widget2->GetClientAreaBoundsInScreen();
widget2->SetBounds(gfx::Rect(widget1_bounds.width(), 0,
widget2_bounds.width(), widget2_bounds.height()));
diff --git a/ash/drag_drop/drag_image_view.cc b/ash/drag_drop/drag_image_view.cc
index cdde40a..7a138f3 100644
--- a/ash/drag_drop/drag_image_view.cc
+++ b/ash/drag_drop/drag_image_view.cc
@@ -41,7 +41,7 @@ DragImageView::~DragImageView() {
widget_->Hide();
}
-void DragImageView::SetScreenBounds(const gfx::Rect& bounds) {
+void DragImageView::SetBoundsInScreen(const gfx::Rect& bounds) {
widget_->SetBounds(bounds);
}
diff --git a/ash/drag_drop/drag_image_view.h b/ash/drag_drop/drag_image_view.h
index 0471c5e..63f718c 100644
--- a/ash/drag_drop/drag_image_view.h
+++ b/ash/drag_drop/drag_image_view.h
@@ -19,8 +19,11 @@ class DragImageView : public views::ImageView {
DragImageView();
virtual ~DragImageView();
- // Sets the bounds of the native widget.
- void SetScreenBounds(const gfx::Rect& bounds);
+ // Sets the bounds of the native widget in screen
+ // coordinates.
+ // TODO(oshima): Looks like this is root window's
+ // coordinate. Change this to screen's coordinate.
+ void SetBoundsInScreen(const gfx::Rect& bounds);
// Sets the position of the native widget.
void SetScreenPosition(const gfx::Point& position);