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

Side by Side Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 1172483003: [MacViews] Update AppWindow when the native window changes fullscreen state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views
Patch Set: Address comments. Created 5 years, 6 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 | chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/mac/sdk_forward_declarations.h" 10 #include "base/mac/sdk_forward_declarations.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 756
757 void NativeAppWindowCocoa::WindowDidMiniaturize() { 757 void NativeAppWindowCocoa::WindowDidMiniaturize() {
758 app_window_->OnNativeWindowChanged(); 758 app_window_->OnNativeWindowChanged();
759 } 759 }
760 760
761 void NativeAppWindowCocoa::WindowDidDeminiaturize() { 761 void NativeAppWindowCocoa::WindowDidDeminiaturize() {
762 app_window_->OnNativeWindowChanged(); 762 app_window_->OnNativeWindowChanged();
763 } 763 }
764 764
765 void NativeAppWindowCocoa::WindowDidEnterFullscreen() { 765 void NativeAppWindowCocoa::WindowDidEnterFullscreen() {
766 if (!is_fullscreen_) { 766 is_fullscreen_ = true;
767 is_fullscreen_ = true;
768 app_window_->OSFullscreen();
769 }
770 app_window_->OnNativeWindowChanged(); 767 app_window_->OnNativeWindowChanged();
771 } 768 }
772 769
773 void NativeAppWindowCocoa::WindowDidExitFullscreen() { 770 void NativeAppWindowCocoa::WindowDidExitFullscreen() {
774 is_fullscreen_ = false; 771 is_fullscreen_ = false;
775 if (!shows_fullscreen_controls_) 772 if (!shows_fullscreen_controls_)
776 gfx::SetNSWindowCanFullscreen(window(), false); 773 gfx::SetNSWindowCanFullscreen(window(), false);
777 774
778 app_window_->Restore();
779 app_window_->OnNativeWindowChanged(); 775 app_window_->OnNativeWindowChanged();
780 } 776 }
781 777
782 void NativeAppWindowCocoa::WindowWillZoom() { 778 void NativeAppWindowCocoa::WindowWillZoom() {
783 // See top of file NOTE: Maximize and Zoom. 779 // See top of file NOTE: Maximize and Zoom.
784 if (IsMaximized()) 780 if (IsMaximized())
785 Restore(); 781 Restore();
786 else 782 else
787 Maximize(); 783 Maximize();
788 } 784 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 } 858 }
863 859
864 void NativeAppWindowCocoa::UpdateRestoredBounds() { 860 void NativeAppWindowCocoa::UpdateRestoredBounds() {
865 if (IsRestored(*this)) 861 if (IsRestored(*this))
866 restored_bounds_ = [window() frame]; 862 restored_bounds_ = [window() frame];
867 } 863 }
868 864
869 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { 865 void NativeAppWindowCocoa::HideWithoutMarkingHidden() {
870 [window() orderOut:window_controller_]; 866 [window() orderOut:window_controller_];
871 } 867 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698