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

Side by Side Diff: ash/drag_drop/drag_drop_controller.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 | « no previous file | ash/drag_drop/drag_drop_controller_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_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/drag_drop/drag_image_view.h" 7 #include "ash/drag_drop/drag_image_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 drag_drop_in_progress_ = true; 66 drag_drop_in_progress_ = true;
67 67
68 drag_data_ = &data; 68 drag_data_ = &data;
69 drag_operation_ = operation; 69 drag_operation_ = operation;
70 const ui::OSExchangeDataProviderAura& provider = 70 const ui::OSExchangeDataProviderAura& provider =
71 static_cast<const ui::OSExchangeDataProviderAura&>(data.provider()); 71 static_cast<const ui::OSExchangeDataProviderAura&>(data.provider());
72 72
73 drag_image_.reset(new DragImageView); 73 drag_image_.reset(new DragImageView);
74 drag_image_->SetImage(provider.drag_image()); 74 drag_image_->SetImage(provider.drag_image());
75 drag_image_offset_ = provider.drag_image_offset(); 75 drag_image_offset_ = provider.drag_image_offset();
76 drag_image_->SetScreenBounds(gfx::Rect( 76 drag_image_->SetBoundsInScreen(gfx::Rect(
77 root_location.Subtract(drag_image_offset_), 77 root_location.Subtract(drag_image_offset_),
78 drag_image_->GetPreferredSize())); 78 drag_image_->GetPreferredSize()));
79 drag_image_->SetWidgetVisible(true); 79 drag_image_->SetWidgetVisible(true);
80 80
81 drag_window_ = NULL; 81 drag_window_ = NULL;
82 drag_start_location_ = root_location.Subtract(drag_image_offset_); 82 drag_start_location_ = root_location.Subtract(drag_image_offset_);
83 83
84 #if !defined(OS_MACOSX) 84 #if !defined(OS_MACOSX)
85 if (should_block_during_drag_drop_) { 85 if (should_block_during_drag_drop_) {
86 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 86 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 void DragDropController::Cleanup() { 285 void DragDropController::Cleanup() {
286 if (drag_window_) 286 if (drag_window_)
287 drag_window_->RemoveObserver(this); 287 drag_window_->RemoveObserver(this);
288 drag_window_ = NULL; 288 drag_window_ = NULL;
289 drag_data_ = NULL; 289 drag_data_ = NULL;
290 drag_drop_in_progress_ = false; 290 drag_drop_in_progress_ = false;
291 } 291 }
292 292
293 } // namespace internal 293 } // namespace internal
294 } // namespace ash 294 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698