From fa6d499a4ef97000f558b8af00bbed25ea363eb4 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Fri, 6 Feb 2015 16:31:41 -0800 Subject: [PATCH] Come correct with line length and constness --- atom/browser/api/atom_api_window.h | 3 ++- atom/browser/native_window.h | 3 ++- atom/browser/native_window_views.cc | 10 ++++++++-- atom/browser/native_window_views.h | 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/atom/browser/api/atom_api_window.h b/atom/browser/api/atom_api_window.h index d81a3470b7df..70609d9894a5 100644 --- a/atom/browser/api/atom_api_window.h +++ b/atom/browser/api/atom_api_window.h @@ -118,7 +118,8 @@ class Window : public mate::EventEmitter, void CapturePage(mate::Arguments* args); void Print(mate::Arguments* args); void SetProgressBar(double progress); - void SetOverlayIcon(gfx::ImageSkia& overlay, const std::string& description); + void SetOverlayIcon(const gfx::ImageSkia& overlay, + const std::string& description); void SetAutoHideMenuBar(bool auto_hide); bool IsMenuBarAutoHide(); void SetMenuBarVisibility(bool visible); diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index 0a9ecaf00dbd..8048b170d2c9 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -142,7 +142,8 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate, virtual bool HasModalDialog(); virtual gfx::NativeWindow GetNativeWindow() = 0; virtual void SetProgressBar(double progress) = 0; - virtual void SetOverlayIcon(gfx::ImageSkia& overlay, const std::string& description) = 0; + virtual void SetOverlayIcon(const gfx::ImageSkia& overlay, + const std::string& description) = 0; virtual bool IsClosed() const { return is_closed_; } virtual void OpenDevTools(); diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 3d3b857ec365..ccb760a88942 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -613,7 +613,9 @@ void NativeWindowViews::SetProgressBar(double progress) { #endif } -void NativeWindowViews::SetOverlayIcon(gfx::ImageSkia& overlay, const std::string& description) { +void NativeWindowViews::SetOverlayIcon( + const gfx::ImageSkia& overlay, + const std::string& description) { #if defined(OS_WIN) if (base::win::GetVersion() < base::win::VERSION_WIN7) return; @@ -624,8 +626,12 @@ void NativeWindowViews::SetOverlayIcon(gfx::ImageSkia& overlay, const std::strin FAILED(taskbar->HrInit()))) { return; } + HWND frame = views::HWNDForNativeWindow(GetNativeWindow()); - taskbar->SetOverlayIcon(frame, IconUtil::CreateHICONFromSkiaBitmap(overlay.AsBitmap()), description); + + taskbar->SetOverlayIcon(frame, + IconUtil::CreateHICONFromSkiaBitmap(overlay.AsBitmap()), + description); #endif } diff --git a/atom/browser/native_window_views.h b/atom/browser/native_window_views.h index e5fb86328358..5ab93f905e28 100644 --- a/atom/browser/native_window_views.h +++ b/atom/browser/native_window_views.h @@ -73,7 +73,8 @@ class NativeWindowViews : public NativeWindow, bool IsKiosk() override; void SetMenu(ui::MenuModel* menu_model) override; gfx::NativeWindow GetNativeWindow() override; - void SetOverlayIcon(gfx::ImageSkia& overlay, std::string& description) override; + void SetOverlayIcon(const gfx::ImageSkia& overlay, + const std::string& description) override; void SetProgressBar(double value) override; void SetAutoHideMenuBar(bool auto_hide) override; bool IsMenuBarAutoHide() override;