Index: views/widget/widget.h |
diff --git a/views/widget/widget.h b/views/widget/widget.h |
index c164c166445badf7a3813951040c5ea882093495..171ebbbab61f7178c0b2ef327f0cc37489ba2669 100644 |
--- a/views/widget/widget.h |
+++ b/views/widget/widget.h |
@@ -91,6 +91,14 @@ class Widget : public internal::NativeWidgetDelegate, |
// view hierarchies that the locale has changed. |
static void NotifyLocaleChanged(); |
+ // Converts a rectangle from one Widget's coordinate system to another's. |
+ // Returns false if the conversion couldn't be made, because either these two |
+ // Widgets do not have a common ancestor or they are not on the screen yet. |
+ // The value of |*rect| won't be changed when false is returned. |
+ static bool ConvertRect(const Widget* from, |
Ben Goodger (Google)
2011/03/22 20:45:14
source/target
James Su
2011/03/22 23:08:47
Done.
|
+ const Widget* to, |
+ gfx::Rect* rect); |
+ |
// Unconverted methods ------------------------------------------------------- |
// TODO(beng): |
@@ -260,7 +268,7 @@ class Widget : public internal::NativeWidgetDelegate, |
ui::AccessibilityTypes::Event event_type, |
bool send_native_event) = 0; |
- NativeWidget* native_widget() { return native_widget_; } |
+ NativeWidget* native_widget() const { return native_widget_; } |
Ben Goodger (Google)
2011/03/22 20:45:14
This method is deliberately non-const.
If you nee
James Su
2011/03/22 23:08:47
This change is not necessary anymore.
|
// Overridden from NativeWidgetDelegate: |
virtual void OnNativeFocus(gfx::NativeView focused_view) OVERRIDE; |