| 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 AURA_WINDOW_DELEGATE_H_ | 5 #ifndef AURA_WINDOW_DELEGATE_H_ |
| 6 #define AURA_WINDOW_DELEGATE_H_ | 6 #define AURA_WINDOW_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 namespace gfx { | |
| 10 class Canvas; | |
| 11 } | |
| 12 | |
| 13 namespace aura { | 9 namespace aura { |
| 14 | 10 |
| 15 // Delegate interface for aura::Window. | 11 // Delegate interface for aura::Window. |
| 16 class WindowDelegate { | 12 class WindowDelegate { |
| 17 public: | 13 public: |
| 18 // Asks the delegate to paint window contents into the supplied canvas. | 14 // Asks the delegate to paint to the window. The delegate should call back |
| 19 virtual void OnPaint(gfx::Canvas* canvas) = 0; | 15 // to the window with SetCanvas. |
| 16 virtual void OnPaint(const gfx::Rect& bounds) = 0; |
| 20 | 17 |
| 21 protected: | 18 protected: |
| 22 virtual ~WindowDelegate() {} | 19 virtual ~WindowDelegate() {} |
| 23 }; | 20 }; |
| 24 | 21 |
| 25 } // namespace aura | 22 } // namespace aura |
| 26 | 23 |
| 27 #endif // AURA_WINDOW_DELEGATE_H_ | 24 #endif // AURA_WINDOW_DELEGATE_H_ |
| OLD | NEW |