Added a new UMA to track tab switching latency time

Created a new TabSwitchEventLatencyRecorder class that will track
the latency between input event timestamp and the time when tab
switching begin processing, and upload the metric to a UMA.

Changed the TabStripModel::ActivateTabAt method interface to take
enough input event context from the Tab to the TabStripModel,
and changed all TabStripModel::ActivateTabAt callsites accordingly.

Bug: 921120
Change-Id: I5476ad7db6ebf12e66af61a87c057a154a8e94e4
Reviewed-on: https://chromium-review.googlesource.com/c/1461188
Commit-Queue: Edwin Joe <[email protected]>
Reviewed-by: Sadrul Chowdhury <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Jesse Doherty <[email protected]>
Reviewed-by: Bret Sepulveda <[email protected]>
Reviewed-by: Jonathan Ross <[email protected]>
Cr-Commit-Position: refs/heads/master@{#636120}
diff --git a/chrome/browser/command_updater_impl.h b/chrome/browser/command_updater_impl.h
index 59ff772..34c6856 100644
--- a/chrome/browser/command_updater_impl.h
+++ b/chrome/browser/command_updater_impl.h
@@ -34,9 +34,13 @@
   // Overriden from CommandUpdater:
   bool SupportsCommand(int id) const override;
   bool IsCommandEnabled(int id) const override;
-  bool ExecuteCommand(int id) override;
+  bool ExecuteCommand(
+      int id,
+      base::TimeTicks time_stamp = base::TimeTicks::Now()) override;
   bool ExecuteCommandWithDisposition(
-      int id, WindowOpenDisposition disposition) override;
+      int id,
+      WindowOpenDisposition disposition,
+      base::TimeTicks time_stamp = base::TimeTicks::Now()) override;
   void AddCommandObserver(int id, CommandObserver* observer) override;
   void RemoveCommandObserver(int id, CommandObserver* observer) override;
   void RemoveCommandObserver(CommandObserver* observer) override;