OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ |
6 #define CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ | 6 #define CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "base/compiler_specific.h" |
9 #include "views/background.h" | 10 #include "views/background.h" |
10 | 11 |
11 namespace views { | 12 namespace views { |
12 class View; | 13 class View; |
13 } // namespace views | 14 } // namespace views |
14 | 15 |
15 namespace chromeos { | 16 namespace chromeos { |
16 | 17 |
17 // A background that copies the background renderer from | 18 // A background that copies the background renderer from |
18 // other (typically one of parent chain) view. | 19 // other (typically one of parent chain) view. |
19 class CopyBackground : public views::Background { | 20 class CopyBackground : public views::Background { |
20 public: | 21 public: |
21 explicit CopyBackground(views::View* copy_from); | 22 explicit CopyBackground(views::View* copy_from); |
22 virtual ~CopyBackground() {} | 23 virtual ~CopyBackground() {} |
23 | 24 |
24 // Overridden from views::Background. | 25 // Overridden from views::Background. |
25 virtual void Paint(gfx::Canvas* canvas, views::View* view) const; | 26 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; |
26 | 27 |
27 private: | 28 private: |
28 views::View* background_owner_; | 29 views::View* background_owner_; |
29 | 30 |
30 DISALLOW_COPY_AND_ASSIGN(CopyBackground); | 31 DISALLOW_COPY_AND_ASSIGN(CopyBackground); |
31 }; | 32 }; |
32 | 33 |
33 } // namespace chromeos | 34 } // namespace chromeos |
34 | 35 |
35 #endif // CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ | 36 #endif // CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ |
OLD | NEW |