summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 23:48:30 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 23:48:30 +0000
commitde56c47982b4cb163f5f29fadd02878f9b485ad1 (patch)
treec9885eb42e14e78b40d8c7e249df4c51a5db3109
parent38d79e094daecdfebbf7b22bafd312c55892e1ec (diff)
downloadchromium_src-de56c47982b4cb163f5f29fadd02878f9b485ad1.zip
chromium_src-de56c47982b4cb163f5f29fadd02878f9b485ad1.tar.gz
chromium_src-de56c47982b4cb163f5f29fadd02878f9b485ad1.tar.bz2
cleanup: Use gfx::Display::kInvalidDisplayID instead of -1.
The constant has been introduced recently. BUG=None TEST=None TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10874020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152872 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/wm/workspace/phantom_window_controller.cc6
-rw-r--r--ash/wm/workspace/phantom_window_controller.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/ash/wm/workspace/phantom_window_controller.cc b/ash/wm/workspace/phantom_window_controller.cc
index 984ce0e..b04d283d 100644
--- a/ash/wm/workspace/phantom_window_controller.cc
+++ b/ash/wm/workspace/phantom_window_controller.cc
@@ -207,10 +207,12 @@ void PhantomWindowController::SetBoundsInternal(const gfx::Rect& bounds) {
aura::Window* window = phantom_widget_->GetNativeWindow();
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(window->GetRootWindow());
- if (screen_position_client && dst_display_.id() != -1)
+ if (screen_position_client &&
+ dst_display_.id() != gfx::Display::kInvalidDisplayID) {
screen_position_client->SetBounds(window, bounds, dst_display_);
- else
+ } else {
phantom_widget_->SetBounds(bounds);
+ }
}
} // namespace internal
diff --git a/ash/wm/workspace/phantom_window_controller.h b/ash/wm/workspace/phantom_window_controller.h
index 8e285e9..86819f0 100644
--- a/ash/wm/workspace/phantom_window_controller.h
+++ b/ash/wm/workspace/phantom_window_controller.h
@@ -94,9 +94,9 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
// Window the phantom is placed beneath.
aura::Window* window_;
- // The display where the phantom is placed. When dst_display_.id() is -1 (i.e.
- // the default), a display nearest to the current |bounds_| is automatically
- // used.
+ // The display where the phantom is placed. When dst_display_.id() is
+ // kInvalidDisplayID (i.e. the default), a display nearest to the current
+ // |bounds_| is automatically used.
gfx::Display dst_display_;
// If set, the phantom window should get stacked below this window.