OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <dwmapi.h> | 5 #include <dwmapi.h> |
6 #include <sstream> | 6 #include <sstream> |
7 | 7 |
8 #include "apps/pref_names.h" | 8 #include "apps/pref_names.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 // time. | 912 // time. |
913 const int kInitWindowDelay = 5; | 913 const int kInitWindowDelay = 5; |
914 base::MessageLoop::current()->PostDelayedTask( | 914 base::MessageLoop::current()->PostDelayedTask( |
915 FROM_HERE, | 915 FROM_HERE, |
916 base::Bind(&AppListController::LoadProfileForWarmup, | 916 base::Bind(&AppListController::LoadProfileForWarmup, |
917 weak_factory_.GetWeakPtr()), | 917 weak_factory_.GetWeakPtr()), |
918 base::TimeDelta::FromSeconds(kInitWindowDelay)); | 918 base::TimeDelta::FromSeconds(kInitWindowDelay)); |
919 | 919 |
920 // Send app list usage stats after a delay. | 920 // Send app list usage stats after a delay. |
921 const int kSendUsageStatsDelay = 5; | 921 const int kSendUsageStatsDelay = 5; |
922 MessageLoop::current()->PostDelayedTask( | 922 base::MessageLoop::current()->PostDelayedTask( |
923 FROM_HERE, | 923 FROM_HERE, |
924 base::Bind(&AppListController::SendAppListStats), | 924 base::Bind(&AppListController::SendAppListStats), |
925 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); | 925 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); |
926 } | 926 } |
927 | 927 |
928 bool AppListController::IsWarmupNeeded() { | 928 bool AppListController::IsWarmupNeeded() { |
929 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 929 if (!g_browser_process || g_browser_process->IsShuttingDown()) |
930 return false; | 930 return false; |
931 | 931 |
932 // We only need to initialize the view if there's no view already created and | 932 // We only need to initialize the view if there's no view already created and |
(...skipping 16 matching lines...) Expand all Loading... |
949 | 949 |
950 } // namespace | 950 } // namespace |
951 | 951 |
952 namespace chrome { | 952 namespace chrome { |
953 | 953 |
954 AppListService* GetAppListServiceWin() { | 954 AppListService* GetAppListServiceWin() { |
955 return AppListController::GetInstance(); | 955 return AppListController::GetInstance(); |
956 } | 956 } |
957 | 957 |
958 } // namespace chrome | 958 } // namespace chrome |
OLD | NEW |