summaryrefslogtreecommitdiffstats
path: root/views/widget/native_widget_delegate.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-08 17:47:43 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-08 17:47:43 +0000
commit68c477df6917633a7a9c64f8624446ca0bd895d5 (patch)
treea270354aa75de9516ba5b150568bb1d142b24b1c /views/widget/native_widget_delegate.h
parent8a9c6c3401524c0a4b5d37d65335e9124885305a (diff)
downloadchromium_src-68c477df6917633a7a9c64f8624446ca0bd895d5.zip
chromium_src-68c477df6917633a7a9c64f8624446ca0bd895d5.tar.gz
chromium_src-68c477df6917633a7a9c64f8624446ca0bd895d5.tar.bz2
Move more from Window onto Widget.
BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7054052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/native_widget_delegate.h')
-rw-r--r--views/widget/native_widget_delegate.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/views/widget/native_widget_delegate.h b/views/widget/native_widget_delegate.h
index d39bd58..2417b9e 100644
--- a/views/widget/native_widget_delegate.h
+++ b/views/widget/native_widget_delegate.h
@@ -24,6 +24,15 @@ class NativeWidgetDelegate {
public:
virtual ~NativeWidgetDelegate() {}
+ // Returns true if the window can be activated.
+ virtual bool CanActivate() const = 0;
+
+ virtual bool IsInactiveRenderingDisabled() const = 0;
+ virtual void EnableInactiveRendering() = 0;
+
+ // Called when the activation state of a window has changed.
+ virtual void OnNativeWidgetActivationChanged(bool active) = 0;
+
// Called when native focus moves from one native view to another.
virtual void OnNativeFocus(gfx::NativeView focused_view) = 0;
virtual void OnNativeBlur(gfx::NativeView focused_view) = 0;
@@ -31,11 +40,22 @@ class NativeWidgetDelegate {
// Called when the native widget is created.
virtual void OnNativeWidgetCreated() = 0;
+ // Called just before the native widget is destroyed. This is the delegate's
+ // last chance to do anything with the native widget handle.
+ virtual void OnNativeWidgetDestroying() = 0;
+
// Called just after the native widget is destroyed.
virtual void OnNativeWidgetDestroyed() = 0;
+ // Returns the smallest size the window can be resized to by the user.
+ virtual gfx::Size GetMinimumSize() = 0;
+
// Called when the NativeWidget changed size to |new_size|.
- virtual void OnSizeChanged(const gfx::Size& new_size) = 0;
+ virtual void OnNativeWidgetSizeChanged(const gfx::Size& new_size) = 0;
+
+ // Called when the user begins/ends to change the bounds of the window.
+ virtual void OnNativeWidgetBeginUserBoundsChange() = 0;
+ virtual void OnNativeWidgetEndUserBoundsChange() = 0;
// Returns true if the delegate has a FocusManager.
virtual bool HasFocusManager() const = 0;
@@ -49,11 +69,18 @@ class NativeWidgetDelegate {
// tree if necessary when accelerated painting is enabled.
virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) = 0;
+ // Returns the non-client component (see views/window/hit_test.h) containing
+ // |point|, in client coordinates.
+ virtual int GetNonClientComponent(const gfx::Point& point) = 0;
+
// Mouse and key event handlers.
virtual bool OnKeyEvent(const KeyEvent& event) = 0;
virtual bool OnMouseEvent(const MouseEvent& event) = 0;
virtual void OnMouseCaptureLost() = 0;
+ // Runs the specified native command. Returns true if the command is handled.
+ virtual bool ExecuteCommand(int command_id) = 0;
+
//
virtual Widget* AsWidget() = 0;
virtual const Widget* AsWidget() const = 0;