| 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 #ifndef ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 5 #ifndef ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
| 6 #define ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 6 #define ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/timer.h" | 10 #include "base/timer.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // ImageButton overrides: | 31 // ImageButton overrides: |
| 32 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 32 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 33 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | 33 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
| 34 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 34 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; |
| 35 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 35 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 36 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 36 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 37 virtual void OnMouseCaptureLost() OVERRIDE; | 37 virtual void OnMouseCaptureLost() OVERRIDE; |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 // ImageButton overrides: | 40 // ImageButton overrides: |
| 41 virtual SkBitmap GetImageToPaint() OVERRIDE; | 41 virtual gfx::ImageSkia GetImageToPaint() OVERRIDE; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 class EscapeEventFilter; | 44 class EscapeEventFilter; |
| 45 | 45 |
| 46 // Where to snap to. | 46 // Where to snap to. |
| 47 enum SnapType { | 47 enum SnapType { |
| 48 SNAP_LEFT, | 48 SNAP_LEFT, |
| 49 SNAP_RIGHT, | 49 SNAP_RIGHT, |
| 50 SNAP_MAXIMIZE, | 50 SNAP_MAXIMIZE, |
| 51 SNAP_MINIMIZE, | 51 SNAP_MINIMIZE, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 scoped_ptr<EscapeEventFilter> escape_event_filter_; | 104 scoped_ptr<EscapeEventFilter> escape_event_filter_; |
| 105 | 105 |
| 106 base::OneShotTimer<FrameMaximizeButton> update_timer_; | 106 base::OneShotTimer<FrameMaximizeButton> update_timer_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); | 108 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace ash | 111 } // namespace ash |
| 112 | 112 |
| 113 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 113 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
| OLD | NEW |