| OLD | NEW | 
|     1 // Copyright 2014 The Chromium Authors. All rights reserved. |     1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |     5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 
|     6  |     6  | 
|     7 #import <Carbon/Carbon.h>  // kVK_Return. |     7 #import <Carbon/Carbon.h>  // kVK_Return. | 
|     8 #import <Cocoa/Cocoa.h> |     8 #import <Cocoa/Cocoa.h> | 
|     9 #include <stddef.h> |     9 #include <stddef.h> | 
|    10  |    10  | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|    36 #include "chrome/browser/sync/sync_ui_util.h" |    36 #include "chrome/browser/sync/sync_ui_util.h" | 
|    37 #include "chrome/browser/ui/browser.h" |    37 #include "chrome/browser/ui/browser.h" | 
|    38 #include "chrome/browser/ui/browser_commands.h" |    38 #include "chrome/browser/ui/browser_commands.h" | 
|    39 #include "chrome/browser/ui/browser_list.h" |    39 #include "chrome/browser/ui/browser_list.h" | 
|    40 #include "chrome/browser/ui/browser_window.h" |    40 #include "chrome/browser/ui/browser_window.h" | 
|    41 #include "chrome/browser/ui/chrome_pages.h" |    41 #include "chrome/browser/ui/chrome_pages.h" | 
|    42 #import "chrome/browser/ui/cocoa/browser_window_utils.h" |    42 #import "chrome/browser/ui/cocoa/browser_window_utils.h" | 
|    43 #include "chrome/browser/ui/cocoa/chrome_style.h" |    43 #include "chrome/browser/ui/cocoa/chrome_style.h" | 
|    44 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |    44 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 
|    45 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |    45 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 
 |    46 #include "chrome/browser/ui/cocoa/l10n_util.h" | 
|    46 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
      " |    47 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
      " | 
|    47 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" |    48 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" | 
|    48 #include "chrome/browser/ui/profile_chooser_constants.h" |    49 #include "chrome/browser/ui/profile_chooser_constants.h" | 
|    49 #include "chrome/browser/ui/singleton_tabs.h" |    50 #include "chrome/browser/ui/singleton_tabs.h" | 
|    50 #include "chrome/browser/ui/user_manager.h" |    51 #include "chrome/browser/ui/user_manager.h" | 
|    51 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |    52 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 
|    52 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |    53 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 
|    53 #include "chrome/common/pref_names.h" |    54 #include "chrome/common/pref_names.h" | 
|    54 #include "chrome/common/url_constants.h" |    55 #include "chrome/common/url_constants.h" | 
|    55 #include "chrome/grit/chromium_strings.h" |    56 #include "chrome/grit/chromium_strings.h" | 
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1360       viewMode_ = profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; |  1361       viewMode_ = profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; | 
|  1361     } |  1362     } | 
|  1362  |  1363  | 
|  1363     [window accessibilitySetOverrideValue: |  1364     [window accessibilitySetOverrideValue: | 
|  1364         l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |  1365         l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 
|  1365                              forAttribute:NSAccessibilityTitleAttribute]; |  1366                              forAttribute:NSAccessibilityTitleAttribute]; | 
|  1366     [window accessibilitySetOverrideValue: |  1367     [window accessibilitySetOverrideValue: | 
|  1367         l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |  1368         l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 
|  1368                              forAttribute:NSAccessibilityHelpAttribute]; |  1369                              forAttribute:NSAccessibilityHelpAttribute]; | 
|  1369  |  1370  | 
|  1370     [[self bubble] setAlignment:info_bubble::kAlignTrailingEdgeToAnchorEdge]; |  1371     [[self bubble] | 
 |  1372         setAlignment:cocoa_l10n_util::ShouldFlipWindowControlsInRTL() | 
 |  1373                          ? info_bubble::kAlignTrailingEdgeToAnchorEdge | 
 |  1374                          : info_bubble::kAlignLeadingEdgeToAnchorEdge]; | 
|  1371     [[self bubble] setArrowLocation:info_bubble::kNoArrow]; |  1375     [[self bubble] setArrowLocation:info_bubble::kNoArrow]; | 
|  1372     [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; |  1376     [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; | 
|  1373     [self initMenuContentsWithView:viewMode_]; |  1377     [self initMenuContentsWithView:viewMode_]; | 
|  1374   } |  1378   } | 
|  1375  |  1379  | 
|  1376   return self; |  1380   return self; | 
|  1377 } |  1381 } | 
|  1378  |  1382  | 
|  1379 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay { |  1383 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay { | 
|  1380   if (browser_->profile()->IsSupervised() && |  1384   if (browser_->profile()->IsSupervised() && | 
| (...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2932 } |  2936 } | 
|  2933  |  2937  | 
|  2934 - (bool)shouldShowGoIncognito { |  2938 - (bool)shouldShowGoIncognito { | 
|  2935   bool incognitoAvailable = |  2939   bool incognitoAvailable = | 
|  2936       IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |  2940       IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 
|  2937           IncognitoModePrefs::DISABLED; |  2941           IncognitoModePrefs::DISABLED; | 
|  2938   return incognitoAvailable && !browser_->profile()->IsGuestSession(); |  2942   return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 
|  2939 } |  2943 } | 
|  2940  |  2944  | 
|  2941 @end |  2945 @end | 
| OLD | NEW |