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

Side by Side Diff: ash/wm/window_resizer.h

Issue 10912098: Fix crash if window is destroyed while dragging it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: virtual Created 8 years, 3 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
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_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_WINDOW_RESIZER_H_
6 #define ASH_WM_WINDOW_RESIZER_H_ 6 #define ASH_WM_WINDOW_RESIZER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // of the window supplied to the constructor. |event_flags| is the event 50 // of the window supplied to the constructor. |event_flags| is the event
51 // flags from the event. 51 // flags from the event.
52 virtual void Drag(const gfx::Point& location, int event_flags) = 0; 52 virtual void Drag(const gfx::Point& location, int event_flags) = 0;
53 53
54 // Invoked to complete the drag. 54 // Invoked to complete the drag.
55 virtual void CompleteDrag(int event_flags) = 0; 55 virtual void CompleteDrag(int event_flags) = 0;
56 56
57 // Reverts the drag. 57 // Reverts the drag.
58 virtual void RevertDrag() = 0; 58 virtual void RevertDrag() = 0;
59 59
60 // Returns the target window the resizer was created for.
61 virtual aura::Window* GetTarget() = 0;
62
60 protected: 63 protected:
61 struct Details { 64 struct Details {
62 Details(); 65 Details();
63 Details(aura::Window* window, 66 Details(aura::Window* window,
64 const gfx::Point& location, 67 const gfx::Point& location,
65 int window_component); 68 int window_component);
66 ~Details(); 69 ~Details();
67 70
68 // The window we're resizing. 71 // The window we're resizing.
69 aura::Window* window; 72 aura::Window* window;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Returns the height of the drag. 128 // Returns the height of the drag.
126 static int GetHeightForDrag(const Details& details, 129 static int GetHeightForDrag(const Details& details,
127 int min_height, 130 int min_height,
128 int* delta_y, 131 int* delta_y,
129 int grid_size); 132 int grid_size);
130 }; 133 };
131 134
132 } // namespace aura 135 } // namespace aura
133 136
134 #endif // ASH_WM_WINDOW_RESIZER_H_ 137 #endif // ASH_WM_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_filter.cc ('k') | ash/wm/workspace/workspace_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698