namespace mate {
+#if defined(OS_WIN)
template<>
struct Converter<Browser::UserTask> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
if (!dict.Get("program", &(out->program)) ||
!dict.Get("title", &(out->title)))
return false;
+ if (dict.Get("iconPath", &(out->icon_path)) &&
+ !dict.Get("iconIndex", &(out->icon_index)))
+ return false;
dict.Get("arguments", &(out->arguments));
dict.Get("description", &(out->description));
return true;
}
};
+#endif
} // namespace mate
base::string16 arguments;
base::string16 title;
base::string16 description;
+ base::FilePath icon_path;
+ int icon_index;
};
// Add a custom task to jump list.
FAILED(link->SetDescription(task.description.c_str())))
return;
+ if (!task.icon_path.empty() &&
+ FAILED(link->SetIconLocation(task.icon_path.value().c_str(),
+ task.icon_index)))
+ return;
+
CComQIPtr<IPropertyStore> property_store = link;
if (!base::win::SetStringValueForPropertyStore(property_store, PKEY_Title,
task.title.c_str()))