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)
|
#endif // defined(OS_WIN)
|
||||||
|
|
||||||
void App::GetFileIcon(const base::FilePath& path,
|
void App::GetFileIcon(const base::FilePath& path,
|
||||||
IconLoader::IconSize icon_size,
|
mate::Arguments* args) {
|
||||||
const FileIconCallback& callback) {
|
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();
|
IconManager* icon_manager = IconManager::GetInstance();
|
||||||
gfx::Image* icon = icon_manager->LookupIconFromFilepath(path, icon_size);
|
gfx::Image* icon = icon_manager->LookupIconFromFilepath(path, icon_size);
|
||||||
if (icon) {
|
if (icon) {
|
||||||
|
|
|
@ -133,8 +133,7 @@ class App : public AtomBrowserClient::Delegate,
|
||||||
const net::CompletionCallback& callback);
|
const net::CompletionCallback& callback);
|
||||||
#endif
|
#endif
|
||||||
void GetFileIcon(const base::FilePath& path,
|
void GetFileIcon(const base::FilePath& path,
|
||||||
IconLoader::IconSize icon_size,
|
mate::Arguments* args);
|
||||||
const FileIconCallback& callback);
|
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
// Get the current Jump List settings.
|
// Get the current Jump List settings.
|
||||||
|
|
Loading…
Reference in a new issue