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

Side by Side Diff: chrome/common/extensions/extension_action.cc

Issue 1132006: Move app/gfx/canvas and app/gfx/font to gfx/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | chrome/plugin/webplugin_proxy.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/common/extensions/extension_action.h" 5 #include "chrome/common/extensions/extension_action.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/gfx/canvas.h"
10 #include "app/gfx/font.h"
11 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
12 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
13 #include "chrome/app/chrome_dll_resource.h" 11 #include "chrome/app/chrome_dll_resource.h"
12 #include "gfx/canvas.h"
13 #include "gfx/font.h"
14 #include "gfx/rect.h" 14 #include "gfx/rect.h"
15 #include "grit/app_resources.h" 15 #include "grit/app_resources.h"
16 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
17 #include "third_party/skia/include/core/SkTypeface.h" 17 #include "third_party/skia/include/core/SkTypeface.h"
18 #include "third_party/skia/include/effects/SkGradientShader.h" 18 #include "third_party/skia/include/effects/SkGradientShader.h"
19 19
20 namespace { 20 namespace {
21 21
22 // Different platforms need slightly different constants to look good. 22 // Different platforms need slightly different constants to look good.
23 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) 23 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // text was too large. 183 // text was too large.
184 rect.fLeft += kPadding; 184 rect.fLeft += kPadding;
185 rect.fRight -= kPadding; 185 rect.fRight -= kPadding;
186 canvas->clipRect(rect); 186 canvas->clipRect(rect);
187 canvas->drawText(text.c_str(), text.size(), 187 canvas->drawText(text.c_str(), text.size(),
188 rect.fLeft + (rect.width() - text_width) / 2, 188 rect.fLeft + (rect.width() - text_width) / 2,
189 rect.fTop + kTextSize + kTopTextPadding, 189 rect.fTop + kTextSize + kTopTextPadding,
190 *text_paint); 190 *text_paint);
191 canvas->restore(); 191 canvas->restore();
192 } 192 }
OLDNEW
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | chrome/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698