Index: chrome/browser/ui/views/tabs/tab_paint_util.h |
diff --git a/chrome/browser/ui/views/tabs/tab_paint_util.h b/chrome/browser/ui/views/tabs/tab_paint_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0e9cbcc885021134ef8f567e0ab9786e10e8259f |
--- /dev/null |
+++ b/chrome/browser/ui/views/tabs/tab_paint_util.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2013 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_UI_VIEWS_TABS_TAB_PAINT_UTIL_H_ |
+#define CHROME_BROWSER_UI_VIEWS_TABS_TAB_PAINT_UTIL_H_ |
+ |
+#include "base/basictypes.h" |
+ |
+namespace gfx { |
+class ImageSkia; |
+} |
+namespace ui { |
+class ThemeProvider; |
+} |
+ |
+// Utility class for tab related code. |
+class TabPaintUtil { |
+ public: |
+ // Tiles |background_id| and |background_overlay_id| onto an image of size |
+ // |dst_w|x|dst_h|. |relative_y_offset| is the relative y position of |
+ // |background_id| relative to |background_overlay_id|. |
+ // |src_x|, |src_y|, and |relative_y_offset| should be set so that |
+ // |background_id| lines up with the frame image and that |
+ // |background_overlay_id| lines up with the top of the tab. |
+ static gfx::ImageSkia CreateTiledInactiveBackground( |
+ ui::ThemeProvider* theme_provider, |
+ int background_id, |
+ int background_overlay_id, |
+ int relative_y_offset, |
+ int src_x, |
+ int src_y, |
+ int dst_w, |
+ int dst_h); |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(TabPaintUtil); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_PAINT_UTIL_H_ |