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

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

Issue 1718043003: MacViews: Clip contents for non-rectangular windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 4 years, 9 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
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 9
10 #include <vector> 10 #include <vector>
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // frame is ready, or a timeout occurs. 208 // frame is ready, or a timeout occurs.
209 void MaybeWaitForFrame(const gfx::Size& size_in_dip); 209 void MaybeWaitForFrame(const gfx::Size& size_in_dip);
210 210
211 // Show the window using -[NSApp beginSheet:..], modal for the parent window. 211 // Show the window using -[NSApp beginSheet:..], modal for the parent window.
212 void ShowAsModalSheet(); 212 void ShowAsModalSheet();
213 213
214 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to 214 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to
215 // update its draggable region. 215 // update its draggable region.
216 void SetDraggable(bool draggable); 216 void SetDraggable(bool draggable);
217 217
218 // Calls updateWindowMask on |bridged_view_| and updates the path
219 // corresponding to the mask of |compositor_superview_|'s layer for
220 // non-rectangular windows. If a mask layer does not yet exist, it creates a
221 // new one.
222 void UpdateMaskPath();
223
218 // Overridden from CocoaMouseCaptureDelegate: 224 // Overridden from CocoaMouseCaptureDelegate:
219 void PostCapturedEvent(NSEvent* event) override; 225 void PostCapturedEvent(NSEvent* event) override;
220 void OnMouseCaptureLost() override; 226 void OnMouseCaptureLost() override;
221 227
222 // Returns a properties dictionary associated with the NSWindow. 228 // Returns a properties dictionary associated with the NSWindow.
223 // Creates and attaches a new instance if not found. 229 // Creates and attaches a new instance if not found.
224 NSMutableDictionary* GetWindowProperties() const; 230 NSMutableDictionary* GetWindowProperties() const;
225 231
226 // Overridden from FocusChangeListener: 232 // Overridden from FocusChangeListener:
227 void OnWillChangeFocus(View* focused_before, 233 void OnWillChangeFocus(View* focused_before,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // If true, the window has been made visible or changed shape and the window 294 // If true, the window has been made visible or changed shape and the window
289 // shadow needs to be invalidated when a frame is received for the new shape. 295 // shadow needs to be invalidated when a frame is received for the new shape.
290 bool invalidate_shadow_on_frame_swap_ = false; 296 bool invalidate_shadow_on_frame_swap_ = false;
291 297
292 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); 298 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget);
293 }; 299 };
294 300
295 } // namespace views 301 } // namespace views
296 302
297 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 303 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698