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

Side by Side Diff: chrome/browser/ui/panels/panel_drag_controller.h

Issue 9403035: Refactor intra-strip panel drags by introducing PanelDragController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 10 months 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698