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

Unified Diff: ash/drag_drop/drag_drop_controller.cc

Issue 382673002: Fixes for re-enabling more MSVC level 4 warnings: misc edition #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/drag_drop/drag_drop_controller.cc
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index b1a4289d30f0d97ed5a44d5f37fafe48b3f617ad..2ff526fe7681f6452321be3ff29e974547d38d28 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -244,11 +244,12 @@ int DragDropController::StartDragAndDrop(
void DragDropController::DragUpdate(aura::Window* target,
const ui::LocatedEvent& event) {
- aura::client::DragDropDelegate* delegate = NULL;
int op = ui::DragDropTypes::DRAG_NONE;
if (target != drag_window_) {
if (drag_window_) {
- if ((delegate = aura::client::GetDragDropDelegate(drag_window_)))
+ aura::client::DragDropDelegate* delegate =
+ aura::client::GetDragDropDelegate(drag_window_);
+ if (delegate)
delegate->OnDragExited();
if (drag_window_ != drag_source_window_)
drag_window_->RemoveObserver(this);
@@ -257,7 +258,9 @@ void DragDropController::DragUpdate(aura::Window* target,
// We are already an observer of |drag_source_window_| so no need to add.
if (drag_window_ != drag_source_window_)
drag_window_->AddObserver(this);
- if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
+ aura::client::DragDropDelegate* delegate =
+ aura::client::GetDragDropDelegate(drag_window_);
+ if (delegate) {
ui::DropTargetEvent e(*drag_data_,
event.location(),
event.root_location(),
@@ -266,7 +269,9 @@ void DragDropController::DragUpdate(aura::Window* target,
delegate->OnDragEntered(e);
}
} else {
- if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
+ aura::client::DragDropDelegate* delegate =
+ aura::client::GetDragDropDelegate(drag_window_);
+ if (delegate) {
ui::DropTargetEvent e(*drag_data_,
event.location(),
event.root_location(),
@@ -298,7 +303,6 @@ void DragDropController::DragUpdate(aura::Window* target,
void DragDropController::Drop(aura::Window* target,
const ui::LocatedEvent& event) {
ash::Shell::GetInstance()->cursor_manager()->SetCursor(ui::kCursorPointer);
- aura::client::DragDropDelegate* delegate = NULL;
// We must guarantee that a target gets a OnDragEntered before Drop. WebKit
// depends on not getting a Drop without DragEnter. This behavior is
@@ -307,7 +311,9 @@ void DragDropController::Drop(aura::Window* target,
DragUpdate(target, event);
DCHECK(target == drag_window_);
- if ((delegate = aura::client::GetDragDropDelegate(target))) {
+ aura::client::DragDropDelegate* delegate =
+ aura::client::GetDragDropDelegate(target);
+ if (delegate) {
ui::DropTargetEvent e(
*drag_data_, event.location(), event.root_location(), drag_operation_);
e.set_flags(event.flags());
« no previous file with comments | « no previous file | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698