summaryrefslogtreecommitdiffstats
path: root/views/window/native_window.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 03:25:15 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 03:25:15 +0000
commit5fe1b8b76c903a4f4e19d9ed52d7ad36c1a8752b (patch)
tree055771bfd82e500ccc2c8f82f070900c8b81c466 /views/window/native_window.h
parent5230da2c8e4f589ed43b97e836cfef005a469881 (diff)
downloadchromium_src-5fe1b8b76c903a4f4e19d9ed52d7ad36c1a8752b.zip
chromium_src-5fe1b8b76c903a4f4e19d9ed52d7ad36c1a8752b.tar.gz
chromium_src-5fe1b8b76c903a4f4e19d9ed52d7ad36c1a8752b.tar.bz2
Consolidate window showing into Window base class.
NativeWindow gets methods to update accessible state, title, Center and Show. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6647004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window/native_window.h')
-rw-r--r--views/window/native_window.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/views/window/native_window.h b/views/window/native_window.h
index 5347eab..30fb87a 100644
--- a/views/window/native_window.h
+++ b/views/window/native_window.h
@@ -6,6 +6,8 @@
#define VIEWS_WIDGET_NATIVE_WINDOW_H_
#pragma once
+#include "views/accessibility/accessibility_types.h"
+
namespace views {
////////////////////////////////////////////////////////////////////////////////
@@ -15,7 +17,32 @@ namespace views {
//
class NativeWindow {
public:
+ enum ShowState {
+ SHOW_RESTORED,
+ SHOW_MAXIMIZED
+ };
+
virtual ~NativeWindow() {}
+
+ // Shows the window.
+ virtual void Show(ShowState state) = 0;
+
+ // Makes the NativeWindow modal.
+ virtual void BecomeModal() = 0;
+
+ // Centers the window and sizes it to the specified size.
+ virtual void CenterWindow(const gfx::Size& size) = 0;
+
+ // Sets the NativeWindow title.
+ virtual void SetWindowTitle(const std::wstring& title) = 0;
+
+ // Update native accessibility properties on the native window.
+ virtual void SetAccessibleName(const std::wstring& name) = 0;
+ virtual void SetAccessibleRole(AccessibilityTypes::Role role) = 0;
+ virtual void SetAccessibleState(AccessibilityTypes::State state) = 0;
+
+ virtual NativeWidget* AsNativeWidget() = 0;
+ virtual const NativeWidget* AsNativeWidget() const = 0;
};
} // namespace views