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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

Issue 592983002: Fix Mac App Launcher observer lifetime on AppListItemList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leave disabled due to other flakiness Created 6 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
« no previous file with comments | « no previous file | ui/app_list/app_list_item_list.cc » ('j') | 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 "chrome/browser/ui/app_list/app_list_service_mac.h" 5 #import "chrome/browser/ui/app_list/app_list_service_mac.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 385
386 void AppListServiceMac::CreateForProfile(Profile* requested_profile) { 386 void AppListServiceMac::CreateForProfile(Profile* requested_profile) {
387 if (profile_ == requested_profile) 387 if (profile_ == requested_profile)
388 return; 388 return;
389 389
390 profile_ = requested_profile; 390 profile_ = requested_profile;
391 391
392 if (!window_controller_) 392 if (!window_controller_)
393 window_controller_.reset([[AppListWindowController alloc] init]); 393 window_controller_.reset([[AppListWindowController alloc] init]);
394 394
395 [[window_controller_ appListViewController] setDelegate:nil];
395 [[window_controller_ appListViewController] 396 [[window_controller_ appListViewController]
396 setDelegate:GetViewDelegate(profile_)]; 397 setDelegate:GetViewDelegate(profile_)];
397 } 398 }
398 399
399 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { 400 void AppListServiceMac::ShowForProfile(Profile* requested_profile) {
400 InvalidatePendingProfileLoads(); 401 InvalidatePendingProfileLoads();
401 402
402 if (requested_profile == profile_) { 403 if (requested_profile == profile_) {
403 ShowWindowNearDock(); 404 ShowWindowNearDock();
404 return; 405 return;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 603
603 - (void)animationDidEnd:(NSAnimation*)animation { 604 - (void)animationDidEnd:(NSAnimation*)animation {
604 content::BrowserThread::PostTask( 605 content::BrowserThread::PostTask(
605 content::BrowserThread::UI, 606 content::BrowserThread::UI,
606 FROM_HERE, 607 FROM_HERE,
607 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, 608 base::Bind(&AppListServiceMac::WindowAnimationDidEnd,
608 base::Unretained(AppListServiceMac::GetInstance()))); 609 base::Unretained(AppListServiceMac::GetInstance())));
609 } 610 }
610 611
611 @end 612 @end
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/app_list_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698