| Index: trunk/src/ash/wm/gestures/system_pinch_handler.cc
|
| ===================================================================
|
| --- trunk/src/ash/wm/gestures/system_pinch_handler.cc (revision 244088)
|
| +++ trunk/src/ash/wm/gestures/system_pinch_handler.cc (working copy)
|
| @@ -30,6 +30,7 @@
|
|
|
| SystemPinchHandler::SystemPinchHandler(aura::Window* target)
|
| : target_(target),
|
| + phantom_(target),
|
| phantom_state_(PHANTOM_WINDOW_NORMAL),
|
| pinch_factor_(1.) {
|
| widget_ = views::Widget::GetWidgetForNativeWindow(target_);
|
| @@ -71,16 +72,13 @@
|
| pinch_factor_ *= event.details().scale();
|
| gfx::Rect bounds =
|
| GetPhantomWindowScreenBounds(target_, event.location());
|
| - if (phantom_state_ != PHANTOM_WINDOW_NORMAL || phantom_.get()) {
|
| - if (!phantom_.get())
|
| - phantom_.reset(new internal::PhantomWindowController(target_));
|
| - phantom_->Show(bounds);
|
| - }
|
| + if (phantom_state_ != PHANTOM_WINDOW_NORMAL || phantom_.IsShowing())
|
| + phantom_.Show(bounds);
|
| break;
|
| }
|
|
|
| case ui::ET_GESTURE_MULTIFINGER_SWIPE: {
|
| - phantom_.reset();
|
| + phantom_.Hide();
|
| pinch_factor_ = 1.0;
|
| phantom_state_ = PHANTOM_WINDOW_NORMAL;
|
|
|
|
|