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

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

Issue 1059853007: Mac/Linux: Ensure window size constraints propagate to the window server during Init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cracked the case on Windows Created 5 years, 8 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
« no previous file with comments | « no previous file | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 5 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public ui::AcceleratedWidgetMacNSView { 43 public ui::AcceleratedWidgetMacNSView {
44 public: 44 public:
45 // Ways of changing the visibility of the bridged NSWindow. 45 // Ways of changing the visibility of the bridged NSWindow.
46 enum WindowVisibilityState { 46 enum WindowVisibilityState {
47 HIDE_WINDOW, // Hides with -[NSWindow orderOut:]. 47 HIDE_WINDOW, // Hides with -[NSWindow orderOut:].
48 SHOW_AND_ACTIVATE_WINDOW, // Shows with -[NSWindow makeKeyAndOrderFront:]. 48 SHOW_AND_ACTIVATE_WINDOW, // Shows with -[NSWindow makeKeyAndOrderFront:].
49 SHOW_INACTIVE, // Shows with -[NSWindow orderWindow:..]. Orders 49 SHOW_INACTIVE, // Shows with -[NSWindow orderWindow:..]. Orders
50 // the window above its parent if it has one. 50 // the window above its parent if it has one.
51 }; 51 };
52 52
53 // Return the size that |window| will take for the given client area |size|,
54 // based on its current style mask.
55 static gfx::Size GetWindowSizeForClientSize(NSWindow* window,
56 const gfx::Size& size);
57
53 // Creates one side of the bridge. |parent| must not be NULL. 58 // Creates one side of the bridge. |parent| must not be NULL.
54 explicit BridgedNativeWidget(NativeWidgetMac* parent); 59 explicit BridgedNativeWidget(NativeWidgetMac* parent);
55 ~BridgedNativeWidget() override; 60 ~BridgedNativeWidget() override;
56 61
57 // Initialize the bridge, "retains" ownership of |window|. 62 // Initialize the bridge, "retains" ownership of |window|.
58 void Init(base::scoped_nsobject<NSWindow> window, 63 void Init(base::scoped_nsobject<NSWindow> window,
59 const Widget::InitParams& params); 64 const Widget::InitParams& params);
60 65
61 // Sets or clears the focus manager to use for tracking focused views. 66 // Sets or clears the focus manager to use for tracking focused views.
62 // This does NOT take ownership of |focus_manager|. 67 // This does NOT take ownership of |focus_manager|.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // If true, the window is either visible, or wants to be visible but is 253 // If true, the window is either visible, or wants to be visible but is
249 // currently hidden due to having a hidden parent. 254 // currently hidden due to having a hidden parent.
250 bool wants_to_be_visible_; 255 bool wants_to_be_visible_;
251 256
252 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); 257 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget);
253 }; 258 };
254 259
255 } // namespace views 260 } // namespace views
256 261
257 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 262 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698