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

Side by Side Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/workspace/frame_maximize_button.h" 5 #include "ash/wm/workspace/frame_maximize_button.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 ImageButton::OnMouseReleased(event); 239 ImageButton::OnMouseReleased(event);
240 // At this point |this| might be already destroyed. 240 // At this point |this| might be already destroyed.
241 } 241 }
242 242
243 void FrameMaximizeButton::OnMouseCaptureLost() { 243 void FrameMaximizeButton::OnMouseCaptureLost() {
244 Cancel(false); 244 Cancel(false);
245 ImageButton::OnMouseCaptureLost(); 245 ImageButton::OnMouseCaptureLost();
246 } 246 }
247 247
248 ui::GestureStatus FrameMaximizeButton::OnGestureEvent( 248 ui::GestureStatus FrameMaximizeButton::OnGestureEvent(
249 const views::GestureEvent& event) { 249 const ui::GestureEvent& event) {
250 if (event.type() == ui::ET_GESTURE_TAP_DOWN) { 250 if (event.type() == ui::ET_GESTURE_TAP_DOWN) {
251 is_snap_enabled_ = true; 251 is_snap_enabled_ = true;
252 ProcessStartEvent(event); 252 ProcessStartEvent(event);
253 return ui::GESTURE_STATUS_CONSUMED; 253 return ui::GESTURE_STATUS_CONSUMED;
254 } 254 }
255 255
256 if (event.type() == ui::ET_GESTURE_TAP || 256 if (event.type() == ui::ET_GESTURE_TAP ||
257 event.type() == ui::ET_GESTURE_SCROLL_END) { 257 event.type() == ui::ET_GESTURE_SCROLL_END) {
258 if (event.type() == ui::ET_GESTURE_TAP) 258 if (event.type() == ui::ET_GESTURE_TAP)
259 snap_type_ = SnapTypeForLocation(event.location()); 259 snap_type_ = SnapTypeForLocation(event.location());
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 break; 490 break;
491 case SNAP_RESTORE: 491 case SNAP_RESTORE:
492 frame_->GetWidget()->Restore(); 492 frame_->GetWidget()->Restore();
493 break; 493 break;
494 case SNAP_NONE: 494 case SNAP_NONE:
495 NOTREACHED(); 495 NOTREACHED();
496 } 496 }
497 } 497 }
498 498
499 } // namespace ash 499 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.h ('k') | chrome/browser/automation/automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698