Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame/caption_buttons/frame_size_button.h" | 5 #include "ash/frame/caption_buttons/frame_size_button.h" |
| 6 | 6 |
| 7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/touch/touch_uma.h" | 10 #include "ash/touch/touch_uma.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 | 113 |
| 114 if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN || | 114 if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN || |
| 115 event->type() == ui::ET_GESTURE_SCROLL_UPDATE) { | 115 event->type() == ui::ET_GESTURE_SCROLL_UPDATE) { |
| 116 UpdateSnapType(*event); | 116 UpdateSnapType(*event); |
| 117 event->SetHandled(); | 117 event->SetHandled(); |
| 118 return; | 118 return; |
| 119 } | 119 } |
| 120 | 120 |
| 121 if (event->type() == ui::ET_GESTURE_TAP || | 121 if (event->type() == ui::ET_GESTURE_TAP || |
| 122 event->type() == ui::ET_GESTURE_SCROLL_END || | 122 event->type() == ui::ET_GESTURE_SCROLL_END || |
| 123 event->type() == ui::ET_SCROLL_FLING_START || | 123 event->type() == ui::ET_SCROLL_FLING_START) { |
| 124 event->type() == ui::ET_GESTURE_END) { | |
|
tdresser
2014/07/24 18:17:22
This changes behavior, doesn't it?
Are we ok with
sadrul
2014/07/24 19:12:13
Looks like the code starts doing things in respons
tdresser
2014/07/24 19:16:44
Shouldn't it also listen to LONG_TAP?
sadrul
2014/07/24 19:21:34
Good point. That will probably be necessary here,
tdanderson
2014/07/25 17:16:10
Thanks for pointing this out.
| |
| 125 if (CommitSnap(*event)) { | 124 if (CommitSnap(*event)) { |
| 126 if (event->type() == ui::ET_GESTURE_TAP) { | 125 if (event->type() == ui::ET_GESTURE_TAP) { |
| 127 TouchUMA::GetInstance()->RecordGestureAction( | 126 TouchUMA::GetInstance()->RecordGestureAction( |
| 128 TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP); | 127 TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP); |
| 129 } | 128 } |
| 130 event->SetHandled(); | 129 event->SetHandled(); |
| 131 return; | 130 return; |
| 132 } | 131 } |
| 133 } | 132 } |
| 134 | 133 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 void FrameSizeButton::SetButtonsToNormalMode( | 274 void FrameSizeButton::SetButtonsToNormalMode( |
| 276 FrameSizeButtonDelegate::Animate animate) { | 275 FrameSizeButtonDelegate::Animate animate) { |
| 277 in_snap_mode_ = false; | 276 in_snap_mode_ = false; |
| 278 snap_type_ = SNAP_NONE; | 277 snap_type_ = SNAP_NONE; |
| 279 set_buttons_to_snap_mode_timer_.Stop(); | 278 set_buttons_to_snap_mode_timer_.Stop(); |
| 280 delegate_->SetButtonsToNormal(animate); | 279 delegate_->SetButtonsToNormal(animate); |
| 281 phantom_window_controller_.reset(); | 280 phantom_window_controller_.reset(); |
| 282 } | 281 } |
| 283 | 282 |
| 284 } // namespace ash | 283 } // namespace ash |
| OLD | NEW |