| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_VIEW_H_ | 5 #ifndef CHROME_VIEWS_VIEW_H_ |
| 6 #define CHROME_VIEWS_VIEW_H_ | 6 #define CHROME_VIEWS_VIEW_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 | 933 |
| 934 // Return whether a view is owned by its parent. See SetParentOwned() | 934 // Return whether a view is owned by its parent. See SetParentOwned() |
| 935 bool IsParentOwned() const; | 935 bool IsParentOwned() const; |
| 936 | 936 |
| 937 // Return the receiving view's class name. A view class is a string which | 937 // Return the receiving view's class name. A view class is a string which |
| 938 // uniquely identifies the view class. It is intended to be used as a way to | 938 // uniquely identifies the view class. It is intended to be used as a way to |
| 939 // find out during run time if a view can be safely casted to a specific view | 939 // find out during run time if a view can be safely casted to a specific view |
| 940 // subclass. The default implementation returns kViewClassName. | 940 // subclass. The default implementation returns kViewClassName. |
| 941 virtual std::string GetClassName() const; | 941 virtual std::string GetClassName() const; |
| 942 | 942 |
| 943 // Returns the first ancestor, starting at this, whose class name is |name|. |
| 944 // Returns null if no ancestor has the class name |name|. |
| 945 View* GetAncestorWithClassName(const std::string& name); |
| 946 |
| 943 // Returns the visible bounds of the receiver in the receivers coordinate | 947 // Returns the visible bounds of the receiver in the receivers coordinate |
| 944 // system. | 948 // system. |
| 945 // | 949 // |
| 946 // When traversing the View hierarchy in order to compute the bounds, the | 950 // When traversing the View hierarchy in order to compute the bounds, the |
| 947 // function takes into account the mirroring setting for each View and | 951 // function takes into account the mirroring setting for each View and |
| 948 // therefore it will return the mirrored version of the visible bounds if | 952 // therefore it will return the mirrored version of the visible bounds if |
| 949 // need be. | 953 // need be. |
| 950 gfx::Rect GetVisibleBounds(); | 954 gfx::Rect GetVisibleBounds(); |
| 951 | 955 |
| 952 // Subclasses that contain traversable children that are not directly | 956 // Subclasses that contain traversable children that are not directly |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 // is going to be flipped horizontally (using the appropriate transform) on | 1337 // is going to be flipped horizontally (using the appropriate transform) on |
| 1334 // right-to-left locales for this View. | 1338 // right-to-left locales for this View. |
| 1335 bool flip_canvas_on_paint_for_rtl_ui_; | 1339 bool flip_canvas_on_paint_for_rtl_ui_; |
| 1336 | 1340 |
| 1337 DISALLOW_COPY_AND_ASSIGN(View); | 1341 DISALLOW_COPY_AND_ASSIGN(View); |
| 1338 }; | 1342 }; |
| 1339 | 1343 |
| 1340 } // namespace views | 1344 } // namespace views |
| 1341 | 1345 |
| 1342 #endif // CHROME_VIEWS_VIEW_H_ | 1346 #endif // CHROME_VIEWS_VIEW_H_ |
| OLD | NEW |