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

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

Issue 2126103003: Change chrome:// favicons in tabstrip based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 if (!bitmap.empty()) 550 if (!bitmap.empty())
551 image = gfx::Image::CreateFrom1xBitmap(bitmap); 551 image = gfx::Image::CreateFrom1xBitmap(bitmap);
552 } 552 }
553 553
554 gtk_images_[id] = image; 554 gtk_images_[id] = image;
555 return image; 555 return image;
556 } 556 }
557 557
558 bool Gtk2UI::GetTint(int id, color_utils::HSL* tint) const { 558 bool Gtk2UI::GetTint(int id, color_utils::HSL* tint) const {
559 switch (id) { 559 switch (id) {
560 // Tints for which the cross-platform default is fine. Before adding new
561 // values here, specifically verify they work well on Linux.
560 case ThemeProperties::TINT_BACKGROUND_TAB: 562 case ThemeProperties::TINT_BACKGROUND_TAB:
561 // Tints for which the cross-platform default is fine. Before adding new 563 // TODO(estade): Return something useful for TINT_BUTTONS so that chrome://
562 // values here, specifically verify they work well on Linux. 564 // page icons are colored appropriately.
565 case ThemeProperties::TINT_BUTTONS:
563 break; 566 break;
564 default: 567 default:
565 // Assume any tints not specifically verified on Linux aren't usable. 568 // Assume any tints not specifically verified on Linux aren't usable.
566 // TODO(pkasting): Try to remove values from |colors_| that could just be 569 // TODO(pkasting): Try to remove values from |colors_| that could just be
567 // added to the group above instead. 570 // added to the group above instead.
568 NOTREACHED(); 571 NOTREACHED();
569 } 572 }
570 return false; 573 return false;
571 } 574 }
572 575
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 // Blacklist scaling factors <130% (crbug.com/484400) and round 1411 // Blacklist scaling factors <130% (crbug.com/484400) and round
1409 // to 1 decimal to prevent rendering problems (crbug.com/485183). 1412 // to 1 decimal to prevent rendering problems (crbug.com/485183).
1410 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; 1413 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10;
1411 } 1414 }
1412 1415
1413 } // namespace libgtk2ui 1416 } // namespace libgtk2ui
1414 1417
1415 views::LinuxUI* BuildGtk2UI() { 1418 views::LinuxUI* BuildGtk2UI() {
1416 return new libgtk2ui::Gtk2UI; 1419 return new libgtk2ui::Gtk2UI;
1417 } 1420 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/download/background_theme.mm ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698