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