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

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

Issue 23614007: Use the normal Google logo for managed users for --enable-instant-extended-api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed mac compile failure Created 7 years, 3 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) 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/ntp_background_util.h" 5 #include "chrome/browser/ui/ntp_background_util.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/themes/theme_properties.h" 10 #include "chrome/browser/themes/theme_properties.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // static 68 // static
69 void NtpBackgroundUtil::PaintBackgroundDetachedMode(ui::ThemeProvider* tp, 69 void NtpBackgroundUtil::PaintBackgroundDetachedMode(ui::ThemeProvider* tp,
70 gfx::Canvas* canvas, 70 gfx::Canvas* canvas,
71 const gfx::Rect& area, 71 const gfx::Rect& area,
72 int tab_contents_height) { 72 int tab_contents_height) {
73 // Draw the background to match the new tab page. 73 // Draw the background to match the new tab page.
74 canvas->FillRect(area, tp->GetColor(ThemeProperties::COLOR_NTP_BACKGROUND)); 74 canvas->FillRect(area, tp->GetColor(ThemeProperties::COLOR_NTP_BACKGROUND));
75 75
76 if (tp->HasCustomImage(IDR_THEME_NTP_BACKGROUND)) { 76 if (tp->HasCustomImage(IDR_THEME_NTP_BACKGROUND)) {
77 int tiling = ThemeProperties::NO_REPEAT; 77 int tiling = tp->GetDisplayProperty(ThemeProperties::NTP_BACKGROUND_TILING);
78 tp->GetDisplayProperty(ThemeProperties::NTP_BACKGROUND_TILING, &tiling); 78 int alignment = tp->GetDisplayProperty(
79 int alignment; 79 ThemeProperties::NTP_BACKGROUND_ALIGNMENT);
80 if (tp->GetDisplayProperty(ThemeProperties::NTP_BACKGROUND_ALIGNMENT, 80 gfx::ImageSkia* ntp_background =
81 &alignment)) { 81 tp->GetImageSkiaNamed(IDR_THEME_NTP_BACKGROUND);
82 gfx::ImageSkia* ntp_background =
83 tp->GetImageSkiaNamed(IDR_THEME_NTP_BACKGROUND);
84 82
85 PaintThemeBackground( 83 PaintThemeBackground(
86 canvas, ntp_background, tiling, alignment, area, tab_contents_height); 84 canvas, ntp_background, tiling, alignment, area, tab_contents_height);
87 }
88 } 85 }
89 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698