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

Unified Diff: ash/shell.cc

Issue 1153633006: 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: Polish and added unit tests. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index fb61b55893a6e7c274829105a75bea1f9966b97d..502f6711a36b47b4cd47b6777052781ba28a627b 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -660,6 +660,8 @@ Shell::Shell(ShellDelegate* delegate)
Shell::~Shell() {
TRACE_EVENT0("shutdown", "ash::Shell::Destructor");
+ user_metrics_recorder_->OnShellShuttingDown();
+
delegate_->PreShutdown();
views::FocusManagerFactory::Install(NULL);
@@ -1085,6 +1087,8 @@ void Shell::Init(const ShellInitParams& init_params) {
// order to create mirror window. Run it after the main message loop
// is started.
display_manager_->CreateMirrorWindowAsyncIfAny();
+
+ user_metrics_recorder_->OnShellInitialized();
}
void Shell::InitKeyboard() {
@@ -1177,8 +1181,10 @@ void Shell::OnEvent(ui::Event* event) {
////////////////////////////////////////////////////////////////////////////////
// Shell, aura::client::ActivationChangeObserver implementation:
-void Shell::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
+void Shell::OnWindowActivated(
+ aura::client::ActivationChangeObserver::ActivationReason reason,
+ aura::Window* gained_active,
+ aura::Window* lost_active) {
if (gained_active)
target_root_window_ = gained_active->GetRootWindow();
}
« no previous file with comments | « ash/shell.h ('k') | ash/test/test_activation_delegate.h » ('j') | ui/aura/window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698