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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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
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 #include "chrome/browser/ui/views/create_application_shortcut_view.h" 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void AppInfoView::OnPaint(gfx::Canvas* canvas) { 177 void AppInfoView::OnPaint(gfx::Canvas* canvas) {
178 gfx::Rect bounds = GetLocalBounds(); 178 gfx::Rect bounds = GetLocalBounds();
179 179
180 SkRect border_rect = { 180 SkRect border_rect = {
181 SkIntToScalar(bounds.x()), 181 SkIntToScalar(bounds.x()),
182 SkIntToScalar(bounds.y()), 182 SkIntToScalar(bounds.y()),
183 SkIntToScalar(bounds.right()), 183 SkIntToScalar(bounds.right()),
184 SkIntToScalar(bounds.bottom()) 184 SkIntToScalar(bounds.bottom())
185 }; 185 };
186 186
187 SkPaint border_paint; 187 cc::PaintFlags border_paint;
188 border_paint.setAntiAlias(true); 188 border_paint.setAntiAlias(true);
189 border_paint.setARGB(0xFF, 0xC8, 0xC8, 0xC8); 189 border_paint.setARGB(0xFF, 0xC8, 0xC8, 0xC8);
190 190
191 canvas->sk_canvas()->drawRoundRect(border_rect, SkIntToScalar(2), 191 canvas->sk_canvas()->drawRoundRect(border_rect, SkIntToScalar(2),
192 SkIntToScalar(2), border_paint); 192 SkIntToScalar(2), border_paint);
193 193
194 SkRect inner_rect = { 194 SkRect inner_rect = {
195 border_rect.fLeft + SkDoubleToScalar(0.5), 195 border_rect.fLeft + SkDoubleToScalar(0.5),
196 border_rect.fTop + SkDoubleToScalar(0.5), 196 border_rect.fTop + SkDoubleToScalar(0.5),
197 border_rect.fRight - SkDoubleToScalar(0.5), 197 border_rect.fRight - SkDoubleToScalar(0.5),
198 border_rect.fBottom - SkDoubleToScalar(0.5), 198 border_rect.fBottom - SkDoubleToScalar(0.5),
199 }; 199 };
200 200
201 SkPaint inner_paint; 201 cc::PaintFlags inner_paint;
202 inner_paint.setAntiAlias(true); 202 inner_paint.setAntiAlias(true);
203 inner_paint.setARGB(0xFF, 0xF8, 0xF8, 0xF8); 203 inner_paint.setARGB(0xFF, 0xF8, 0xF8, 0xF8);
204 canvas->sk_canvas()->drawRoundRect(inner_rect, SkDoubleToScalar(1.5), 204 canvas->sk_canvas()->drawRoundRect(inner_rect, SkDoubleToScalar(1.5),
205 SkDoubleToScalar(1.5), inner_paint); 205 SkDoubleToScalar(1.5), inner_paint);
206 } 206 }
207 207
208 } // namespace 208 } // namespace
209 209
210 namespace chrome { 210 namespace chrome {
211 211
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 close_callback_.Run(false); 543 close_callback_.Run(false);
544 return CreateApplicationShortcutView::Cancel(); 544 return CreateApplicationShortcutView::Cancel();
545 } 545 }
546 546
547 void CreateChromeApplicationShortcutView::OnAppInfoLoaded( 547 void CreateChromeApplicationShortcutView::OnAppInfoLoaded(
548 std::unique_ptr<web_app::ShortcutInfo> shortcut_info, 548 std::unique_ptr<web_app::ShortcutInfo> shortcut_info,
549 const extensions::FileHandlersInfo& file_handlers_info) { 549 const extensions::FileHandlersInfo& file_handlers_info) {
550 shortcut_info_ = std::move(shortcut_info); 550 shortcut_info_ = std::move(shortcut_info);
551 file_handlers_info_ = file_handlers_info; 551 file_handlers_info_ = file_handlers_info;
552 } 552 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk3.cc ('k') | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698