| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 [window() makeKeyAndOrderFront:controller_]; | 112 [window() makeKeyAndOrderFront:controller_]; |
| 113 | 113 |
| 114 // When creating windows from nibs it is necessary to |makeKeyAndOrderFront:| | 114 // When creating windows from nibs it is necessary to |makeKeyAndOrderFront:| |
| 115 // prior to |orderOut:| then |miniaturize:| when restoring windows in the | 115 // prior to |orderOut:| then |miniaturize:| when restoring windows in the |
| 116 // minimized state. | 116 // minimized state. |
| 117 if (initial_show_state_ == ui::SHOW_STATE_MINIMIZED) { | 117 if (initial_show_state_ == ui::SHOW_STATE_MINIMIZED) { |
| 118 [window() orderOut:controller_]; | 118 [window() orderOut:controller_]; |
| 119 [window() miniaturize:controller_]; | 119 [window() miniaturize:controller_]; |
| 120 } else if (initial_show_state_ == ui::SHOW_STATE_FULLSCREEN) { | 120 } else if (initial_show_state_ == ui::SHOW_STATE_FULLSCREEN) { |
| 121 browser_->ToggleFullscreenMode(false); | 121 browser_->ToggleFullscreenMode(); |
| 122 } | 122 } |
| 123 initial_show_state_ = ui::SHOW_STATE_DEFAULT; | 123 initial_show_state_ = ui::SHOW_STATE_DEFAULT; |
| 124 | 124 |
| 125 // Restore window animation behavior. | 125 // Restore window animation behavior. |
| 126 if (did_save_animation_behavior) | 126 if (did_save_animation_behavior) |
| 127 [window() setAnimationBehavior:saved_animation_behavior]; | 127 [window() setAnimationBehavior:saved_animation_behavior]; |
| 128 | 128 |
| 129 browser_->OnWindowDidShow(); | 129 browser_->OnWindowDidShow(); |
| 130 } | 130 } |
| 131 | 131 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 AvatarMenuBubbleController* menu = | 623 AvatarMenuBubbleController* menu = |
| 624 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 624 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
| 625 anchoredAt:point]; | 625 anchoredAt:point]; |
| 626 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 626 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
| 627 [menu showWindow:nil]; | 627 [menu showWindow:nil]; |
| 628 } | 628 } |
| 629 | 629 |
| 630 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 630 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
| 631 [[controller_ avatarButtonController] showAvatarBubble]; | 631 [[controller_ avatarButtonController] showAvatarBubble]; |
| 632 } | 632 } |
| OLD | NEW |