Make size optional

This commit is contained in:
Yury Solovyov 2016-11-03 21:04:56 +03:00 committed by Kevin Sawicki
parent ff3aaa55f7
commit bec671bac8
2 changed files with 14 additions and 4 deletions

View file

@ -868,8 +868,19 @@ JumpListResult App::SetJumpList(v8::Local<v8::Value> val,
#endif // defined(OS_WIN)
void App::GetFileIcon(const base::FilePath& path,
IconLoader::IconSize icon_size,
const FileIconCallback& callback) {
mate::Arguments* args) {
IconLoader::IconSize icon_size;
FileIconCallback callback;
if (!args->GetNext(&icon_size)) {
icon_size = IconLoader::IconSize::NORMAL;
}
if (!args->GetNext(&callback)) {
args->ThrowError();
return;
}
IconManager* icon_manager = IconManager::GetInstance();
gfx::Image* icon = icon_manager->LookupIconFromFilepath(path, icon_size);
if (icon) {

View file

@ -133,8 +133,7 @@ class App : public AtomBrowserClient::Delegate,
const net::CompletionCallback& callback);
#endif
void GetFileIcon(const base::FilePath& path,
IconLoader::IconSize icon_size,
const FileIconCallback& callback);
mate::Arguments* args);
#if defined(OS_WIN)
// Get the current Jump List settings.