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

Unified Diff: ui/views/cocoa/bridged_native_widget.h

Issue 927233003: MacViews: Fix positioning of top-level Widgets with parents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150129-MacViews-Bringup5
Patch Set: Added comment to BridgedNativeWidget Created 5 years, 10 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 | « ui/views/BUILD.gn ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.h
diff --git a/ui/views/cocoa/bridged_native_widget.h b/ui/views/cocoa/bridged_native_widget.h
index bb9b4063726990e4d28095ea64b493f7b17a3b2a..0e712c9b95683b7bd6455a58ce5196b5eceab64b 100644
--- a/ui/views/cocoa/bridged_native_widget.h
+++ b/ui/views/cocoa/bridged_native_widget.h
@@ -62,7 +62,12 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate,
// This does NOT take ownership of |focus_manager|.
void SetFocusManager(FocusManager* focus_manager);
- // Changes the bounds of the window and the hosted layer if present.
+ // Changes the bounds of the window and the hosted layer if present. The
+ // origin is a location in screen coordinates except for "child" windows,
+ // which are positioned relative to their parent(). SetBounds() considers a
+ // "child" window to be one initialized with InitParams specifying all of:
+ // a |parent| NSWindow, the |child| attribute, and a |type| that
+ // views::GetAuraWindowTypeForWidgetType does not consider a "popup" type.
void SetBounds(const gfx::Rect& new_bounds);
// Set or clears the views::View bridged by the content view. This does NOT
@@ -211,6 +216,7 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate,
scoped_ptr<ui::InputMethod> input_method_;
scoped_ptr<CocoaMouseCapture> mouse_capture_;
FocusManager* focus_manager_; // Weak. Owned by our Widget.
+ Widget::InitParams::Type widget_type_;
BridgedNativeWidget* parent_; // Weak. If non-null, owns this.
std::vector<BridgedNativeWidget*> child_windows_;
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698