From 5fe1b8b76c903a4f4e19d9ed52d7ad36c1a8752b Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Wed, 9 Mar 2011 03:25:15 +0000 Subject: 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 --- views/window/native_window.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'views/window/native_window.h') 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 -- cgit v1.1