summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ntp_background_util.h
blob: a9558ec47ce08287c698a09cddc4c148fbe0ca4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_NTP_BACKGROUND_UTIL_H_
#define CHROME_BROWSER_NTP_BACKGROUND_UTIL_H_
#pragma once

namespace gfx {
class Canvas;
class Rect;
}

namespace ui {
class ThemeProvider;
}

class NtpBackgroundUtil {
 public:
  // Paints the NTP background on |canvas|. |area| is the area of the canvas
  // that gets painted and also serves as the origin of the image (for top-
  // aligned images). |tab_contents_height| is necessary for correctly painting
  // bottom-aligned images since then the origin is the bottom of the web page.
  static void PaintBackgroundDetachedMode(
      ui::ThemeProvider* tp, gfx::Canvas* canvas,
      const gfx::Rect& area, int tab_contents_height);

 private:
  NtpBackgroundUtil() {}
};

#endif  // CHROME_BROWSER_NTP_BACKGROUND_UTIL_H_