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/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 AvatarMenuBubbleController* menu = | 701 AvatarMenuBubbleController* menu = |
702 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 702 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
703 anchoredAt:point]; | 703 anchoredAt:point]; |
704 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 704 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
705 [menu showWindow:nil]; | 705 [menu showWindow:nil]; |
706 } | 706 } |
707 | 707 |
708 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( | 708 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( |
709 AvatarBubbleMode mode) { | 709 AvatarBubbleMode mode) { |
710 AvatarBaseController* controller = [controller_ avatarButtonController]; | 710 AvatarBaseController* controller = [controller_ avatarButtonController]; |
711 [controller showAvatarBubble:[controller buttonView]]; | 711 [controller showAvatarBubble:[controller buttonView] withMode:mode]; |
712 } | 712 } |
713 | 713 |
714 void BrowserWindowCocoa::ShowPasswordGenerationBubble( | 714 void BrowserWindowCocoa::ShowPasswordGenerationBubble( |
715 const gfx::Rect& rect, | 715 const gfx::Rect& rect, |
716 const autofill::PasswordForm& form, | 716 const autofill::PasswordForm& form, |
717 autofill::PasswordGenerator* password_generator) { | 717 autofill::PasswordGenerator* password_generator) { |
718 WebContents* web_contents = | 718 WebContents* web_contents = |
719 browser_->tab_strip_model()->GetActiveWebContents(); | 719 browser_->tab_strip_model()->GetActiveWebContents(); |
720 // We want to point to the middle of the rect instead of the right side. | 720 // We want to point to the middle of the rect instead of the right side. |
721 NSPoint point = GetPointForBubble(web_contents, | 721 NSPoint point = GetPointForBubble(web_contents, |
(...skipping 27 matching lines...) Expand all Loading... |
749 | 749 |
750 void BrowserWindowCocoa::ShowPageActionPopup( | 750 void BrowserWindowCocoa::ShowPageActionPopup( |
751 const extensions::Extension* extension) { | 751 const extensions::Extension* extension) { |
752 [cocoa_controller() activatePageAction:extension->id()]; | 752 [cocoa_controller() activatePageAction:extension->id()]; |
753 } | 753 } |
754 | 754 |
755 void BrowserWindowCocoa::ShowBrowserActionPopup( | 755 void BrowserWindowCocoa::ShowBrowserActionPopup( |
756 const extensions::Extension* extension) { | 756 const extensions::Extension* extension) { |
757 [cocoa_controller() activateBrowserAction:extension->id()]; | 757 [cocoa_controller() activateBrowserAction:extension->id()]; |
758 } | 758 } |
OLD | NEW |