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

Unified Diff: chrome/browser/chromeos/first_run/step.h

Issue 131023003: Added UMA metrics for ChromeOS first-run UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « chrome/browser/chromeos/first_run/metrics.h ('k') | chrome/browser/chromeos/first_run/step.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/first_run/step.h
diff --git a/chrome/browser/chromeos/first_run/step.h b/chrome/browser/chromeos/first_run/step.h
index d50e670c857da97053d7192ffe7bb5958e8c30ca..7f72cab33f2690bb840fb1159c7ad266b093a1ae 100644
--- a/chrome/browser/chromeos/first_run/step.h
+++ b/chrome/browser/chromeos/first_run/step.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/time/time.h"
namespace ash {
class FirstRunHelper;
@@ -31,28 +32,40 @@ class Step {
virtual ~Step();
// Step shows its content.
- virtual void Show() = 0;
+ void Show();
- // Called before hiding step. Default implementation removes holes from
- // background.
- virtual void OnBeforeHide();
+ // Called before hiding step.
+ void OnBeforeHide();
// Called after step has been hidden.
- virtual void OnAfterHide();
-
- // Returns size of overlay window.
- gfx::Size GetOverlaySize() const;
+ void OnAfterHide();
const std::string& name() const { return name_; }
protected:
ash::FirstRunHelper* shell_helper() const { return shell_helper_; }
FirstRunActor* actor() const { return actor_; }
+ gfx::Size GetOverlaySize() const;
+
+ // Called from Show method.
+ virtual void DoShow() = 0;
+
+ // Called from OnBeforeHide. Step implementation could override this method to
+ // react on corresponding event.
+ virtual void DoOnBeforeHide() {}
+
+ // Called from OnAfterHide. Step implementation could override this method to
+ // react on event.
+ virtual void DoOnAfterHide() {}
private:
+ // Records time spent on step to UMA.
+ void RecordCompletion();
+
std::string name_;
ash::FirstRunHelper* shell_helper_;
FirstRunActor* actor_;
+ base::Time show_time_;
DISALLOW_COPY_AND_ASSIGN(Step);
};
« no previous file with comments | « chrome/browser/chromeos/first_run/metrics.h ('k') | chrome/browser/chromeos/first_run/step.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698