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

Side by Side Diff: views/controls/resize_area.h

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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
« no previous file with comments | « views/controls/menu/menu_host_root_view.cc ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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 VIEWS_CONTROLS_RESIZE_AREA_H_ 5 #ifndef VIEWS_CONTROLS_RESIZE_AREA_H_
6 #define VIEWS_CONTROLS_RESIZE_AREA_H_ 6 #define VIEWS_CONTROLS_RESIZE_AREA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "views/view.h" 11 #include "views/view.h"
(...skipping 27 matching lines...) Expand all
39 39
40 explicit ResizeArea(ResizeAreaDelegate* delegate); 40 explicit ResizeArea(ResizeAreaDelegate* delegate);
41 virtual ~ResizeArea(); 41 virtual ~ResizeArea();
42 42
43 // Overridden from views::View: 43 // Overridden from views::View:
44 virtual std::string GetClassName() const OVERRIDE; 44 virtual std::string GetClassName() const OVERRIDE;
45 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, 45 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type,
46 const gfx::Point& p) OVERRIDE; 46 const gfx::Point& p) OVERRIDE;
47 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 47 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
48 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 48 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
49 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled) 49 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
50 OVERRIDE; 50 virtual void OnMouseCaptureLost() OVERRIDE;
51 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 51 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
52 52
53 private: 53 private:
54 // Report the amount the user resized by to the delegate, accounting for 54 // Report the amount the user resized by to the delegate, accounting for
55 // directionality. 55 // directionality.
56 void ReportResizeAmount(int resize_amount, bool last_update); 56 void ReportResizeAmount(int resize_amount, bool last_update);
57 57
58 // The delegate to notify when we have updates. 58 // The delegate to notify when we have updates.
59 ResizeAreaDelegate* delegate_; 59 ResizeAreaDelegate* delegate_;
60 60
61 // The mouse position at start (in screen coordinates). 61 // The mouse position at start (in screen coordinates).
62 int initial_position_; 62 int initial_position_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(ResizeArea); 64 DISALLOW_COPY_AND_ASSIGN(ResizeArea);
65 }; 65 };
66 66
67 } // namespace views 67 } // namespace views
68 68
69 #endif // VIEWS_CONTROLS_RESIZE_AREA_H_ 69 #endif // VIEWS_CONTROLS_RESIZE_AREA_H_
OLDNEW
« no previous file with comments | « views/controls/menu/menu_host_root_view.cc ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698