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

Side by Side Diff: ui/views/view.h

Issue 1029943002: views: Make View::Paint non-virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paint-virtual: . Created 5 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
« no previous file with comments | « ui/app_list/views/app_list_view.cc ('k') | ui/views/view_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // transformations are applied to it to convert it into the parent coordinate 490 // transformations are applied to it to convert it into the parent coordinate
491 // system before propagating SchedulePaint up the view hierarchy. 491 // system before propagating SchedulePaint up the view hierarchy.
492 // TODO(beng): Make protected. 492 // TODO(beng): Make protected.
493 virtual void SchedulePaint(); 493 virtual void SchedulePaint();
494 virtual void SchedulePaintInRect(const gfx::Rect& r); 494 virtual void SchedulePaintInRect(const gfx::Rect& r);
495 495
496 // Called by the framework to paint a View. Performs translation and clipping 496 // Called by the framework to paint a View. Performs translation and clipping
497 // for View coordinates and language direction as required, allows the View 497 // for View coordinates and language direction as required, allows the View
498 // to paint itself via the various OnPaint*() event handlers and then paints 498 // to paint itself via the various OnPaint*() event handlers and then paints
499 // the hierarchy beneath it. 499 // the hierarchy beneath it.
500 virtual void Paint(gfx::Canvas* canvas, const CullSet& cull_set); 500 void Paint(gfx::Canvas* canvas, const CullSet& cull_set);
501 501
502 // The background object is owned by this object and may be NULL. 502 // The background object is owned by this object and may be NULL.
503 void set_background(Background* b); 503 void set_background(Background* b);
504 const Background* background() const { return background_.get(); } 504 const Background* background() const { return background_.get(); }
505 Background* background() { return background_.get(); } 505 Background* background() { return background_.get(); }
506 506
507 // The border object is owned by this object and may be NULL. 507 // The border object is owned by this object and may be NULL.
508 virtual void SetBorder(scoped_ptr<Border> b); 508 virtual void SetBorder(scoped_ptr<Border> b);
509 const Border* border() const { return border_.get(); } 509 const Border* border() const { return border_.get(); }
510 Border* border() { return border_.get(); } 510 Border* border() { return border_.get(); }
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 // Belongs to this view, but it's reference-counted on some platforms 1604 // Belongs to this view, but it's reference-counted on some platforms
1605 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1605 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1606 NativeViewAccessibility* native_view_accessibility_; 1606 NativeViewAccessibility* native_view_accessibility_;
1607 1607
1608 DISALLOW_COPY_AND_ASSIGN(View); 1608 DISALLOW_COPY_AND_ASSIGN(View);
1609 }; 1609 };
1610 1610
1611 } // namespace views 1611 } // namespace views
1612 1612
1613 #endif // UI_VIEWS_VIEW_H_ 1613 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698