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

Side by Side Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 2137453003: mac: Remove IsOSMavericksOrLater() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cfallocator_1012
Patch Set: rebase Created 4 years, 5 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 | « content/app/mac/mac_init.mm ('k') | media/gpu/vt_video_encode_accelerator_mac.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #import "content/browser/web_contents/web_contents_view_mac.h" 7 #import "content/browser/web_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 [notificationCenter 653 [notificationCenter
654 addObserver:self 654 addObserver:self
655 selector:@selector(windowChangedOcclusionState:) 655 selector:@selector(windowChangedOcclusionState:)
656 name:NSWindowDidChangeOcclusionStateNotification 656 name:NSWindowDidChangeOcclusionStateNotification
657 object:newWindow]; 657 object:newWindow];
658 } 658 }
659 } 659 }
660 } 660 }
661 661
662 - (void)windowChangedOcclusionState:(NSNotification*)notification { 662 - (void)windowChangedOcclusionState:(NSNotification*)notification {
663 DCHECK(base::mac::IsOSMavericksOrLater());
664 NSWindow* window = [notification object]; 663 NSWindow* window = [notification object];
665 WebContentsImpl* webContents = [self webContents]; 664 WebContentsImpl* webContents = [self webContents];
666 if (window && webContents && !webContents->IsBeingDestroyed()) { 665 if (window && webContents && !webContents->IsBeingDestroyed()) {
667 if ([window occlusionState] & NSWindowOcclusionStateVisible) { 666 if ([window occlusionState] & NSWindowOcclusionStateVisible) {
668 webContents->WasUnOccluded(); 667 webContents->WasUnOccluded();
669 } else { 668 } else {
670 webContents->WasOccluded(); 669 webContents->WasOccluded();
671 } 670 }
672 } 671 }
673 } 672 }
674 673
675 - (void)viewDidMoveToWindow { 674 - (void)viewDidMoveToWindow {
676 [self updateWebContentsVisibility]; 675 [self updateWebContentsVisibility];
677 } 676 }
678 677
679 - (void)viewDidHide { 678 - (void)viewDidHide {
680 [self updateWebContentsVisibility]; 679 [self updateWebContentsVisibility];
681 } 680 }
682 681
683 - (void)viewDidUnhide { 682 - (void)viewDidUnhide {
684 [self updateWebContentsVisibility]; 683 [self updateWebContentsVisibility];
685 } 684 }
686 685
687 @end 686 @end
OLDNEW
« no previous file with comments | « content/app/mac/mac_init.mm ('k') | media/gpu/vt_video_encode_accelerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698