OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_WIDGET_ROOT_VIEW_H_ | 5 #ifndef VIEWS_WIDGET_ROOT_VIEW_H_ |
6 #define VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define VIEWS_WIDGET_ROOT_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 ///////////////////////////////////////////////////////////////////////////// | 35 ///////////////////////////////////////////////////////////////////////////// |
36 class RootView : public View, | 36 class RootView : public View, |
37 public FocusTraversable { | 37 public FocusTraversable { |
38 public: | 38 public: |
39 static const char kViewClassName[]; | 39 static const char kViewClassName[]; |
40 | 40 |
41 explicit RootView(Widget* widget); | 41 explicit RootView(Widget* widget); |
42 | 42 |
43 virtual ~RootView(); | 43 virtual ~RootView(); |
44 | 44 |
| 45 // Sets the "contents view" of the RootView. This is the single child view |
| 46 // that is responsible for laying out the contents of the widget. |
| 47 void SetContentsView(View* contents_view); |
| 48 |
45 // Layout and Painting functions | 49 // Layout and Painting functions |
46 | 50 |
47 // Overridden from View to implement paint scheduling. | 51 // Overridden from View to implement paint scheduling. |
48 virtual void SchedulePaint(const gfx::Rect& r, bool urgent); | 52 virtual void SchedulePaint(const gfx::Rect& r, bool urgent); |
49 | 53 |
50 // Convenience to schedule the whole view | 54 // Convenience to schedule the whole view |
51 virtual void SchedulePaint(); | 55 virtual void SchedulePaint(); |
52 | 56 |
53 // Convenience to schedule a paint given some ints | 57 // Convenience to schedule a paint given some ints |
54 virtual void SchedulePaint(int x, int y, int w, int h); | 58 virtual void SchedulePaint(int x, int y, int w, int h); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 343 |
340 #ifndef NDEBUG | 344 #ifndef NDEBUG |
341 // True if we're currently processing paint. | 345 // True if we're currently processing paint. |
342 bool is_processing_paint_; | 346 bool is_processing_paint_; |
343 #endif | 347 #endif |
344 }; | 348 }; |
345 | 349 |
346 } // namespace views | 350 } // namespace views |
347 | 351 |
348 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ | 352 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ |
OLD | NEW |