Index: base/win/metro.h |
diff --git a/base/win/metro.h b/base/win/metro.h |
index a43bbc31b23afd439526022816441ac691419ced..2a37c72c8bfe31b0ce9161b77cbce88f72fa3f15 100644 |
--- a/base/win/metro.h |
+++ b/base/win/metro.h |
@@ -9,6 +9,7 @@ |
#include <wpcapi.h> |
#include "base/base_export.h" |
+#include "base/file_path.h" |
#include "base/string16.h" |
namespace base { |
@@ -36,6 +37,25 @@ enum MetroPreviousExecutionState { |
LASTEXECUTIONSTATE, |
}; |
+// Enum values for UMA histogram reporting of site-specific tile pinning. |
+enum MetroSecondaryTilePinState { |
+ 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 +117,20 @@ typedef void (*MetroNotification)(const char* origin_url, |
MetroNotificationClickedHandler handler, |
const wchar_t* handler_context); |
+// Callback invoked by Metro Pin and UnPin functions after user gesture. |
+typedef void (*MetroPinResultCallback)(MetroSecondaryTilePinState result); |
benwells
2012/11/29 04:19:46
We should use something like base::Callback<void(M
tapted
2012/11/29 07:19:27
Done.
|
+ |
+// 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, |
+ MetroPinResultCallback callback); |
+ |
+// Function to un-pin a site-specific tile (bookmark) from the start screen. |
+typedef void (*MetroUnPinFromStartScreen)(const string16& title_id, |
+ MetroPinResultCallback callback); |
+ |
} // namespace win |
} // namespace base |