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

Unified Diff: ui/views/cocoa/views_nswindow_delegate.mm

Issue 388453002: MacViews: NativeWidget -> Widget notifications: fullscreen, activation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/cocoa/bridged_native_widget_unittest.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/views_nswindow_delegate.mm
diff --git a/ui/views/cocoa/views_nswindow_delegate.mm b/ui/views/cocoa/views_nswindow_delegate.mm
index da577d6be9999ab9a2345090b75277a73496fc2d..e183d58bc7d2c5330a7ce25f2cbc3c17b86fd194 100644
--- a/ui/views/cocoa/views_nswindow_delegate.mm
+++ b/ui/views/cocoa/views_nswindow_delegate.mm
@@ -6,6 +6,7 @@
#include "base/logging.h"
#import "ui/views/cocoa/bridged_native_widget.h"
+#include "ui/views/widget/native_widget_mac.h"
@implementation ViewsNSWindowDelegate
@@ -23,9 +24,44 @@
// NSWindowDelegate implementation.
+- (void)windowDidFailToEnterFullScreen:(NSWindow*)window {
+ // TODO(tapted): Handle these failure notifications, and simulate in a test.
+ NOTREACHED();
+}
+
+- (void)windowDidFailToExitFullScreen:(NSWindow*)window {
+ NOTREACHED();
+}
+
+- (void)windowDidBecomeKey:(NSNotification*)notification {
+ parent_->native_widget_mac()->GetWidget()->OnNativeWidgetActivationChanged(
+ true);
+}
+
+- (void)windowDidResignKey:(NSNotification*)notification {
+ parent_->native_widget_mac()->GetWidget()->OnNativeWidgetActivationChanged(
+ false);
+}
+
- (void)windowWillClose:(NSNotification*)notification {
DCHECK([parent_->ns_window() isEqual:[notification object]]);
parent_->OnWindowWillClose();
}
+- (void)windowWillEnterFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionStart(true);
+}
+
+- (void)windowDidEnterFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionComplete(true);
+}
+
+- (void)windowWillExitFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionStart(false);
+}
+
+- (void)windowDidExitFullScreen:(NSNotification*)notification {
+ parent_->OnFullscreenTransitionComplete(false);
+}
+
@end
« no previous file with comments | « ui/views/cocoa/bridged_native_widget_unittest.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698