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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 790043002: Hosted apps on OS X now act more like a native app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@creating-app-shims-2
Patch Set: Added comments and refactored app_controller_mac Created 6 years 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 | « chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 485ebb18260378ec168646d5fd08dba0d31c2709..7d8a4efe917eabe8022e816939dd3bac39a64be2 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -137,8 +137,8 @@ void BrowserWindowCocoa::Show() {
NSWindowAnimationBehavior saved_animation_behavior =
NSWindowAnimationBehaviorDefault;
bool did_save_animation_behavior = false;
- // Turn off swishing when restoring windows.
- if (is_session_restore &&
+ // Turn off swishing when restoring windows or showing an app.
+ if ((is_session_restore || browser_->is_app()) &&
[window() respondsToSelector:@selector(animationBehavior)] &&
[window() respondsToSelector:@selector(setAnimationBehavior:)]) {
did_save_animation_behavior = true;
@@ -177,7 +177,7 @@ void BrowserWindowCocoa::ShowInactive() {
}
void BrowserWindowCocoa::Hide() {
- // Not implemented.
+ [window() orderOut:controller_];
}
void BrowserWindowCocoa::SetBounds(const gfx::Rect& bounds) {
« no previous file with comments | « chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698