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

Unified Diff: trunk/src/ash/wm/gestures/system_pinch_handler.cc

Issue 132183006: Revert 244050 "This is part 1 of implemeting phantom windows for..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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
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;
« no previous file with comments | « trunk/src/ash/wm/gestures/system_pinch_handler.h ('k') | trunk/src/ash/wm/workspace/phantom_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698