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

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

Issue 10909234: views: Delete painter pointer using scoped_ptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean ups to border.h Created 8 years, 3 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 | « no previous file | ui/views/border.cc » ('j') | ui/views/border.cc » ('J')
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_BORDER_H_ 5 #ifndef UI_VIEWS_BORDER_H_
6 #define UI_VIEWS_BORDER_H_ 6 #define UI_VIEWS_BORDER_H_
7 7
8 #include "base/basictypes.h"
8 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/gfx/insets.h" 10 #include "ui/gfx/insets.h"
tfarina 2012/09/14 14:54:49 We can remove this include and view.h and just for
10 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 #include "ui/views/views_export.h"
11 13
12 namespace gfx{ 14 namespace gfx{
13 class Canvas; 15 class Canvas;
14 } 16 }
15 17
16 namespace views { 18 namespace views {
17 19
18 class Painter; 20 class Painter;
19 class View; 21 class View;
20 22
(...skipping 21 matching lines...) Expand all
42 // Creates a border that is a simple line of the specified thickness and 44 // Creates a border that is a simple line of the specified thickness and
43 // color. 45 // color.
44 static Border* CreateSolidBorder(int thickness, SkColor color); 46 static Border* CreateSolidBorder(int thickness, SkColor color);
45 47
46 // Creates a border for reserving space. The returned border does not 48 // Creates a border for reserving space. The returned border does not
47 // paint anything. 49 // paint anything.
48 static Border* CreateEmptyBorder(int top, int left, int bottom, int right); 50 static Border* CreateEmptyBorder(int top, int left, int bottom, int right);
49 51
50 // Creates a border of the specified color, and specified thickness on each 52 // Creates a border of the specified color, and specified thickness on each
51 // side. 53 // side.
52 static Border* CreateSolidSidedBorder(int top, int left, 54 static Border* CreateSolidSidedBorder(int top, int left,
sky 2012/09/17 14:10:27 each param on its own line.
53 int bottom, int right, 55 int bottom, int right,
54 SkColor color); 56 SkColor color);
55 57
56 // Creates a Border from the specified Painter. The border owns the painter, 58 // Creates a Border from the specified Painter. The border owns the painter,
57 // thus the painter is deleted when the Border is deleted. 59 // thus the painter is deleted when the Border is deleted.
58 static Border* CreateBorderPainter(Painter* painter); 60 static Border* CreateBorderPainter(Painter* painter);
59 61
60 // Renders the border for the specified view. 62 // Renders the border for the specified view.
61 virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0; 63 virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0;
62 64
63 // Sets the specified insets to the the border insets. 65 // Sets the specified insets to the the border insets.
64 virtual void GetInsets(gfx::Insets* insets) const = 0; 66 virtual void GetInsets(gfx::Insets* insets) const = 0;
65 67
66 private: 68 private:
67 DISALLOW_COPY_AND_ASSIGN(Border); 69 DISALLOW_COPY_AND_ASSIGN(Border);
68 }; 70 };
69 71
70 } // namespace views 72 } // namespace views
71 73
72 #endif // UI_VIEWS_BORDER_H_ 74 #endif // UI_VIEWS_BORDER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/border.cc » ('j') | ui/views/border.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698