Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: views/widget/native_widget.h

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/drop_target_gtk.cc ('k') | views/widget/native_widget_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget.h
===================================================================
--- views/widget/native_widget.h (revision 85284)
+++ views/widget/native_widget.h (working copy)
@@ -36,6 +36,11 @@
virtual ~NativeWidget() {}
+ // Creates an appropriate default NativeWidget implementation for the current
+ // OS/circumstance.
+ static NativeWidget* CreateNativeWidget(
+ internal::NativeWidgetDelegate* delegate);
+
// Retrieves the NativeWidget implementation associated with the given
// NativeView or Window, or NULL if the supplied handle has no associated
// NativeView.
@@ -64,7 +69,20 @@
// Returns the Widget associated with this NativeWidget. This function is
// guaranteed to return non-NULL for the lifetime of the NativeWidget.
virtual Widget* GetWidget() = 0;
+ virtual const Widget* GetWidget() const = 0;
+ // Returns the NativeView/Window associated with this NativeWidget.
+ virtual gfx::NativeView GetNativeView() const = 0;
+ virtual gfx::NativeWindow GetNativeWindow() const = 0;
+
+ // Returns the enclosing Window, or NULL if there is no enclosing Window.
+ virtual Window* GetContainingWindow() = 0;
+ virtual const Window* GetContainingWindow() const = 0;
+
+ // Notifies the NativeWidget that a view was removed from the Widget's view
+ // hierarchy.
+ virtual void ViewRemoved(View* view) = 0;
+
// Sets/Gets a native window property on the underlying native window object.
// Returns NULL if the property does not exist. Setting the property value to
// NULL removes the property.
@@ -78,6 +96,11 @@
// Returns true if a system screen reader is active for the NativeWidget.
virtual bool IsScreenReaderActive() const = 0;
+ // Notify native Accessibility clients of an event.
+ virtual void SendNativeAccessibilityEvent(
+ View* view,
+ ui::AccessibilityTypes::Event event_type) = 0;
+
// Sets or releases event capturing for this native widget.
virtual void SetMouseCapture() = 0;
virtual void ReleaseMouseCapture() = 0;
@@ -85,6 +108,9 @@
// Returns true if this native widget is capturing all events.
virtual bool HasMouseCapture() const = 0;
+ // Returns true if any mouse button is currently pressed.
+ virtual bool IsMouseButtonDown() const = 0;
+
// Returns the InputMethod for this native widget.
// Note that all widgets in a widget hierarchy share the same input method.
// TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation
« no previous file with comments | « views/widget/drop_target_gtk.cc ('k') | views/widget/native_widget_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698