| OLD | NEW |
| 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 #include "chrome/browser/ui/views/app_list/win/app_list_service_win.h" | 5 #include "chrome/browser/ui/views/app_list/win/app_list_service_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 if (!IsWarmupNeeded()) | 396 if (!IsWarmupNeeded()) |
| 397 return; | 397 return; |
| 398 | 398 |
| 399 base::Time before_warmup(base::Time::Now()); | 399 base::Time before_warmup(base::Time::Now()); |
| 400 shower_->WarmupForProfile(initial_profile); | 400 shower_->WarmupForProfile(initial_profile); |
| 401 UMA_HISTOGRAM_TIMES("Apps.AppListWarmupDuration", | 401 UMA_HISTOGRAM_TIMES("Apps.AppListWarmupDuration", |
| 402 base::Time::Now() - before_warmup); | 402 base::Time::Now() - before_warmup); |
| 403 } | 403 } |
| 404 | 404 |
| 405 void AppListServiceWin::SetAppListNextPaintCallback(void (*callback)()) { | 405 void AppListServiceWin::SetAppListNextPaintCallback(void (*callback)()) { |
| 406 app_list::AppListView::SetNextPaintCallback(base::Bind(callback)); | 406 app_list::AppListView::SetNextPaintCallback(callback); |
| 407 } | 407 } |
| 408 | 408 |
| 409 void AppListServiceWin::HandleFirstRun() { | 409 void AppListServiceWin::HandleFirstRun() { |
| 410 PrefService* local_state = g_browser_process->local_state(); | 410 PrefService* local_state = g_browser_process->local_state(); |
| 411 // If the app list is already enabled during first run, then the user had | 411 // If the app list is already enabled during first run, then the user had |
| 412 // opted in to the app launcher before uninstalling, so we re-enable to | 412 // opted in to the app launcher before uninstalling, so we re-enable to |
| 413 // restore shortcuts to the app list. | 413 // restore shortcuts to the app list. |
| 414 // Note we can't directly create the shortcuts here because the IO thread | 414 // Note we can't directly create the shortcuts here because the IO thread |
| 415 // hasn't been created yet. | 415 // hasn't been created yet. |
| 416 enable_app_list_on_next_init_ = local_state->GetBoolean( | 416 enable_app_list_on_next_init_ = local_state->GetBoolean( |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 weak_factory_.GetWeakPtr())); | 530 weak_factory_.GetWeakPtr())); |
| 531 } | 531 } |
| 532 | 532 |
| 533 namespace chrome { | 533 namespace chrome { |
| 534 | 534 |
| 535 AppListService* GetAppListServiceWin() { | 535 AppListService* GetAppListServiceWin() { |
| 536 return AppListServiceWin::GetInstance(); | 536 return AppListServiceWin::GetInstance(); |
| 537 } | 537 } |
| 538 | 538 |
| 539 } // namespace chrome | 539 } // namespace chrome |
| OLD | NEW |