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

Side by Side Diff: ui/app_list/cocoa/app_list_view_controller.mm

Issue 25649004: Always tear down the OSX app list signin view, when the signin status changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/cocoa/app_list_view_controller.h" 5 #import "ui/app_list/cocoa/app_list_view_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "skia/ext/skia_utils_mac.h" 10 #include "skia/ext/skia_utils_mac.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 - (void)redoSearch { 332 - (void)redoSearch {
333 [self modelTextDidChange]; 333 [self modelTextDidChange];
334 } 334 }
335 335
336 - (void)onSigninStatusChanged { 336 - (void)onSigninStatusChanged {
337 [appsSearchBoxController_ rebuildMenu]; 337 [appsSearchBoxController_ rebuildMenu];
338 app_list::SigninDelegate* signinDelegate = 338 app_list::SigninDelegate* signinDelegate =
339 delegate_ ? delegate_->GetSigninDelegate() : NULL; 339 delegate_ ? delegate_->GetSigninDelegate() : NULL;
340 BOOL show_signin_view = 340 BOOL show_signin_view =
341 signinDelegate && ![appsGridController_ model]->signed_in(); 341 signinDelegate && ![appsGridController_ model]->signed_in();
342 if (!!signinViewController_ == show_signin_view) 342
343 return; 343 [[signinViewController_ view] removeFromSuperview];
344 signinViewController_.reset();
344 345
345 if (!show_signin_view) { 346 if (!show_signin_view) {
346 [[signinViewController_ view] removeFromSuperview];
347 signinViewController_.reset();
348 [backgroundView_ setHidden:NO]; 347 [backgroundView_ setHidden:NO];
349 return; 348 return;
350 } 349 }
351 350
352 [backgroundView_ setHidden:YES]; 351 [backgroundView_ setHidden:YES];
353 signinViewController_.reset( 352 signinViewController_.reset(
354 [[SigninViewController alloc] initWithFrame:[backgroundView_ frame] 353 [[SigninViewController alloc] initWithFrame:[backgroundView_ frame]
355 cornerRadius:kBubbleCornerRadius 354 cornerRadius:kBubbleCornerRadius
356 delegate:signinDelegate]); 355 delegate:signinDelegate]);
357 [[self view] addSubview:[signinViewController_ view]]; 356 [[self view] addSubview:[signinViewController_ view]];
358 } 357 }
359 358
360 @end 359 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698