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

Side by Side Diff: ui/native_theme/common_theme.cc

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 years, 11 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/message_center/views/toast_contents_view.h ('k') | ui/native_theme/native_theme_aura.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 #include "ui/native_theme/common_theme.h" 5 #include "ui/native_theme/common_theme.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/skia/include/core/SkCanvas.h" 8 #include "third_party/skia/include/core/SkCanvas.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
11 #include "ui/gfx/color_utils.h" 11 #include "ui/gfx/color_utils.h"
12 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/image/image_skia.h" 13 #include "ui/gfx/image/image_skia.h"
13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/skia_util.h" 14 #include "ui/gfx/skia_util.h"
15 #include "ui/gfx/sys_color_change_listener.h" 15 #include "ui/gfx/sys_color_change_listener.h"
16 #include "ui/resources/grit/ui_resources.h" 16 #include "ui/resources/grit/ui_resources.h"
17 17
18 namespace { 18 namespace {
19 19
20 // Theme colors returned by GetSystemColor(). 20 // Theme colors returned by GetSystemColor().
21 21
22 // MenuItem: 22 // MenuItem:
23 const SkColor kMenuBackgroundColor = SK_ColorWHITE; 23 const SkColor kMenuBackgroundColor = SK_ColorWHITE;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 scoped_ptr<gfx::Canvas> CommonThemeCreateCanvas(SkCanvas* sk_canvas) { 205 scoped_ptr<gfx::Canvas> CommonThemeCreateCanvas(SkCanvas* sk_canvas) {
206 // TODO(pkotwicz): Do something better and don't infer device 206 // TODO(pkotwicz): Do something better and don't infer device
207 // scale factor from canvas scale. 207 // scale factor from canvas scale.
208 SkMatrix m = sk_canvas->getTotalMatrix(); 208 SkMatrix m = sk_canvas->getTotalMatrix();
209 float device_scale = static_cast<float>(SkScalarAbs(m.getScaleX())); 209 float device_scale = static_cast<float>(SkScalarAbs(m.getScaleX()));
210 return scoped_ptr<gfx::Canvas>( 210 return scoped_ptr<gfx::Canvas>(
211 gfx::Canvas::CreateCanvasWithoutScaling(sk_canvas, device_scale)); 211 gfx::Canvas::CreateCanvasWithoutScaling(sk_canvas, device_scale));
212 } 212 }
213 213
214 } // namespace ui 214 } // namespace ui
OLDNEW
« no previous file with comments | « ui/message_center/views/toast_contents_view.h ('k') | ui/native_theme/native_theme_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698