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

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

Issue 11364062: ui: Remove TouchStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
« no previous file with comments | « ash/wm/window_modality_controller.cc ('k') | ui/aura/event_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/maximize_bubble_controller.h" 10 #include "ash/wm/maximize_bubble_controller.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class FrameMaximizeButton::EscapeEventFilter : public aura::EventFilter { 44 class FrameMaximizeButton::EscapeEventFilter : public aura::EventFilter {
45 public: 45 public:
46 explicit EscapeEventFilter(FrameMaximizeButton* button); 46 explicit EscapeEventFilter(FrameMaximizeButton* button);
47 virtual ~EscapeEventFilter(); 47 virtual ~EscapeEventFilter();
48 48
49 // EventFilter overrides: 49 // EventFilter overrides:
50 virtual bool PreHandleKeyEvent(aura::Window* target, 50 virtual bool PreHandleKeyEvent(aura::Window* target,
51 ui::KeyEvent* event) OVERRIDE; 51 ui::KeyEvent* event) OVERRIDE;
52 virtual bool PreHandleMouseEvent(aura::Window* target, 52 virtual bool PreHandleMouseEvent(aura::Window* target,
53 ui::MouseEvent* event) OVERRIDE; 53 ui::MouseEvent* event) OVERRIDE;
54 virtual ui::TouchStatus PreHandleTouchEvent( 54 virtual ui::EventResult PreHandleTouchEvent(
55 aura::Window* target, 55 aura::Window* target,
56 ui::TouchEvent* event) OVERRIDE; 56 ui::TouchEvent* event) OVERRIDE;
57 virtual ui::EventResult PreHandleGestureEvent( 57 virtual ui::EventResult PreHandleGestureEvent(
58 aura::Window* target, 58 aura::Window* target,
59 ui::GestureEvent* event) OVERRIDE; 59 ui::GestureEvent* event) OVERRIDE;
60 60
61 private: 61 private:
62 FrameMaximizeButton* button_; 62 FrameMaximizeButton* button_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(EscapeEventFilter); 64 DISALLOW_COPY_AND_ASSIGN(EscapeEventFilter);
(...skipping 18 matching lines...) Expand all
83 } 83 }
84 return false; 84 return false;
85 } 85 }
86 86
87 bool FrameMaximizeButton::EscapeEventFilter::PreHandleMouseEvent( 87 bool FrameMaximizeButton::EscapeEventFilter::PreHandleMouseEvent(
88 aura::Window* target, 88 aura::Window* target,
89 ui::MouseEvent* event) { 89 ui::MouseEvent* event) {
90 return false; 90 return false;
91 } 91 }
92 92
93 ui::TouchStatus FrameMaximizeButton::EscapeEventFilter::PreHandleTouchEvent( 93 ui::EventResult FrameMaximizeButton::EscapeEventFilter::PreHandleTouchEvent(
94 aura::Window* target, 94 aura::Window* target,
95 ui::TouchEvent* event) { 95 ui::TouchEvent* event) {
96 return ui::TOUCH_STATUS_UNKNOWN; 96 return ui::ER_UNHANDLED;
97 } 97 }
98 98
99 ui::EventResult FrameMaximizeButton::EscapeEventFilter::PreHandleGestureEvent( 99 ui::EventResult FrameMaximizeButton::EscapeEventFilter::PreHandleGestureEvent(
100 aura::Window* target, 100 aura::Window* target,
101 ui::GestureEvent* event) { 101 ui::GestureEvent* event) {
102 return ui::ER_UNHANDLED; 102 return ui::ER_UNHANDLED;
103 } 103 }
104 104
105 // FrameMaximizeButton --------------------------------------------------------- 105 // FrameMaximizeButton ---------------------------------------------------------
106 106
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 return FRAME_STATE_SNAP_LEFT; 573 return FRAME_STATE_SNAP_LEFT;
574 if (bounds.right() == screen.right()) 574 if (bounds.right() == screen.right())
575 return FRAME_STATE_SNAP_RIGHT; 575 return FRAME_STATE_SNAP_RIGHT;
576 // If we come here, it is likely caused by the fact that the 576 // If we come here, it is likely caused by the fact that the
577 // "VerticalResizeDoubleClick" stored a restore rectangle. In that case 577 // "VerticalResizeDoubleClick" stored a restore rectangle. In that case
578 // we allow all maximize operations (and keep the restore rectangle). 578 // we allow all maximize operations (and keep the restore rectangle).
579 return FRAME_STATE_NONE; 579 return FRAME_STATE_NONE;
580 } 580 }
581 581
582 } // namespace ash 582 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_modality_controller.cc ('k') | ui/aura/event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698