Store window icon as ImageSkia.
This commit is contained in:
parent
a696f06a23
commit
445fe158cc
3 changed files with 4 additions and 13 deletions
|
@ -45,8 +45,6 @@
|
|||
#include "ipc/ipc_message_macros.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "ui/gfx/codec/png_codec.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/gfx/point.h"
|
||||
#include "ui/gfx/rect.h"
|
||||
#include "ui/gfx/size.h"
|
||||
|
@ -70,9 +68,7 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
|
|||
options.Get(switches::kFrame, &has_frame_);
|
||||
|
||||
// Read icon before window is created.
|
||||
gfx::ImageSkia icon;
|
||||
if (options.Get(switches::kIcon, &icon))
|
||||
icon_.reset(new gfx::Image(icon));
|
||||
options.Get(switches::kIcon, &icon_);
|
||||
|
||||
// Read iframe security before any navigation.
|
||||
options.Get(switches::kNodeIntegration, &node_integration_);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "content/public/browser/notification_registrar.h"
|
||||
#include "content/public/browser/notification_observer.h"
|
||||
#include "native_mate/scoped_persistent.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
|
||||
struct WebPreferences;
|
||||
|
||||
|
@ -34,7 +35,6 @@ class WebContents;
|
|||
}
|
||||
|
||||
namespace gfx {
|
||||
class Image;
|
||||
class Point;
|
||||
class Rect;
|
||||
class Size;
|
||||
|
@ -252,7 +252,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
|||
bool has_frame_;
|
||||
|
||||
// Window icon.
|
||||
scoped_ptr<gfx::Image> icon_;
|
||||
gfx::ImageSkia icon_;
|
||||
|
||||
private:
|
||||
// Schedule a notification unresponsive event.
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/views/background.h"
|
||||
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
|
||||
#include "ui/views/controls/webview/webview.h"
|
||||
|
@ -492,10 +490,7 @@ bool NativeWindowViews::ShouldHandleSystemCommands() const {
|
|||
}
|
||||
|
||||
gfx::ImageSkia NativeWindowViews::GetWindowAppIcon() {
|
||||
if (icon_)
|
||||
return *(icon_->ToImageSkia());
|
||||
else
|
||||
return gfx::ImageSkia();
|
||||
return icon_;
|
||||
}
|
||||
|
||||
gfx::ImageSkia NativeWindowViews::GetWindowIcon() {
|
||||
|
|
Loading…
Reference in a new issue