OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 UI_AURA_HOSTWM_HOST_WINDOW_DELEGATE_H_ |
| 6 #define UI_AURA_HOSTWM_HOST_WINDOW_DELEGATE_H_ |
| 7 |
| 8 #include "ui/aura/aura_export.h" |
| 9 #include "ui/gfx/rect.h" |
| 10 |
| 11 namespace aura { |
| 12 class Window; |
| 13 |
| 14 // An interface implemented by an object that configures and responds to |
| 15 // changes to a host window's state. |
| 16 class AURA_EXPORT HostWindowDelegate { |
| 17 public: |
| 18 // Attempt to close window. This is a no-op for host windows that can't be |
| 19 // closed. |
| 20 virtual void CloseWindow() = 0; |
| 21 |
| 22 // Determines if the window can be resized. |
| 23 virtual bool CanResize() = 0; |
| 24 |
| 25 protected: |
| 26 virtual ~HostWindowDelegate() {} |
| 27 }; |
| 28 |
| 29 // Sets/Gets the HostWindowDelegate on the Window. No ownership changes. |
| 30 AURA_EXPORT void SetHostWindowDelegate(Window* window, |
| 31 HostWindowDelegate* delegate); |
| 32 AURA_EXPORT HostWindowDelegate* GetHostWindowDelegate(Window* window); |
| 33 |
| 34 } // namespace aura |
| 35 |
| 36 #endif // UI_AURA_HOSTWM_HOST_WINDOW_DELEGATE_H_ |
OLD | NEW |