Switch to gfx::Image

This commit is contained in:
Paul Betts 2015-02-06 17:00:26 -08:00
parent fa6d499a4e
commit 1b9649b481
5 changed files with 13 additions and 6 deletions

View file

@ -2,6 +2,10 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
namespace gfx {
class Image;
}
#include "atom/browser/api/atom_api_window.h" #include "atom/browser/api/atom_api_window.h"
#include "atom/browser/api/atom_api_web_contents.h" #include "atom/browser/api/atom_api_web_contents.h"
@ -10,6 +14,7 @@
#include "atom/common/native_mate_converters/gfx_converter.h" #include "atom/common/native_mate_converters/gfx_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h" #include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h" #include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/native_mate_converters/image_converter.h"
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "native_mate/callback.h" #include "native_mate/callback.h"
#include "native_mate/constructor.h" #include "native_mate/constructor.h"

View file

@ -9,6 +9,7 @@
#include <vector> #include <vector>
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "ui/gfx/image/image.h"
#include "atom/browser/native_window_observer.h" #include "atom/browser/native_window_observer.h"
#include "atom/browser/api/event_emitter.h" #include "atom/browser/api/event_emitter.h"
#include "native_mate/handle.h" #include "native_mate/handle.h"
@ -118,7 +119,7 @@ class Window : public mate::EventEmitter,
void CapturePage(mate::Arguments* args); void CapturePage(mate::Arguments* args);
void Print(mate::Arguments* args); void Print(mate::Arguments* args);
void SetProgressBar(double progress); void SetProgressBar(double progress);
void SetOverlayIcon(const gfx::ImageSkia& overlay, void SetOverlayIcon(const gfx::Image& overlay,
const std::string& description); const std::string& description);
void SetAutoHideMenuBar(bool auto_hide); void SetAutoHideMenuBar(bool auto_hide);
bool IsMenuBarAutoHide(); bool IsMenuBarAutoHide();

View file

@ -21,7 +21,7 @@
#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_observer.h"
#include "native_mate/persistent_dictionary.h" #include "native_mate/persistent_dictionary.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image.h"
namespace base { namespace base {
class CommandLine; class CommandLine;
@ -142,7 +142,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
virtual bool HasModalDialog(); virtual bool HasModalDialog();
virtual gfx::NativeWindow GetNativeWindow() = 0; virtual gfx::NativeWindow GetNativeWindow() = 0;
virtual void SetProgressBar(double progress) = 0; virtual void SetProgressBar(double progress) = 0;
virtual void SetOverlayIcon(const gfx::ImageSkia& overlay, virtual void SetOverlayIcon(const gfx::Image& overlay,
const std::string& description) = 0; const std::string& description) = 0;
virtual bool IsClosed() const { return is_closed_; } virtual bool IsClosed() const { return is_closed_; }

View file

@ -10,7 +10,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "atom/browser/ui/views/menu_bar.h" #include "atom/browser/ui/views/menu_bar.h"
#include "atom/browser/ui/views/menu_layout.h" #include "atom/browser/ui/views/menu_layout.h"
#include "atom/common/draggable_region.h" #include "atom/common/draggable_region.h"
@ -22,6 +21,8 @@
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h" #include "ui/base/hit_test.h"
#include "ui/gfx/icon_util.h"
#include "ui/gfx/image/image.h"
#include "ui/views/background.h" #include "ui/views/background.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/controls/webview/webview.h" #include "ui/views/controls/webview/webview.h"
@ -614,7 +615,7 @@ void NativeWindowViews::SetProgressBar(double progress) {
} }
void NativeWindowViews::SetOverlayIcon( void NativeWindowViews::SetOverlayIcon(
const gfx::ImageSkia& overlay, const gfx::Image& overlay,
const std::string& description) { const std::string& description) {
#if defined(OS_WIN) #if defined(OS_WIN)
if (base::win::GetVersion() < base::win::VERSION_WIN7) if (base::win::GetVersion() < base::win::VERSION_WIN7)

View file

@ -73,7 +73,7 @@ class NativeWindowViews : public NativeWindow,
bool IsKiosk() override; bool IsKiosk() override;
void SetMenu(ui::MenuModel* menu_model) override; void SetMenu(ui::MenuModel* menu_model) override;
gfx::NativeWindow GetNativeWindow() override; gfx::NativeWindow GetNativeWindow() override;
void SetOverlayIcon(const gfx::ImageSkia& overlay, void SetOverlayIcon(const gfx::Image& overlay,
const std::string& description) override; const std::string& description) override;
void SetProgressBar(double value) override; void SetProgressBar(double value) override;
void SetAutoHideMenuBar(bool auto_hide) override; void SetAutoHideMenuBar(bool auto_hide) override;