OLD | NEW |
1 // Copyright (c) 2011 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 "base/compiler_specific.h" |
10 #include "views/background.h" | 10 #include "ui/views/background.h" |
11 | 11 |
12 namespace views { | 12 namespace views { |
13 class View; | 13 class View; |
14 } // namespace views | 14 } // namespace views |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
18 // A background that copies the background renderer from | 18 // A background that copies the background renderer from |
19 // other (typically one of parent chain) view. | 19 // other (typically one of parent chain) view. |
20 class CopyBackground : public views::Background { | 20 class CopyBackground : public views::Background { |
21 public: | 21 public: |
22 explicit CopyBackground(views::View* copy_from); | 22 explicit CopyBackground(views::View* copy_from); |
23 virtual ~CopyBackground() {} | 23 virtual ~CopyBackground() {} |
24 | 24 |
25 // Overridden from views::Background. | 25 // Overridden from views::Background. |
26 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; | 26 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; |
27 | 27 |
28 private: | 28 private: |
29 views::View* background_owner_; | 29 views::View* background_owner_; |
30 | 30 |
31 DISALLOW_COPY_AND_ASSIGN(CopyBackground); | 31 DISALLOW_COPY_AND_ASSIGN(CopyBackground); |
32 }; | 32 }; |
33 | 33 |
34 } // namespace chromeos | 34 } // namespace chromeos |
35 | 35 |
36 #endif // CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ | 36 #endif // CHROME_BROWSER_CHROMEOS_VIEWS_COPY_BACKGROUND_H_ |
OLD | NEW |