Index: ui/aura/hostwm/host_window_delegate.h |
diff --git a/ui/aura/hostwm/host_window_delegate.h b/ui/aura/hostwm/host_window_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9bc3937e9c9d9a3f247e6ff46c71e8acdb822f0 |
--- /dev/null |
+++ b/ui/aura/hostwm/host_window_delegate.h |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_AURA_HOSTWM_HOST_WINDOW_DELEGATE_H_ |
+#define UI_AURA_HOSTWM_HOST_WINDOW_DELEGATE_H_ |
+ |
+#include "ui/aura/aura_export.h" |
+#include "ui/gfx/rect.h" |
+ |
+namespace aura { |
+class Window; |
+ |
+// An interface implemented by an object that configures and responds to |
+// changes to a host window's state. |
+class AURA_EXPORT HostWindowDelegate { |
+ public: |
+ // Attempt to close window. This is a no-op for host windows that can't be |
+ // closed. |
+ virtual void CloseWindow() = 0; |
+ |
+ // Determines if the window can be resized. |
+ virtual bool CanResize() = 0; |
+ |
+ protected: |
+ virtual ~HostWindowDelegate() {} |
+}; |
+ |
+// Sets/Gets the HostWindowDelegate on the Window. No ownership changes. |
+AURA_EXPORT void SetHostWindowDelegate(Window* window, |
+ HostWindowDelegate* delegate); |
+AURA_EXPORT HostWindowDelegate* GetHostWindowDelegate(Window* window); |
+ |
+} // namespace aura |
+ |
+#endif // UI_AURA_HOSTWM_HOST_WINDOW_DELEGATE_H_ |