Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2021)

Unified Diff: ui/aura/hostwm/host_window_delegate.h

Issue 10789018: aura: Add X11 host window management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep ash switches alphabetized. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698