OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_DRAG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_DRAG_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "ui/gfx/point.h" |
| 11 |
| 12 class Panel; |
| 13 |
| 14 // Responsible for handling drags initiated for all panel strips, including |
| 15 // both intra-strip and inter-strip drags. |
| 16 class PanelDragController { |
| 17 public: |
| 18 PanelDragController(); |
| 19 ~PanelDragController(); |
| 20 |
| 21 void StartDragging(Panel* panel); |
| 22 void Drag(int delta_x, int delta_y); |
| 23 void EndDragging(bool cancelled); |
| 24 |
| 25 Panel* dragging_panel() const { return dragging_panel_; } |
| 26 |
| 27 private: |
| 28 // Panel currently being dragged. |
| 29 Panel* dragging_panel_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(PanelDragController); |
| 32 }; |
| 33 |
| 34 #endif // CHROME_BROWSER_UI_PANELS_PANEL_DRAG_CONTROLLER_H_ |
OLD | NEW |