| 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 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/platform_util.h" | 25 #include "chrome/browser/platform_util.h" |
| 26 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/browser/profiles/profile_manager.h" | 27 #include "chrome/browser/profiles/profile_manager.h" |
| 28 #include "chrome/browser/shell_integration.h" | 28 #include "chrome/browser/shell_integration.h" |
| 29 #include "chrome/browser/ui/app_list/app_list_util.h" | 29 #include "chrome/browser/ui/app_list/app_list_util.h" |
| 30 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h" | 30 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h" |
| 31 #include "chrome/browser/ui/views/app_list/win/activation_tracker_win.h" | 31 #include "chrome/browser/ui/views/app_list/win/activation_tracker_win.h" |
| 32 #include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.
h" | 32 #include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.
h" |
| 33 #include "chrome/browser/ui/views/app_list/win/app_list_win.h" | 33 #include "chrome/browser/ui/views/app_list/win/app_list_win.h" |
| 34 #include "chrome/browser/web_applications/web_app.h" | 34 #include "chrome/browser/web_applications/web_app.h" |
| 35 #include "chrome/common/channel_info.h" |
| 35 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
| 36 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/chrome_version_info.h" | |
| 38 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
| 39 #include "chrome/installer/util/browser_distribution.h" | 39 #include "chrome/installer/util/browser_distribution.h" |
| 40 #include "components/version_info/version_info.h" |
| 40 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 41 #include "ui/app_list/views/app_list_view.h" | 42 #include "ui/app_list/views/app_list_view.h" |
| 42 #include "ui/base/ui_base_switches.h" | 43 #include "ui/base/ui_base_switches.h" |
| 43 #include "ui/base/win/shell.h" | 44 #include "ui/base/win/shell.h" |
| 44 | 45 |
| 45 #if defined(GOOGLE_CHROME_BUILD) | 46 #if defined(GOOGLE_CHROME_BUILD) |
| 46 #include "chrome/installer/util/google_update_settings.h" | 47 #include "chrome/installer/util/google_update_settings.h" |
| 47 #include "chrome/installer/util/install_util.h" | 48 #include "chrome/installer/util/install_util.h" |
| 48 #include "chrome/installer/util/updating_app_registration_data.h" | 49 #include "chrome/installer/util/updating_app_registration_data.h" |
| 49 #include "chrome/installer/util/util_constants.h" | 50 #include "chrome/installer/util/util_constants.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 // time. | 323 // time. |
| 323 /* const */ int kInitWindowDelay = 30; | 324 /* const */ int kInitWindowDelay = 30; |
| 324 | 325 |
| 325 // TODO(vadimt): Make kInitWindowDelay const and remove the below switch once | 326 // TODO(vadimt): Make kInitWindowDelay const and remove the below switch once |
| 326 // crbug.com/431326 is fixed. | 327 // crbug.com/431326 is fixed. |
| 327 | 328 |
| 328 // Profiler UMA data is reported only for first 30 sec after browser startup. | 329 // Profiler UMA data is reported only for first 30 sec after browser startup. |
| 329 // To make all invocations of AppListServiceWin::LoadProfileForWarmup visible | 330 // To make all invocations of AppListServiceWin::LoadProfileForWarmup visible |
| 330 // to the server-side analysis tool, reducing this period to 10 sec in Dev | 331 // to the server-side analysis tool, reducing this period to 10 sec in Dev |
| 331 // builds and Canary, where profiler instrumentations are enabled. | 332 // builds and Canary, where profiler instrumentations are enabled. |
| 332 switch (chrome::VersionInfo::GetChannel()) { | 333 switch (chrome::GetChannel()) { |
| 333 case version_info::Channel::UNKNOWN: | 334 case version_info::Channel::UNKNOWN: |
| 334 case version_info::Channel::CANARY: | 335 case version_info::Channel::CANARY: |
| 335 kInitWindowDelay = 10; | 336 kInitWindowDelay = 10; |
| 336 break; | 337 break; |
| 337 | 338 |
| 338 case version_info::Channel::DEV: | 339 case version_info::Channel::DEV: |
| 339 case version_info::Channel::BETA: | 340 case version_info::Channel::BETA: |
| 340 case version_info::Channel::STABLE: | 341 case version_info::Channel::STABLE: |
| 341 // Except on Canary, don't bother scheduling an app launcher warmup when | 342 // Except on Canary, don't bother scheduling an app launcher warmup when |
| 342 // it's not already enabled. Always schedule on Canary while collecting | 343 // it's not already enabled. Always schedule on Canary while collecting |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 activation_tracker_.reset(new ActivationTrackerWin(this)); | 411 activation_tracker_.reset(new ActivationTrackerWin(this)); |
| 411 } | 412 } |
| 412 | 413 |
| 413 void AppListServiceWin::OnViewDismissed() { | 414 void AppListServiceWin::OnViewDismissed() { |
| 414 activation_tracker_->OnViewHidden(); | 415 activation_tracker_->OnViewHidden(); |
| 415 } | 416 } |
| 416 | 417 |
| 417 void AppListServiceWin::MoveNearCursor(app_list::AppListView* view) { | 418 void AppListServiceWin::MoveNearCursor(app_list::AppListView* view) { |
| 418 AppListWin::MoveNearCursor(view); | 419 AppListWin::MoveNearCursor(view); |
| 419 } | 420 } |
| OLD | NEW |