| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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_UI_VIEWS_THEME_BACKGROUND_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_THEME_BACKGROUND_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "ui/views/background.h" | |
| 10 | |
| 11 class BrowserView; | |
| 12 | |
| 13 namespace views { | |
| 14 class View; | |
| 15 }; | |
| 16 | |
| 17 //////////////////////////////////////////////////////////////////////////////// | |
| 18 // | |
| 19 // ThemeBackground class. | |
| 20 // | |
| 21 // A ThemeBackground is used to paint the background theme image in a | |
| 22 // view in such a way that it's consistent with the frame's theme | |
| 23 // image. It takes care of active/inactive state, incognito state and | |
| 24 // the offset from the frame view. | |
| 25 // | |
| 26 //////////////////////////////////////////////////////////////////////////////// | |
| 27 class ThemeBackground : public views::Background { | |
| 28 public: | |
| 29 explicit ThemeBackground(BrowserView* browser); | |
| 30 virtual ~ThemeBackground() {} | |
| 31 | |
| 32 // Overridden from views:;Background. | |
| 33 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; | |
| 34 | |
| 35 private: | |
| 36 BrowserView* browser_view_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(ThemeBackground); | |
| 39 }; | |
| 40 | |
| 41 #endif // CHROME_BROWSER_UI_VIEWS_THEME_BACKGROUND_H_ | |
| OLD | NEW |