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

Side by Side Diff: ui/views/cocoa/bridged_native_widget_owner.h

Issue 1063933003: MacViews: Allow views::Widgets to be parented off NSWindows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150401-MacViews-AppInfo-Standalone
Patch Set: fix gyp Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_OWNER_H_
6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_OWNER_H_
7
8 namespace gfx {
9 class Vector2d;
10 }
11
12 @class NSWindow;
13
14 namespace views {
15
16 class BridgedNativeWidget;
17
18 // An abstract interface wrapping an NSWindow that ties the lifetime of one or
19 // more child BridgedNativeWidgets to the lifetime of that NSWindow. This is not
20 // simply an NSWindow, because the child window API provided by NSWindow
21 // requires child windows to always be visible.
22 class BridgedNativeWidgetOwner {
23 public:
24 // The NSWindow parent.
25 virtual NSWindow* GetNSWindow() = 0;
Andre 2015/05/07 17:32:37 const? (also ChildWIndowOffset and IsVisibleParent
tapted 2015/05/07 23:43:50 Done.
26
27 // The offset in screen pixels for positioning child windows owned by |this|.
28 virtual gfx::Vector2d ChildWindowOffset() = 0;
Andre 2015/05/07 17:32:37 How about GetChildWindowOffset? Use of Get prefix
tapted 2015/05/07 23:43:50 Done.
29
30 // Return false if |this| is hidden, or has a hidden ancestor.
31 virtual bool IsVisibleParent() = 0;
32
33 // Removes a child window. Note |this| may be deleted after calling, so the
34 // caller should immediately null out the pointer used to make the call.
35 virtual void RemoveChildWindow(BridgedNativeWidget* child) = 0;
36
37 protected:
38 // Instances of this class may be self-deleting.
39 virtual ~BridgedNativeWidgetOwner() {}
40 };
41
42 } // namespace views
43
44 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_OWNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698