OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |