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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/ui/app_list/app_list_service_cocoa_mac.h" 5 #include "chrome/browser/ui/app_list/app_list_service_cocoa_mac.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/ui/app_list/app_list_controller_delegate_impl.h" 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate_impl.h"
9 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 9 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
10 #import "ui/app_list/cocoa/app_list_view_controller.h" 10 #import "ui/app_list/cocoa/app_list_view_controller.h"
11 #import "ui/app_list/cocoa/app_list_window_controller.h" 11 #import "ui/app_list/cocoa/app_list_window_controller.h"
12 12
13 AppListServiceCocoaMac::~AppListServiceCocoaMac() { 13 AppListServiceCocoaMac::~AppListServiceCocoaMac() {
14 } 14 }
15 15
16 // static 16 // static
17 AppListServiceCocoaMac* AppListServiceCocoaMac::GetInstance() { 17 AppListServiceCocoaMac* AppListServiceCocoaMac::GetInstance() {
18 return Singleton<AppListServiceCocoaMac, 18 return base::Singleton<
19 LeakySingletonTraits<AppListServiceCocoaMac>>::get(); 19 AppListServiceCocoaMac,
20 base::LeakySingletonTraits<AppListServiceCocoaMac>>::get();
20 } 21 }
21 22
22 void AppListServiceCocoaMac::ShowForProfile(Profile* requested_profile) { 23 void AppListServiceCocoaMac::ShowForProfile(Profile* requested_profile) {
23 CreateForProfile(requested_profile); 24 CreateForProfile(requested_profile);
24 DCHECK(ReadyToShow()); 25 DCHECK(ReadyToShow());
25 ShowWindowNearDock(); 26 ShowWindowNearDock();
26 } 27 }
27 28
28 Profile* AppListServiceCocoaMac::GetCurrentAppListProfile() { 29 Profile* AppListServiceCocoaMac::GetCurrentAppListProfile() {
29 return profile_; 30 return profile_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // to ensure it will be populated later. 76 // to ensure it will be populated later.
76 window_controller_.reset([[AppListWindowController alloc] init]); 77 window_controller_.reset([[AppListWindowController alloc] init]);
77 } 78 }
78 return true; // Cocoa app list can be shown empty. 79 return true; // Cocoa app list can be shown empty.
79 } 80 }
80 81
81 AppListServiceCocoaMac::AppListServiceCocoaMac() 82 AppListServiceCocoaMac::AppListServiceCocoaMac()
82 : profile_(nullptr), 83 : profile_(nullptr),
83 controller_delegate_(new AppListControllerDelegateImpl(this)) { 84 controller_delegate_(new AppListControllerDelegateImpl(this)) {
84 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_cocoa_mac.h ('k') | chrome/browser/ui/app_list/app_list_service_disabled.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698