Make size optional
This commit is contained in:
parent
ff3aaa55f7
commit
bec671bac8
2 changed files with 14 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue