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

Side by Side Diff: chrome/browser/ui/chrome_style.cc

Issue 11818044: Replace IDR_WEB_UI_CLOSE* with IDR_CLOSE_DIALOG*, cleanup, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_style.h" 5 #include "chrome/browser/ui/chrome_style.h"
6 6
7 #include "chrome/browser/themes/theme_service.h" 7 #include "chrome/browser/themes/theme_service.h"
8 #include "grit/theme_resources.h" 8 #include "grit/ui_resources.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
11 11
12 namespace chrome_style { 12 namespace chrome_style {
13 13
14 int GetCloseButtonSize() { 14 int GetCloseButtonSize() {
15 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 15 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
16 const SkBitmap* bitmap = 16 const SkBitmap* image = rb.GetNativeImageNamed(IDR_CLOSE_DIALOG).ToSkBitmap();
17 bundle.GetNativeImageNamed(IDR_WEB_UI_CLOSE).ToSkBitmap(); 17 DCHECK_EQ(image->width(), image->height());
18 DCHECK_EQ(bitmap->width(), bitmap->height()); 18 return image->width();
19 return bitmap->width();
20 } 19 }
21 20
22 SkColor GetBackgroundColor() { 21 SkColor GetBackgroundColor() {
23 return ThemeService::GetDefaultColor(ThemeService::COLOR_CONTROL_BACKGROUND); 22 return ThemeService::GetDefaultColor(ThemeService::COLOR_CONTROL_BACKGROUND);
24 } 23 }
25 24
26 SkColor GetLinkColor() { 25 SkColor GetLinkColor() {
27 return SkColorSetRGB(0x11, 0x55, 0xCC); 26 return SkColorSetRGB(0x11, 0x55, 0xCC);
28 } 27 }
29 28
30 SkColor GetSeparatorColor() { 29 SkColor GetSeparatorColor() {
31 return SkColorSetRGB(0xE0, 0xE0, 0xE0); 30 return SkColorSetRGB(0xE0, 0xE0, 0xE0);
32 } 31 }
33 32
34 } // namespace chrome_style 33 } // namespace chrome_style
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/css/overlay.css ('k') | chrome/browser/ui/cocoa/hover_close_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698