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

Unified Diff: chrome/browser/ui/views/tabs/tab_util.h

Issue 18486007: Fix the misalignment on CrOS of the tab background images (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/tabs/tab_util.h
diff --git a/chrome/browser/ui/views/tabs/tab_util.h b/chrome/browser/ui/views/tabs/tab_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..50b2488e1cce8d5cc12f3643c2bdc7e81a2cbbfc
--- /dev/null
+++ b/chrome/browser/ui/views/tabs/tab_util.h
@@ -0,0 +1,35 @@
+// 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_UTIL_H_
+#define CHROME_BROWSER_UI_VIEWS_TABS_TAB_UTIL_H_
+
+namespace gfx {
+class ImageSkia;
+}
+namespace ui {
+class ThemeProvider;
+}
+
+// Utility class for tab related code.
+class TabUtil {
sky 2013/07/08 14:43:21 This name is too generic and encourages making thi
+ 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);
+};
sky 2013/07/08 14:43:21 private: DISALLOW_IMPLICIT_CONSTRUCTORS, or create
+
+#endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698