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

Side by Side Diff: ash/shell.cc

Issue 1165003010: Revert r333104: "Added UMA statistics for changing the active window via click or touch events." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « ash/metrics/user_metrics_recorder.cc ('k') | tools/metrics/actions/actions.xml » ('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 (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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 user_metrics_recorder_.reset(new UserMetricsRecorder); 653 user_metrics_recorder_.reset(new UserMetricsRecorder);
654 654
655 #if defined(OS_CHROMEOS) 655 #if defined(OS_CHROMEOS)
656 PowerStatus::Initialize(); 656 PowerStatus::Initialize();
657 #endif 657 #endif
658 } 658 }
659 659
660 Shell::~Shell() { 660 Shell::~Shell() {
661 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); 661 TRACE_EVENT0("shutdown", "ash::Shell::Destructor");
662 662
663 user_metrics_recorder_->OnShellShuttingDown();
664
665 delegate_->PreShutdown(); 663 delegate_->PreShutdown();
666 664
667 views::FocusManagerFactory::Install(NULL); 665 views::FocusManagerFactory::Install(NULL);
668 666
669 // Remove the focus from any window. This will prevent overhead and side 667 // Remove the focus from any window. This will prevent overhead and side
670 // effects (e.g. crashes) from changing focus during shutdown. 668 // effects (e.g. crashes) from changing focus during shutdown.
671 // See bug crbug.com/134502. 669 // See bug crbug.com/134502.
672 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL); 670 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL);
673 671
674 // Please keep in same order as in Init() because it's easy to miss one. 672 // Please keep in same order as in Init() because it's easy to miss one.
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 video_activity_notifier_.reset( 1078 video_activity_notifier_.reset(
1081 new VideoActivityNotifier(video_detector_.get())); 1079 new VideoActivityNotifier(video_detector_.get()));
1082 bluetooth_notification_controller_.reset(new BluetoothNotificationController); 1080 bluetooth_notification_controller_.reset(new BluetoothNotificationController);
1083 last_window_closed_logout_reminder_.reset(new LastWindowClosedLogoutReminder); 1081 last_window_closed_logout_reminder_.reset(new LastWindowClosedLogoutReminder);
1084 screen_orientation_controller_.reset(new ScreenOrientationController()); 1082 screen_orientation_controller_.reset(new ScreenOrientationController());
1085 #endif 1083 #endif
1086 // The compositor thread and main message loop have to be running in 1084 // The compositor thread and main message loop have to be running in
1087 // order to create mirror window. Run it after the main message loop 1085 // order to create mirror window. Run it after the main message loop
1088 // is started. 1086 // is started.
1089 display_manager_->CreateMirrorWindowAsyncIfAny(); 1087 display_manager_->CreateMirrorWindowAsyncIfAny();
1090
1091 user_metrics_recorder_->OnShellInitialized();
1092 } 1088 }
1093 1089
1094 void Shell::InitKeyboard() { 1090 void Shell::InitKeyboard() {
1095 if (keyboard::IsKeyboardEnabled()) { 1091 if (keyboard::IsKeyboardEnabled()) {
1096 if (keyboard::KeyboardController::GetInstance()) { 1092 if (keyboard::KeyboardController::GetInstance()) {
1097 RootWindowControllerList controllers = GetAllRootWindowControllers(); 1093 RootWindowControllerList controllers = GetAllRootWindowControllers();
1098 for (RootWindowControllerList::iterator iter = controllers.begin(); 1094 for (RootWindowControllerList::iterator iter = controllers.begin();
1099 iter != controllers.end(); ++iter) { 1095 iter != controllers.end(); ++iter) {
1100 (*iter)->DeactivateKeyboard( 1096 (*iter)->DeactivateKeyboard(
1101 keyboard::KeyboardController::GetInstance()); 1097 keyboard::KeyboardController::GetInstance());
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1179
1184 void Shell::OnWindowActivated( 1180 void Shell::OnWindowActivated(
1185 aura::client::ActivationChangeObserver::ActivationReason reason, 1181 aura::client::ActivationChangeObserver::ActivationReason reason,
1186 aura::Window* gained_active, 1182 aura::Window* gained_active,
1187 aura::Window* lost_active) { 1183 aura::Window* lost_active) {
1188 if (gained_active) 1184 if (gained_active)
1189 target_root_window_ = gained_active->GetRootWindow(); 1185 target_root_window_ = gained_active->GetRootWindow();
1190 } 1186 }
1191 1187
1192 } // namespace ash 1188 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698