| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // EventFilter overrides: | 45 // EventFilter overrides: |
| 46 virtual bool PreHandleKeyEvent(aura::Window* target, | 46 virtual bool PreHandleKeyEvent(aura::Window* target, |
| 47 ui::KeyEvent* event) OVERRIDE; | 47 ui::KeyEvent* event) OVERRIDE; |
| 48 virtual bool PreHandleMouseEvent(aura::Window* target, | 48 virtual bool PreHandleMouseEvent(aura::Window* target, |
| 49 ui::MouseEvent* event) OVERRIDE; | 49 ui::MouseEvent* event) OVERRIDE; |
| 50 virtual ui::TouchStatus PreHandleTouchEvent( | 50 virtual ui::TouchStatus PreHandleTouchEvent( |
| 51 aura::Window* target, | 51 aura::Window* target, |
| 52 ui::TouchEvent* event) OVERRIDE; | 52 ui::TouchEvent* event) OVERRIDE; |
| 53 virtual ui::GestureStatus PreHandleGestureEvent( | 53 virtual ui::GestureStatus PreHandleGestureEvent( |
| 54 aura::Window* target, | 54 aura::Window* target, |
| 55 ui::GestureEventImpl* event) OVERRIDE; | 55 ui::GestureEvent* event) OVERRIDE; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 FrameMaximizeButton* button_; | 58 FrameMaximizeButton* button_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(EscapeEventFilter); | 60 DISALLOW_COPY_AND_ASSIGN(EscapeEventFilter); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 FrameMaximizeButton::EscapeEventFilter::EscapeEventFilter( | 63 FrameMaximizeButton::EscapeEventFilter::EscapeEventFilter( |
| 64 FrameMaximizeButton* button) | 64 FrameMaximizeButton* button) |
| 65 : button_(button) { | 65 : button_(button) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 ui::TouchStatus FrameMaximizeButton::EscapeEventFilter::PreHandleTouchEvent( | 89 ui::TouchStatus FrameMaximizeButton::EscapeEventFilter::PreHandleTouchEvent( |
| 90 aura::Window* target, | 90 aura::Window* target, |
| 91 ui::TouchEvent* event) { | 91 ui::TouchEvent* event) { |
| 92 return ui::TOUCH_STATUS_UNKNOWN; | 92 return ui::TOUCH_STATUS_UNKNOWN; |
| 93 } | 93 } |
| 94 | 94 |
| 95 ui::GestureStatus FrameMaximizeButton::EscapeEventFilter::PreHandleGestureEvent( | 95 ui::GestureStatus FrameMaximizeButton::EscapeEventFilter::PreHandleGestureEvent( |
| 96 aura::Window* target, | 96 aura::Window* target, |
| 97 ui::GestureEventImpl* event) { | 97 ui::GestureEvent* event) { |
| 98 return ui::GESTURE_STATUS_UNKNOWN; | 98 return ui::GESTURE_STATUS_UNKNOWN; |
| 99 } | 99 } |
| 100 | 100 |
| 101 // FrameMaximizeButton --------------------------------------------------------- | 101 // FrameMaximizeButton --------------------------------------------------------- |
| 102 | 102 |
| 103 FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener, | 103 FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener, |
| 104 views::NonClientFrameView* frame) | 104 views::NonClientFrameView* frame) |
| 105 : ImageButton(listener), | 105 : ImageButton(listener), |
| 106 frame_(frame), | 106 frame_(frame), |
| 107 is_snap_enabled_(false), | 107 is_snap_enabled_(false), |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |