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

Unified Diff: ui/views/widget/native_widget_mac.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/views_nswindow_delegate.mm ('k') | ui/views/widget/native_widget_mac_interactive_uitest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac.mm
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index 9f3a15692b1250f4ab5bffc6ff475c7482aa1001..c6d851d02cabb275ae8ab30dd02579715af5ce63 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -269,8 +269,7 @@ gfx::Rect NativeWidgetMac::GetClientAreaBoundsInScreen() const {
}
gfx::Rect NativeWidgetMac::GetRestoredBounds() const {
- NOTIMPLEMENTED();
- return gfx::Rect();
+ return bridge_ ? bridge_->GetRestoredBounds() : gfx::Rect();
}
void NativeWidgetMac::SetBounds(const gfx::Rect& bounds) {
@@ -405,7 +404,7 @@ void NativeWidgetMac::SetVisibleOnAllWorkspaces(bool always_visible) {
}
void NativeWidgetMac::Maximize() {
- NOTIMPLEMENTED();
+ NOTIMPLEMENTED(); // See IsMaximized().
}
void NativeWidgetMac::Minimize() {
@@ -413,7 +412,8 @@ void NativeWidgetMac::Minimize() {
}
bool NativeWidgetMac::IsMaximized() const {
- NOTIMPLEMENTED();
+ // The window frame isn't altered on Mac unless going fullscreen. The green
+ // "+" button just makes the window bigger. So, always false.
return false;
}
@@ -427,12 +427,14 @@ void NativeWidgetMac::Restore() {
}
void NativeWidgetMac::SetFullscreen(bool fullscreen) {
- NOTIMPLEMENTED();
+ if (!bridge_ || fullscreen == IsFullscreen())
+ return;
+
+ bridge_->ToggleDesiredFullscreenState();
}
bool NativeWidgetMac::IsFullscreen() const {
- NOTIMPLEMENTED();
- return false;
+ return bridge_ && bridge_->target_fullscreen_state();
}
void NativeWidgetMac::SetOpacity(unsigned char opacity) {
« no previous file with comments | « ui/views/cocoa/views_nswindow_delegate.mm ('k') | ui/views/widget/native_widget_mac_interactive_uitest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698