win: Add app.clearRecentDocuments API
This commit is contained in:
parent
528f7bd45f
commit
48412769df
5 changed files with 21 additions and 0 deletions
|
@ -59,6 +59,16 @@ void Browser::AddRecentDocument(const base::FilePath& path) {
|
|||
}
|
||||
}
|
||||
|
||||
void Browser::ClearRecentDocuments() {
|
||||
CComPtr<IApplicationDestinations> destinations;
|
||||
if (FAILED(destinations.CoCreateInstance(CLSID_ApplicationDestinations,
|
||||
NULL, CLSCTX_INPROC_SERVER)))
|
||||
return;
|
||||
if (FAILED(destinations->SetAppID(app_user_model_id_.c_str())))
|
||||
return;
|
||||
destinations->RemoveAllDestinations();
|
||||
}
|
||||
|
||||
void Browser::SetAppUserModelID(const std::string& name) {
|
||||
app_user_model_id_ = base::UTF8ToUTF16(
|
||||
base::StringPrintf("atom-shell.app.%s", name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue