summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_win.h
diff options
context:
space:
mode:
Diffstat (limited to 'views/widget/widget_win.h')
-rw-r--r--views/widget/widget_win.h42
1 files changed, 29 insertions, 13 deletions
diff --git a/views/widget/widget_win.h b/views/widget/widget_win.h
index d013ddb..3c2974b 100644
--- a/views/widget/widget_win.h
+++ b/views/widget/widget_win.h
@@ -23,6 +23,7 @@
#include "views/ime/input_method_delegate.h"
#include "views/layout/layout_manager.h"
#include "views/widget/native_widget.h"
+#include "views/widget/widget.h"
namespace ui {
class ViewProp;
@@ -44,6 +45,8 @@ namespace internal {
class NativeWidgetDelegate;
}
+RootView* GetRootViewForHWND(HWND hwnd);
+
// A Windows message reflected from other windows. This message is sent
// with the following arguments:
// hWnd - Target window
@@ -77,11 +80,12 @@ const int WM_NCUAHDRAWFRAME = 0xAF;
//
///////////////////////////////////////////////////////////////////////////////
class WidgetWin : public ui::WindowImpl,
+ public Widget,
public NativeWidget,
public MessageLoopForUI::Observer,
public internal::InputMethodDelegate {
public:
- explicit WidgetWin(internal::NativeWidgetDelegate* delegate);
+ WidgetWin();
virtual ~WidgetWin();
// Returns true if we are on Windows Vista or greater and composition is
@@ -109,6 +113,20 @@ class WidgetWin : public ui::WindowImpl,
// Clear a view that has recently been removed on a hierarchy change.
void ClearAccessibilityViewEvent(View* view);
+ // Overridden from Widget:
+ virtual gfx::NativeView GetNativeView() const OVERRIDE;
+ virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
+ virtual bool GetAccelerator(int cmd_id,
+ ui::Accelerator* accelerator) OVERRIDE;
+ virtual Window* GetWindow() OVERRIDE;
+ virtual const Window* GetWindow() const OVERRIDE;
+ virtual void ViewHierarchyChanged(bool is_add, View *parent,
+ View *child) OVERRIDE;
+ virtual void NotifyAccessibilityEvent(
+ View* view,
+ ui::AccessibilityTypes::Event event_type,
+ bool send_native_event);
+
BOOL IsWindow() const {
return ::IsWindow(GetNativeView());
}
@@ -165,26 +183,24 @@ class WidgetWin : public ui::WindowImpl,
return ::GetClientRect(GetNativeView(), rect);
}
+ // Resets the last move flag so that we can go around the optimization
+ // that disregards duplicate mouse moves when ending animation requires
+ // a new hit-test to do some highlighting as in TabStrip::RemoveTabAnimation
+ // to cause the close button to highlight.
+ void ResetLastMouseMoveFlag() {
+ last_mouse_event_was_move_ = false;
+ }
+
// Overridden from NativeWidget:
virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
virtual Widget* GetWidget() OVERRIDE;
- virtual const Widget* GetWidget() const OVERRIDE;
- virtual gfx::NativeView GetNativeView() const OVERRIDE;
- virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
- virtual Window* GetContainingWindow() OVERRIDE;
- virtual const Window* GetContainingWindow() const OVERRIDE;
- virtual void ViewRemoved(View* view) OVERRIDE;
virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
virtual void* GetNativeWindowProperty(const char* name) OVERRIDE;
virtual TooltipManager* GetTooltipManager() const OVERRIDE;
virtual bool IsScreenReaderActive() const OVERRIDE;
- virtual void SendNativeAccessibilityEvent(
- View* view,
- ui::AccessibilityTypes::Event event_type) OVERRIDE;
virtual void SetMouseCapture() OVERRIDE;
virtual void ReleaseMouseCapture() OVERRIDE;
virtual bool HasMouseCapture() const OVERRIDE;
- virtual bool IsMouseButtonDown() const OVERRIDE;
virtual InputMethod* GetInputMethodNative() OVERRIDE;
virtual void ReplaceInputMethod(InputMethod* input_method) OVERRIDE;
virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
@@ -427,7 +443,6 @@ class WidgetWin : public ui::WindowImpl,
virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
// A delegate implementation that handles events received here.
- // See class documentation for Widget in widget.h for a note about ownership.
internal::NativeWidgetDelegate* delegate_;
// The following factory is used for calls to close the WidgetWin
@@ -466,7 +481,8 @@ class WidgetWin : public ui::WindowImpl,
// A factory that allows us to schedule a redraw for layered windows.
ScopedRunnableMethodFactory<WidgetWin> paint_layered_window_factory_;
- // See class documentation for Widget in widget.h for a note about ownership.
+ // Whether or not the window should delete itself when it is destroyed.
+ // Set this to false via its setter for stack allocated instances.
bool delete_on_destroy_;
// True if we are allowed to update the layered window from the DIB backing