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

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

Issue 345533005: Parse extra parameters on x-chrome-manage-accounts header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 6 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 | Annotate | Revision Log
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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 699
700 // |menu| will automatically release itself on close. 700 // |menu| will automatically release itself on close.
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, signin::GAIAServiceType service_type) { 709 AvatarBubbleMode mode,
710 const signin::ManageAccountsParams& manage_accounts_params) {
710 AvatarBaseController* controller = [controller_ avatarButtonController]; 711 AvatarBaseController* controller = [controller_ avatarButtonController];
711 NSView* anchor = [controller buttonView]; 712 NSView* anchor = [controller buttonView];
712 if ([anchor isHiddenOrHasHiddenAncestor]) 713 if ([anchor isHiddenOrHasHiddenAncestor])
713 anchor = [[controller_ toolbarController] wrenchButton]; 714 anchor = [[controller_ toolbarController] wrenchButton];
714 [controller showAvatarBubble:anchor 715 [controller showAvatarBubble:anchor
715 withMode:mode 716 withMode:mode
716 withServiceType:service_type]; 717 withServiceType:manage_accounts_params.service_type];
717 } 718 }
718 719
719 void BrowserWindowCocoa::ShowPasswordGenerationBubble( 720 void BrowserWindowCocoa::ShowPasswordGenerationBubble(
720 const gfx::Rect& rect, 721 const gfx::Rect& rect,
721 const autofill::PasswordForm& form, 722 const autofill::PasswordForm& form,
722 autofill::PasswordGenerator* password_generator) { 723 autofill::PasswordGenerator* password_generator) {
723 WebContents* web_contents = 724 WebContents* web_contents =
724 browser_->tab_strip_model()->GetActiveWebContents(); 725 browser_->tab_strip_model()->GetActiveWebContents();
725 // We want to point to the middle of the rect instead of the right side. 726 // We want to point to the middle of the rect instead of the right side.
726 NSPoint point = GetPointForBubble(web_contents, 727 NSPoint point = GetPointForBubble(web_contents,
(...skipping 27 matching lines...) Expand all
754 755
755 void BrowserWindowCocoa::ShowPageActionPopup( 756 void BrowserWindowCocoa::ShowPageActionPopup(
756 const extensions::Extension* extension) { 757 const extensions::Extension* extension) {
757 [cocoa_controller() activatePageAction:extension->id()]; 758 [cocoa_controller() activatePageAction:extension->id()];
758 } 759 }
759 760
760 void BrowserWindowCocoa::ShowBrowserActionPopup( 761 void BrowserWindowCocoa::ShowBrowserActionPopup(
761 const extensions::Extension* extension) { 762 const extensions::Extension* extension) {
762 [cocoa_controller() activateBrowserAction:extension->id()]; 763 [cocoa_controller() activateBrowserAction:extension->id()];
763 } 764 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698