| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 [window() makeKeyAndOrderFront:controller_]; | 111 [window() makeKeyAndOrderFront:controller_]; |
| 112 | 112 |
| 113 // When creating windows from nibs it is necessary to |makeKeyAndOrderFront:| | 113 // When creating windows from nibs it is necessary to |makeKeyAndOrderFront:| |
| 114 // prior to |orderOut:| then |miniaturize:| when restoring windows in the | 114 // prior to |orderOut:| then |miniaturize:| when restoring windows in the |
| 115 // minimized state. | 115 // minimized state. |
| 116 if (initial_show_state_ == ui::SHOW_STATE_MINIMIZED) { | 116 if (initial_show_state_ == ui::SHOW_STATE_MINIMIZED) { |
| 117 [window() orderOut:controller_]; | 117 [window() orderOut:controller_]; |
| 118 [window() miniaturize:controller_]; | 118 [window() miniaturize:controller_]; |
| 119 } else if (initial_show_state_ == ui::SHOW_STATE_FULLSCREEN) { | 119 } else if (initial_show_state_ == ui::SHOW_STATE_FULLSCREEN) { |
| 120 browser_->ToggleFullscreenMode(false); | 120 browser_->ToggleFullscreenMode(); |
| 121 } | 121 } |
| 122 initial_show_state_ = ui::SHOW_STATE_DEFAULT; | 122 initial_show_state_ = ui::SHOW_STATE_DEFAULT; |
| 123 | 123 |
| 124 // Restore window animation behavior. | 124 // Restore window animation behavior. |
| 125 if (did_save_animation_behavior) | 125 if (did_save_animation_behavior) |
| 126 [window() setAnimationBehavior:saved_animation_behavior]; | 126 [window() setAnimationBehavior:saved_animation_behavior]; |
| 127 | 127 |
| 128 browser_->OnWindowDidShow(); | 128 browser_->OnWindowDidShow(); |
| 129 } | 129 } |
| 130 | 130 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 AvatarMenuBubbleController* menu = | 622 AvatarMenuBubbleController* menu = |
| 623 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 623 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
| 624 anchoredAt:point]; | 624 anchoredAt:point]; |
| 625 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 625 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
| 626 [menu showWindow:nil]; | 626 [menu showWindow:nil]; |
| 627 } | 627 } |
| 628 | 628 |
| 629 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 629 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
| 630 [[controller_ avatarButtonController] showAvatarBubble]; | 630 [[controller_ avatarButtonController] showAvatarBubble]; |
| 631 } | 631 } |
| OLD | NEW |