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

Unified Diff: base/win/metro.h

Issue 11280112: UMA for Windows 8 Secondary Tile pinning/unpinning user actions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add TODO Created 8 years 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 | « no previous file | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/metro.h
diff --git a/base/win/metro.h b/base/win/metro.h
index a43bbc31b23afd439526022816441ac691419ced..9354de83bb0f225ac4203a7de2514eff88d14d07 100644
--- a/base/win/metro.h
+++ b/base/win/metro.h
@@ -9,6 +9,8 @@
#include <wpcapi.h>
#include "base/base_export.h"
+#include "base/callback.h"
+#include "base/file_path.h"
#include "base/string16.h"
namespace base {
@@ -36,6 +38,26 @@ enum MetroPreviousExecutionState {
LASTEXECUTIONSTATE,
};
+// Enum values for UMA histogram reporting of site-specific tile pinning.
+// TODO(tapted): Move this to win8/util when ready (http://crbug.com/160288).
+enum MetroSecondaryTilePinUmaResult {
+ METRO_PIN_STATE_NONE,
+ METRO_PIN_INITIATED,
+ METRO_PIN_LOGO_READY,
+ METRO_PIN_REQUEST_SHOW_ERROR,
+ METRO_PIN_RESULT_CANCEL,
+ METRO_PIN_RESULT_OK,
+ METRO_PIN_RESULT_OTHER,
+ METRO_PIN_RESULT_ERROR,
+ METRO_UNPIN_INITIATED,
+ METRO_UNPIN_REQUEST_SHOW_ERROR,
+ METRO_UNPIN_RESULT_CANCEL,
+ METRO_UNPIN_RESULT_OK,
+ METRO_UNPIN_RESULT_OTHER,
+ METRO_UNPIN_RESULT_ERROR,
+ METRO_PIN_STATE_LIMIT
+};
+
// Contains information about the currently displayed tab in metro mode.
struct CurrentTabInfo {
wchar_t* title;
@@ -97,6 +119,23 @@ typedef void (*MetroNotification)(const char* origin_url,
MetroNotificationClickedHandler handler,
const wchar_t* handler_context);
+// Callback for UMA invoked by Metro Pin and UnPin functions after user gesture.
+typedef base::Callback<void(MetroSecondaryTilePinUmaResult)>
+ MetroPinUmaResultCallback;
+
+// Function to pin a site-specific tile (bookmark) to the start screen.
+typedef void (*MetroPinToStartScreen)(
+ const string16& tile_id,
+ const string16& title,
+ const string16& url,
+ const FilePath& logo_path,
+ const MetroPinUmaResultCallback& callback);
+
+// Function to un-pin a site-specific tile (bookmark) from the start screen.
+typedef void (*MetroUnPinFromStartScreen)(
+ const string16& title_id,
+ const MetroPinUmaResultCallback& callback);
+
} // namespace win
} // namespace base
« no previous file with comments | « no previous file | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698