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

Side by Side Diff: ui/views/widget/native_widget_mac.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: 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
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 #include "ui/views/widget/native_widget_mac.h" 5 #include "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void NativeWidgetMac::OnWindowWillClose() { 87 void NativeWidgetMac::OnWindowWillClose() {
88 delegate_->OnNativeWidgetDestroying(); 88 delegate_->OnNativeWidgetDestroying();
89 // Note: If closed via CloseNow(), |bridge_| will already be reset. If closed 89 // Note: If closed via CloseNow(), |bridge_| will already be reset. If closed
90 // by the user, or via Close() and a RunLoop, this will reset it. 90 // by the user, or via Close() and a RunLoop, this will reset it.
91 bridge_.reset(); 91 bridge_.reset();
92 delegate_->OnNativeWidgetDestroyed(); 92 delegate_->OnNativeWidgetDestroyed();
93 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) 93 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET)
94 delete this; 94 delete this;
95 } 95 }
96 96
97 void NativeWidgetMac::OnFullscreenTransitionComplete(bool is_fullscreen) {
98 }
99
97 //////////////////////////////////////////////////////////////////////////////// 100 ////////////////////////////////////////////////////////////////////////////////
98 // NativeWidgetMac, internal::NativeWidgetPrivate implementation: 101 // NativeWidgetMac, internal::NativeWidgetPrivate implementation:
99 102
100 void NativeWidgetMac::InitNativeWidget(const Widget::InitParams& params) { 103 void NativeWidgetMac::InitNativeWidget(const Widget::InitParams& params) {
101 ownership_ = params.ownership; 104 ownership_ = params.ownership;
102 base::scoped_nsobject<NSWindow> window([CreateNSWindow(params) retain]); 105 base::scoped_nsobject<NSWindow> window([CreateNSWindow(params) retain]);
103 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. 106 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject.
104 bridge_->Init(window, params); 107 bridge_->Init(window, params);
105 108
106 // Only set always-on-top here if it is true since setting it may affect how 109 // Only set always-on-top here if it is true since setting it may affect how
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 692 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
690 } 693 }
691 694
692 - (void)animationDidEnd:(NSAnimation*)animation { 695 - (void)animationDidEnd:(NSAnimation*)animation {
693 [window_ close]; 696 [window_ close];
694 [animation_ setDelegate:nil]; 697 [animation_ setDelegate:nil];
695 [self release]; 698 [self release];
696 } 699 }
697 700
698 @end 701 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698