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

Side by Side Diff: views/controls/single_split_view.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/scrollbar/bitmap_scroll_bar.cc ('k') | views/controls/single_split_view.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_SINGLE_SPLIT_VIEW_H_ 5 #ifndef VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_
6 #define VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_ 6 #define VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "views/view.h" 10 #include "views/view.h"
11 11
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void CalculateChildrenBounds(const gfx::Rect& bounds, 73 void CalculateChildrenBounds(const gfx::Rect& bounds,
74 gfx::Rect* leading_bounds, 74 gfx::Rect* leading_bounds,
75 gfx::Rect* trailing_bounds) const; 75 gfx::Rect* trailing_bounds) const;
76 76
77 void SetAccessibleName(const string16& name); 77 void SetAccessibleName(const string16& name);
78 78
79 protected: 79 protected:
80 // View overrides. 80 // View overrides.
81 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; 81 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE;
82 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; 82 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE;
83 virtual void OnMouseReleased(const MouseEvent& event, bool canceled) OVERRIDE; 83 virtual void OnMouseCaptureLost() OVERRIDE;
84 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 84 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
85 85
86 private: 86 private:
87 // This test calls OnMouse* functions. 87 // This test calls OnMouse* functions.
88 FRIEND_TEST_ALL_PREFIXES(SingleSplitViewTest, MouseDrag); 88 FRIEND_TEST_ALL_PREFIXES(SingleSplitViewTest, MouseDrag);
89 89
90 // Returns true if |x| or |y| is over the divider. 90 // Returns true if |x| or |y| is over the divider.
91 bool IsPointInDivider(const gfx::Point& p); 91 bool IsPointInDivider(const gfx::Point& p);
92 92
93 // Calculates the new |divider_offset| based on the changes of split view 93 // Calculates the new |divider_offset| based on the changes of split view
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 // The accessible name of this view. 134 // The accessible name of this view.
135 string16 accessible_name_; 135 string16 accessible_name_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(SingleSplitView); 137 DISALLOW_COPY_AND_ASSIGN(SingleSplitView);
138 }; 138 };
139 139
140 } // namespace views 140 } // namespace views
141 141
142 #endif // VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_ 142 #endif // VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_
OLDNEW
« no previous file with comments | « views/controls/scrollbar/bitmap_scroll_bar.cc ('k') | views/controls/single_split_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698