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

Side by Side Diff: ui/views/bubble/bubble_border.h

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « ui/oak/oak_window.cc ('k') | ui/views/bubble/bubble_border.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_BUBBLE_BUBBLE_BORDER_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
11 #include "ui/views/border.h" 11 #include "ui/views/border.h"
12 12
13 class SkBitmap; 13 namespace gfx {
14 class ImageSkia;
15 }
14 16
15 namespace views { 17 namespace views {
16 18
17 // Renders a border, with optional arrow, and a custom dropshadow. 19 // Renders a border, with optional arrow, and a custom dropshadow.
18 // This can be used to produce floating "bubble" objects with rounded corners. 20 // This can be used to produce floating "bubble" objects with rounded corners.
19 class VIEWS_EXPORT BubbleBorder : public views::Border { 21 class VIEWS_EXPORT BubbleBorder : public views::Border {
20 public: 22 public:
21 // Possible locations for the (optional) arrow. 23 // Possible locations for the (optional) arrow.
22 // 0 bit specifies left or right. 24 // 0 bit specifies left or right.
23 // 1 bit specifies top or bottom. 25 // 1 bit specifies top or bottom.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 128
127 // Loads images if necessary. 129 // Loads images if necessary.
128 static BorderImages* GetBorderImages(Shadow shadow); 130 static BorderImages* GetBorderImages(Shadow shadow);
129 131
130 // Overridden from views::Border: 132 // Overridden from views::Border:
131 virtual void Paint(const views::View& view, 133 virtual void Paint(const views::View& view,
132 gfx::Canvas* canvas) const OVERRIDE; 134 gfx::Canvas* canvas) const OVERRIDE;
133 135
134 void DrawEdgeWithArrow(gfx::Canvas* canvas, 136 void DrawEdgeWithArrow(gfx::Canvas* canvas,
135 bool is_horizontal, 137 bool is_horizontal,
136 SkBitmap* edge, 138 gfx::ImageSkia* edge,
137 SkBitmap* arrow, 139 gfx::ImageSkia* arrow,
138 int start_x, 140 int start_x,
139 int start_y, 141 int start_y,
140 int before_arrow, 142 int before_arrow,
141 int after_arrow, 143 int after_arrow,
142 int offset) const; 144 int offset) const;
143 145
144 void DrawArrowInterior(gfx::Canvas* canvas, 146 void DrawArrowInterior(gfx::Canvas* canvas,
145 bool is_horizontal, 147 bool is_horizontal,
146 int tip_x, 148 int tip_x,
147 int tip_y, 149 int tip_y,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 185
184 private: 186 private:
185 BubbleBorder* border_; 187 BubbleBorder* border_;
186 188
187 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); 189 DISALLOW_COPY_AND_ASSIGN(BubbleBackground);
188 }; 190 };
189 191
190 } // namespace views 192 } // namespace views
191 193
192 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 194 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
OLDNEW
« no previous file with comments | « ui/oak/oak_window.cc ('k') | ui/views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698