| 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" | |
| 47 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
" | 46 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
" |
| 48 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" | 47 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" |
| 49 #include "chrome/browser/ui/profile_chooser_constants.h" | 48 #include "chrome/browser/ui/profile_chooser_constants.h" |
| 50 #include "chrome/browser/ui/singleton_tabs.h" | 49 #include "chrome/browser/ui/singleton_tabs.h" |
| 51 #include "chrome/browser/ui/user_manager.h" | 50 #include "chrome/browser/ui/user_manager.h" |
| 52 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 51 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 53 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 52 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 54 #include "chrome/common/pref_names.h" | 53 #include "chrome/common/pref_names.h" |
| 55 #include "chrome/common/url_constants.h" | 54 #include "chrome/common/url_constants.h" |
| 56 #include "chrome/grit/chromium_strings.h" | 55 #include "chrome/grit/chromium_strings.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 #include "content/public/browser/web_contents.h" | 68 #include "content/public/browser/web_contents.h" |
| 70 #include "google_apis/gaia/oauth2_token_service.h" | 69 #include "google_apis/gaia/oauth2_token_service.h" |
| 71 #include "skia/ext/skia_utils_mac.h" | 70 #include "skia/ext/skia_utils_mac.h" |
| 72 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | 71 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
| 73 #import "ui/base/cocoa/cocoa_base_utils.h" | 72 #import "ui/base/cocoa/cocoa_base_utils.h" |
| 74 #import "ui/base/cocoa/controls/blue_label_button.h" | 73 #import "ui/base/cocoa/controls/blue_label_button.h" |
| 75 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" | 74 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
| 76 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 75 #import "ui/base/cocoa/controls/hyperlink_text_view.h" |
| 77 #import "ui/base/cocoa/hover_image_button.h" | 76 #import "ui/base/cocoa/hover_image_button.h" |
| 78 #include "ui/base/cocoa/window_size_constants.h" | 77 #include "ui/base/cocoa/window_size_constants.h" |
| 78 #import "ui/base/cocoa/rtl_feature.h" |
| 79 #include "ui/base/l10n/l10n_util.h" | 79 #include "ui/base/l10n/l10n_util.h" |
| 80 #include "ui/base/l10n/l10n_util_mac.h" | 80 #include "ui/base/l10n/l10n_util_mac.h" |
| 81 #include "ui/base/resource/resource_bundle.h" | 81 #include "ui/base/resource/resource_bundle.h" |
| 82 #include "ui/events/keycodes/keyboard_codes.h" | 82 #include "ui/events/keycodes/keyboard_codes.h" |
| 83 #include "ui/gfx/color_palette.h" | 83 #include "ui/gfx/color_palette.h" |
| 84 #include "ui/gfx/image/image.h" | 84 #include "ui/gfx/image/image.h" |
| 85 #include "ui/gfx/image/image_skia_util_mac.h" | 85 #include "ui/gfx/image/image_skia_util_mac.h" |
| 86 #include "ui/gfx/paint_vector_icon.h" | 86 #include "ui/gfx/paint_vector_icon.h" |
| 87 #include "ui/gfx/text_elider.h" | 87 #include "ui/gfx/text_elider.h" |
| 88 #include "ui/gfx/vector_icons_public.h" | 88 #include "ui/gfx/vector_icons_public.h" |
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 signed_in) { | 1360 signed_in) { |
| 1361 viewMode_ = profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; | 1361 viewMode_ = profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 [window accessibilitySetOverrideValue: | 1364 [window accessibilitySetOverrideValue: |
| 1365 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 1365 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |
| 1366 forAttribute:NSAccessibilityTitleAttribute]; | 1366 forAttribute:NSAccessibilityTitleAttribute]; |
| 1367 [window accessibilitySetOverrideValue: | 1367 [window accessibilitySetOverrideValue: |
| 1368 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 1368 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |
| 1369 forAttribute:NSAccessibilityHelpAttribute]; | 1369 forAttribute:NSAccessibilityHelpAttribute]; |
| 1370 BOOL shouldUseLeadingEdgeForBubble = | 1370 BOOL shouldUseLeadingEdgeForBubble = ui::ShouldDoExperimentalRTLLayout() && |
| 1371 cocoa_l10n_util::ShouldDoExperimentalRTLLayout() && | 1371 !ui::ShouldFlipWindowControlsInRTL(); |
| 1372 !cocoa_l10n_util::ShouldFlipWindowControlsInRTL(); | |
| 1373 [[self bubble] | 1372 [[self bubble] |
| 1374 setAlignment:shouldUseLeadingEdgeForBubble | 1373 setAlignment:shouldUseLeadingEdgeForBubble |
| 1375 ? info_bubble::kAlignLeadingEdgeToAnchorEdge | 1374 ? info_bubble::kAlignLeadingEdgeToAnchorEdge |
| 1376 : info_bubble::kAlignTrailingEdgeToAnchorEdge]; | 1375 : info_bubble::kAlignTrailingEdgeToAnchorEdge]; |
| 1377 [[self bubble] setArrowLocation:info_bubble::kNoArrow]; | 1376 [[self bubble] setArrowLocation:info_bubble::kNoArrow]; |
| 1378 [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; | 1377 [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; |
| 1379 [self initMenuContentsWithView:viewMode_]; | 1378 [self initMenuContentsWithView:viewMode_]; |
| 1380 } | 1379 } |
| 1381 | 1380 |
| 1382 return self; | 1381 return self; |
| (...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2938 } | 2937 } |
| 2939 | 2938 |
| 2940 - (bool)shouldShowGoIncognito { | 2939 - (bool)shouldShowGoIncognito { |
| 2941 bool incognitoAvailable = | 2940 bool incognitoAvailable = |
| 2942 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2941 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2943 IncognitoModePrefs::DISABLED; | 2942 IncognitoModePrefs::DISABLED; |
| 2944 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2943 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
| 2945 } | 2944 } |
| 2946 | 2945 |
| 2947 @end | 2946 @end |
| OLD | NEW |