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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 216523005: show avatar bubble in edit mode on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
OLDNEW
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
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] mode: mode];
Alexei Svitkine (slow) 2014/03/28 14:07:31 Nit: Remove space after :.
guohui 2014/03/28 15:28:00 Done.
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698