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

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

Issue 2288003002: Delete IsAtLeastOS10_9() and IsAtMostOS10_9() (Closed)
Patch Set: Created 4 years, 3 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 #import "ui/views/cocoa/bridged_native_widget.h" 5 #import "ui/views/cocoa/bridged_native_widget.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 UpdateLayerProperties(); 775 UpdateLayerProperties();
776 if ([window_ inLiveResize]) 776 if ([window_ inLiveResize])
777 MaybeWaitForFrame(new_size); 777 MaybeWaitForFrame(new_size);
778 } 778 }
779 779
780 // 10.9 is unable to generate a window shadow from the composited CALayer, so 780 // 10.9 is unable to generate a window shadow from the composited CALayer, so
781 // use Quartz. 781 // use Quartz.
782 // We don't update the window mask during a live resize, instead it is done 782 // We don't update the window mask during a live resize, instead it is done
783 // after the resize is completed in viewDidEndLiveResize: in 783 // after the resize is completed in viewDidEndLiveResize: in
784 // BridgedContentView. 784 // BridgedContentView.
785 if (base::mac::IsOS10_9() && ![window_ inLiveResize]) 785 if (!base::mac::IsAtLeastOS10_10() && ![window_ inLiveResize])
786 [bridged_view_ updateWindowMask]; 786 [bridged_view_ updateWindowMask];
787 } 787 }
788 788
789 void BridgedNativeWidget::OnPositionChanged() { 789 void BridgedNativeWidget::OnPositionChanged() {
790 native_widget_mac_->GetWidget()->OnNativeWidgetMove(); 790 native_widget_mac_->GetWidget()->OnNativeWidgetMove();
791 } 791 }
792 792
793 void BridgedNativeWidget::OnVisibilityChanged() { 793 void BridgedNativeWidget::OnVisibilityChanged() {
794 const bool window_visible = [window_ isVisible]; 794 const bool window_visible = [window_ isVisible];
795 if (window_visible_ == window_visible) 795 if (window_visible_ == window_visible)
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 [bridged_view_ setMouseDownCanMoveWindow:draggable]; 1365 [bridged_view_ setMouseDownCanMoveWindow:draggable];
1366 // AppKit will not update its cache of mouseDownCanMoveWindow unless something 1366 // AppKit will not update its cache of mouseDownCanMoveWindow unless something
1367 // changes. Previously we tried adding an NSView and removing it, but for some 1367 // changes. Previously we tried adding an NSView and removing it, but for some
1368 // reason it required reposting the mouse-down event, and didn't always work. 1368 // reason it required reposting the mouse-down event, and didn't always work.
1369 // Calling the below seems to be an effective solution. 1369 // Calling the below seems to be an effective solution.
1370 [window_ setMovableByWindowBackground:NO]; 1370 [window_ setMovableByWindowBackground:NO];
1371 [window_ setMovableByWindowBackground:YES]; 1371 [window_ setMovableByWindowBackground:YES];
1372 } 1372 }
1373 1373
1374 } // namespace views 1374 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698