1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_NTP_BACKGROUND_UTIL_H_ 6 #define CHROME_BROWSER_NTP_BACKGROUND_UTIL_H_ 7 #pragma once 8 9 namespace gfx { 10 class Canvas; 11 class Rect; 12 } 13 14 namespace ui { 15 class ThemeProvider; 16 } 17 18 class NtpBackgroundUtil { 19 public: 20 // Paints the NTP background on |canvas|. |area| is the area of the canvas 21 // that gets painted and also serves as the origin of the image (for top- 22 // aligned images). |tab_contents_height| is necessary for correctly painting 23 // bottom-aligned images since then the origin is the bottom of the web page. 24 static void PaintBackgroundDetachedMode( 25 ui::ThemeProvider* tp, gfx::Canvas* canvas, 26 const gfx::Rect& area, int tab_contents_height); 27 28 private: NtpBackgroundUtil()29 NtpBackgroundUtil() {} 30 }; 31 32 #endif // CHROME_BROWSER_NTP_BACKGROUND_UTIL_H_ 33