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

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

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 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 | Annotate | Revision Log
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 #pragma once 7 #pragma once
8 8
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/insets.h" 10 #include "ui/gfx/insets.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 12
13 namespace gfx{ 13 namespace gfx{
14 class Canvas; 14 class CanvasSkia;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 18
19 class Painter; 19 class Painter;
20 class View; 20 class View;
21 21
22 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
23 // 23 //
24 // Border class. 24 // Border class.
(...skipping 27 matching lines...) Expand all
52 // side. 52 // side.
53 static Border* CreateSolidSidedBorder(int top, int left, 53 static Border* CreateSolidSidedBorder(int top, int left,
54 int bottom, int right, 54 int bottom, int right,
55 SkColor color); 55 SkColor color);
56 56
57 // Creates a Border from the specified Painter. The border owns the painter, 57 // Creates a Border from the specified Painter. The border owns the painter,
58 // thus the painter is deleted when the Border is deleted. 58 // thus the painter is deleted when the Border is deleted.
59 static Border* CreateBorderPainter(Painter* painter); 59 static Border* CreateBorderPainter(Painter* painter);
60 60
61 // Renders the border for the specified view. 61 // Renders the border for the specified view.
62 virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0; 62 virtual void Paint(const View& view, gfx::CanvasSkia* canvas) const = 0;
63 63
64 // Sets the specified insets to the the border insets. 64 // Sets the specified insets to the the border insets.
65 virtual void GetInsets(gfx::Insets* insets) const = 0; 65 virtual void GetInsets(gfx::Insets* insets) const = 0;
66 66
67 private: 67 private:
68 DISALLOW_COPY_AND_ASSIGN(Border); 68 DISALLOW_COPY_AND_ASSIGN(Border);
69 }; 69 };
70 70
71 } // namespace views 71 } // namespace views
72 72
73 #endif // UI_VIEWS_BORDER_H_ 73 #endif // UI_VIEWS_BORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698