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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 471023003: Make sure the new confirmation bubble is always shown upon signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: show new confirmation bubble after modal dialog closed Created 6 years, 4 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 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 935
936 [super windowWillClose:notification]; 936 [super windowWillClose:notification];
937 } 937 }
938 938
939 - (void)cleanUpEmbeddedViewContents { 939 - (void)cleanUpEmbeddedViewContents {
940 webContents_.reset(); 940 webContents_.reset();
941 } 941 }
942 942
943 - (id)initWithBrowser:(Browser*)browser 943 - (id)initWithBrowser:(Browser*)browser
944 anchoredAt:(NSPoint)point 944 anchoredAt:(NSPoint)point
945 withMode:(profiles::BubbleViewMode)mode 945 withViewMode:(profiles::BubbleViewMode)viewMode
946 withTutorialMode:(profiles::TutorialMode)tutorialMode
946 withServiceType:(signin::GAIAServiceType)serviceType { 947 withServiceType:(signin::GAIAServiceType)serviceType {
947 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc] 948 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc]
948 initWithContentRect:ui::kWindowSizeDeterminedLater 949 initWithContentRect:ui::kWindowSizeDeterminedLater
949 styleMask:NSBorderlessWindowMask 950 styleMask:NSBorderlessWindowMask
950 backing:NSBackingStoreBuffered 951 backing:NSBackingStoreBuffered
951 defer:NO]); 952 defer:NO]);
952 953
953 if ((self = [super initWithWindow:window 954 if ((self = [super initWithWindow:window
954 parentWindow:browser->window()->GetNativeWindow() 955 parentWindow:browser->window()->GetNativeWindow()
955 anchoredAt:point])) { 956 anchoredAt:point])) {
956 browser_ = browser; 957 browser_ = browser;
957 viewMode_ = mode; 958 viewMode_ = mode;
958 tutorialMode_ = profiles::TUTORIAL_MODE_NONE; 959 tutorialMode_ = tutorialMode;
959 observer_.reset(new ActiveProfileObserverBridge(self, browser_)); 960 observer_.reset(new ActiveProfileObserverBridge(self, browser_));
960 serviceType_ = serviceType; 961 serviceType_ = serviceType;
961 962
962 avatarMenu_.reset(new AvatarMenu( 963 avatarMenu_.reset(new AvatarMenu(
963 &g_browser_process->profile_manager()->GetProfileInfoCache(), 964 &g_browser_process->profile_manager()->GetProfileInfoCache(),
964 observer_.get(), 965 observer_.get(),
965 browser_)); 966 browser_));
966 avatarMenu_->RebuildMenu(); 967 avatarMenu_->RebuildMenu();
967 968
968 // Guest profiles do not have a token service. 969 // Guest profiles do not have a token service.
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 } 1955 }
1955 1956
1956 - (bool)shouldShowGoIncognito { 1957 - (bool)shouldShowGoIncognito {
1957 bool incognitoAvailable = 1958 bool incognitoAvailable =
1958 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1959 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1959 IncognitoModePrefs::DISABLED; 1960 IncognitoModePrefs::DISABLED;
1960 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 1961 return incognitoAvailable && !browser_->profile()->IsGuestSession();
1961 } 1962 }
1962 1963
1963 @end 1964 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698