.SetMethod("isReady", base::Bind(&Browser::is_ready, browser))
.SetMethod("addRecentDocument",
base::Bind(&Browser::AddRecentDocument, browser))
+ .SetMethod("clearRecentDocuments",
+ base::Bind(&Browser::ClearRecentDocuments, browser))
.SetMethod("getDataPath", &App::GetDataPath)
.SetMethod("resolveProxy", &App::ResolveProxy)
.SetMethod("setDesktopName", &App::SetDesktopName);
// Add the |path| to recent documents list.
void AddRecentDocument(const base::FilePath& path);
+ // Clear the recent documents list.
+ void ClearRecentDocuments();
+
#if defined(OS_MACOSX)
// Bounce the dock icon.
enum BounceType {
void Browser::AddRecentDocument(const base::FilePath& path) {
}
+void Browser::ClearRecentDocuments() {
+}
+
std::string Browser::GetExecutableFileVersion() const {
return ATOM_VERSION_STRING;
}
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:u];
}
+void Browser::ClearRecentDocuments() {
+}
+
std::string Browser::GetExecutableFileVersion() const {
NSDictionary* infoDictionary = base::mac::OuterBundle().infoDictionary;
NSString *version = [infoDictionary objectForKey:@"CFBundleVersion"];
}
}
+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));