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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 1677303002: Remove win aura theme references (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: increment theme version no Created 4 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
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | no next file » | 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 "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <pango/pango.h> 8 #include <pango/pango.h>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 switch (id) { 1094 switch (id) {
1095 case IDR_THEME_TOOLBAR: { 1095 case IDR_THEME_TOOLBAR: {
1096 SkBitmap bitmap; 1096 SkBitmap bitmap;
1097 bitmap.allocN32Pixels(kToolbarImageWidth, kToolbarImageHeight); 1097 bitmap.allocN32Pixels(kToolbarImageWidth, kToolbarImageHeight);
1098 bitmap.eraseColor( 1098 bitmap.eraseColor(
1099 NativeThemeGtk2::instance()->GetSystemColor( 1099 NativeThemeGtk2::instance()->GetSystemColor(
1100 ui::NativeTheme::kColorId_LabelBackgroundColor)); 1100 ui::NativeTheme::kColorId_LabelBackgroundColor));
1101 return bitmap; 1101 return bitmap;
1102 } 1102 }
1103 1103
1104 // TODO(erg): We list both the normal and *_DESKTOP versions of these
1105 // images because in some contexts, we don't go through the
1106 // chrome::MapThemeImage interface. That should be fixed, but tracking that
1107 // down is Hard.
1108 case IDR_THEME_TAB_BACKGROUND: 1104 case IDR_THEME_TAB_BACKGROUND:
1109 case IDR_THEME_TAB_BACKGROUND_DESKTOP:
1110 return GenerateTabImage(IDR_THEME_FRAME); 1105 return GenerateTabImage(IDR_THEME_FRAME);
1111 case IDR_THEME_TAB_BACKGROUND_INCOGNITO: 1106 case IDR_THEME_TAB_BACKGROUND_INCOGNITO:
1112 case IDR_THEME_TAB_BACKGROUND_INCOGNITO_DESKTOP:
1113 return GenerateTabImage(IDR_THEME_FRAME_INCOGNITO); 1107 return GenerateTabImage(IDR_THEME_FRAME_INCOGNITO);
1114 case IDR_FRAME: 1108 case IDR_FRAME:
1115 case IDR_THEME_FRAME: 1109 case IDR_THEME_FRAME:
1116 return GenerateFrameImage(ThemeProperties::COLOR_FRAME, 1110 return GenerateFrameImage(ThemeProperties::COLOR_FRAME,
1117 "frame-gradient-color"); 1111 "frame-gradient-color");
1118 case IDR_FRAME_INACTIVE: 1112 case IDR_FRAME_INACTIVE:
1119 case IDR_THEME_FRAME_INACTIVE: 1113 case IDR_THEME_FRAME_INACTIVE:
1120 return GenerateFrameImage(ThemeProperties::COLOR_FRAME_INACTIVE, 1114 return GenerateFrameImage(ThemeProperties::COLOR_FRAME_INACTIVE,
1121 "inactive-frame-gradient-color"); 1115 "inactive-frame-gradient-color");
1122 case IDR_THEME_FRAME_INCOGNITO: 1116 case IDR_THEME_FRAME_INCOGNITO:
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 // Blacklist scaling factors <130% (crbug.com/484400) and round 1358 // Blacklist scaling factors <130% (crbug.com/484400) and round
1365 // to 1 decimal to prevent rendering problems (crbug.com/485183). 1359 // to 1 decimal to prevent rendering problems (crbug.com/485183).
1366 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; 1360 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10;
1367 } 1361 }
1368 1362
1369 } // namespace libgtk2ui 1363 } // namespace libgtk2ui
1370 1364
1371 views::LinuxUI* BuildGtk2UI() { 1365 views::LinuxUI* BuildGtk2UI() {
1372 return new libgtk2ui::Gtk2UI; 1366 return new libgtk2ui::Gtk2UI;
1373 } 1367 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698