summaryrefslogtreecommitdiffstats
path: root/views/views_delegate.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-10 06:21:49 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-10 06:21:49 +0000
commit609eeec226e06466acb6ccc0ea5d59d453e6623e (patch)
tree146aaa76b852537768c9b894904e502aed8a912c /views/views_delegate.h
parent3ee83f2c99cecee4f712cbb6fd9084cb676287a0 (diff)
downloadchromium_src-609eeec226e06466acb6ccc0ea5d59d453e6623e.zip
chromium_src-609eeec226e06466acb6ccc0ea5d59d453e6623e.tar.gz
chromium_src-609eeec226e06466acb6ccc0ea5d59d453e6623e.tar.bz2
Forgot to add these files as part of last change.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/views_delegate.h')
-rw-r--r--views/views_delegate.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/views/views_delegate.h b/views/views_delegate.h
new file mode 100644
index 0000000..082689c
--- /dev/null
+++ b/views/views_delegate.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2009 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 VIEWS_VIEWS_DELEGATE_H_
+#define VIEWS_VIEWS_DELEGATE_H_
+
+#include <string>
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
+class Clipboard;
+namespace gfx {
+class Rect;
+}
+
+namespace views {
+
+// ViewsDelegate is an interface implemented by an object using the views
+// framework. It is used to obtain various high level application utilities
+// and perform some actions such as window placement saving.
+//
+// The embedding app must set views_delegate to assign its ViewsDelegate
+// implementation.
+class ViewsDelegate {
+ public:
+ // Gets the clipboard.
+ virtual Clipboard* GetClipboard() const = 0;
+
+ // Saves the position, size, maximized and always-on-top state for the
+ // window with the specified name.
+ virtual void SaveWindowPlacement(const std::wstring& window_name,
+ const gfx::Rect& bounds,
+ bool maximized,
+ bool always_on_top) = 0;
+
+ // Retrieves the saved position and size for the window with the specified
+ // name.
+ virtual bool GetSavedWindowBounds(const std::wstring& window_name,
+ gfx::Rect* bounds) const = 0;
+
+ // Retrieves the saved maximized state for the window with the specified
+ // name.
+ virtual bool GetSavedMaximizedState(const std::wstring& window_name,
+ bool* maximized) const = 0;
+
+ // Retrieves the saved always-on-top state for the window with the specified
+ // name.
+ virtual bool GetSavedAlwaysOnTopState(const std::wstring& window_name,
+ bool* always_on_top) const = 0;
+
+#if defined(OS_WIN)
+ // Retrieves the default window icon to use for windows if none is specified.
+ virtual HICON GetDefaultWindowIcon() const = 0;
+#endif
+
+ // The active ViewsDelegate used by the views system.
+ static ViewsDelegate* views_delegate;
+};
+
+} // namespace views
+
+#endif // #ifndef VIEWS_VIEWS_DELEGATE_H_