| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_VIEWS_CONTROLS_RESIZE_AREA_H_ | 5 #ifndef UI_VIEWS_CONTROLS_RESIZE_AREA_H_ |
| 6 #define UI_VIEWS_CONTROLS_RESIZE_AREA_H_ | 6 #define UI_VIEWS_CONTROLS_RESIZE_AREA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 explicit ResizeArea(ResizeAreaDelegate* delegate); | 26 explicit ResizeArea(ResizeAreaDelegate* delegate); |
| 27 ~ResizeArea() override; | 27 ~ResizeArea() override; |
| 28 | 28 |
| 29 // Overridden from views::View: | 29 // Overridden from views::View: |
| 30 const char* GetClassName() const override; | 30 const char* GetClassName() const override; |
| 31 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; | 31 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; |
| 32 bool OnMousePressed(const ui::MouseEvent& event) override; | 32 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 33 bool OnMouseDragged(const ui::MouseEvent& event) override; | 33 bool OnMouseDragged(const ui::MouseEvent& event) override; |
| 34 void OnMouseReleased(const ui::MouseEvent& event) override; | 34 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 35 void OnMouseCaptureLost() override; | 35 void OnMouseCaptureLost() override; |
| 36 void GetAccessibleState(ui::AXViewState* state) override; | 36 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 // Report the amount the user resized by to the delegate, accounting for | 39 // Report the amount the user resized by to the delegate, accounting for |
| 40 // directionality. | 40 // directionality. |
| 41 void ReportResizeAmount(int resize_amount, bool last_update); | 41 void ReportResizeAmount(int resize_amount, bool last_update); |
| 42 | 42 |
| 43 // The delegate to notify when we have updates. | 43 // The delegate to notify when we have updates. |
| 44 ResizeAreaDelegate* delegate_; | 44 ResizeAreaDelegate* delegate_; |
| 45 | 45 |
| 46 // The mouse position at start (in screen coordinates). | 46 // The mouse position at start (in screen coordinates). |
| 47 int initial_position_; | 47 int initial_position_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ResizeArea); | 49 DISALLOW_COPY_AND_ASSIGN(ResizeArea); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace views | 52 } // namespace views |
| 53 | 53 |
| 54 #endif // UI_VIEWS_CONTROLS_RESIZE_AREA_H_ | 54 #endif // UI_VIEWS_CONTROLS_RESIZE_AREA_H_ |
| OLD | NEW |