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

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

Issue 288493008: UMA Metrics for the user menu, including vasquette-detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split user-menu data based on GAIA service type Created 6 years, 7 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"
11 #import "base/mac/sdk_forward_declarations.h" 11 #import "base/mac/sdk_forward_declarations.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
14 #include "base/strings/sys_string_conversions.h" 14 #include "base/strings/sys_string_conversions.h"
15 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/download/download_shelf.h" 17 #include "chrome/browser/download/download_shelf.h"
18 #include "chrome/browser/extensions/tab_helper.h" 18 #include "chrome/browser/extensions/tab_helper.h"
19 #include "chrome/browser/fullscreen.h" 19 #include "chrome/browser/fullscreen.h"
20 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 20 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/shell_integration.h" 22 #include "chrome/browser/shell_integration.h"
23 #include "chrome/browser/signin/signin_header_helper.h"
23 #include "chrome/browser/translate/translate_tab_helper.h" 24 #include "chrome/browser/translate/translate_tab_helper.h"
24 #include "chrome/browser/ui/browser.h" 25 #include "chrome/browser/ui/browser.h"
25 #include "chrome/browser/ui/browser_command_controller.h" 26 #include "chrome/browser/ui/browser_command_controller.h"
26 #include "chrome/browser/ui/browser_commands_mac.h" 27 #include "chrome/browser/ui/browser_commands_mac.h"
27 #include "chrome/browser/ui/browser_list.h" 28 #include "chrome/browser/ui/browser_list.h"
28 #include "chrome/browser/ui/browser_window_state.h" 29 #include "chrome/browser/ui/browser_window_state.h"
29 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h" 30 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h"
30 #import "chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.h " 31 #import "chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.h "
31 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 32 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
32 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 33 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 698
698 // |menu| will automatically release itself on close. 699 // |menu| will automatically release itself on close.
699 AvatarMenuBubbleController* menu = 700 AvatarMenuBubbleController* menu =
700 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 701 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
701 anchoredAt:point]; 702 anchoredAt:point];
702 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 703 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
703 [menu showWindow:nil]; 704 [menu showWindow:nil];
704 } 705 }
705 706
706 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( 707 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton(
707 AvatarBubbleMode mode) { 708 AvatarBubbleMode mode, signin::GAIA_SERVICE_TYPE service_type) {
guohui 2014/05/22 20:20:49 service_type is not used anywhere, please either u
Mike Lerman 2014/05/23 17:15:36 Done.
708 AvatarBaseController* controller = [controller_ avatarButtonController]; 709 AvatarBaseController* controller = [controller_ avatarButtonController];
709 NSView* anchor = [controller buttonView]; 710 NSView* anchor = [controller buttonView];
710 if ([anchor isHiddenOrHasHiddenAncestor]) 711 if ([anchor isHiddenOrHasHiddenAncestor])
711 anchor = [[controller_ toolbarController] wrenchButton]; 712 anchor = [[controller_ toolbarController] wrenchButton];
712 [controller showAvatarBubble:anchor withMode:mode]; 713 [controller showAvatarBubble:anchor withMode:mode];
713 } 714 }
714 715
715 void BrowserWindowCocoa::ShowPasswordGenerationBubble( 716 void BrowserWindowCocoa::ShowPasswordGenerationBubble(
716 const gfx::Rect& rect, 717 const gfx::Rect& rect,
717 const autofill::PasswordForm& form, 718 const autofill::PasswordForm& form,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 751
751 void BrowserWindowCocoa::ShowPageActionPopup( 752 void BrowserWindowCocoa::ShowPageActionPopup(
752 const extensions::Extension* extension) { 753 const extensions::Extension* extension) {
753 [cocoa_controller() activatePageAction:extension->id()]; 754 [cocoa_controller() activatePageAction:extension->id()];
754 } 755 }
755 756
756 void BrowserWindowCocoa::ShowBrowserActionPopup( 757 void BrowserWindowCocoa::ShowBrowserActionPopup(
757 const extensions::Extension* extension) { 758 const extensions::Extension* extension) {
758 [cocoa_controller() activateBrowserAction:extension->id()]; 759 [cocoa_controller() activateBrowserAction:extension->id()];
759 } 760 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698