Exposes more Handoff related APIs to Electron.

This commit is contained in:
Rafael Nobre 2017-06-26 16:14:44 -03:00 committed by Cheng Zhao
parent 787675ab08
commit a870799c32
9 changed files with 234 additions and 5 deletions

View file

@ -119,10 +119,32 @@ class Browser : public WindowListObserver {
// Returns the type name of the current user activity.
std::string GetCurrentActivityType();
// Invalidates the current user activity.
void InvalidateCurrentActivity();
// Updates the current user activity
void UpdateCurrentActivity(const std::string& type,
const base::DictionaryValue& user_info);
// Indicates that an user activity is about to be resumed.
bool WillContinueUserActivity(const std::string& type);
// Indicates a failure to resume a Handoff activity.
void DidFailToContinueUserActivity(const std::string& type,
const std::string& error);
// Resumes an activity via hand-off.
bool ContinueUserActivity(const std::string& type,
const base::DictionaryValue& user_info);
// Indicates that an activity was continued on another device.
void UserActivityWasContinued(const std::string& type,
const base::DictionaryValue& user_info);
// Gives an oportunity to update the Handoff payload.
void UpdateUserActivityState(const std::string& type,
const base::DictionaryValue& user_info);
// Bounce the dock icon.
enum BounceType {
BOUNCE_CRITICAL = 0,