From 0eae030f6764abf36e7653c557aa0dc339ee44a0 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 29 Mar 2015 16:33:51 +0800 Subject: [PATCH] Enable webui in content layer. Allow to access Chrome's webuis(chrome://gpu, chrome://tracing) in Atom Shell. --- brightray/common/content_client.cc | 5 +++++ brightray/common/content_client.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/brightray/common/content_client.cc b/brightray/common/content_client.cc index 9b38e9304f7..3867ed6fe3f 100644 --- a/brightray/common/content_client.cc +++ b/brightray/common/content_client.cc @@ -46,4 +46,9 @@ gfx::Image& ContentClient::GetNativeImageNamed(int resource_id) const { resource_id); } +base::RefCountedStaticMemory* ContentClient::GetDataResourceBytes( + int resource_id) const { + return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); +} + } // namespace brightray diff --git a/brightray/common/content_client.h b/brightray/common/content_client.h index e5433cd6a2c..5d22e55ab9d 100644 --- a/brightray/common/content_client.h +++ b/brightray/common/content_client.h @@ -22,6 +22,8 @@ class ContentClient : public content::ContentClient { base::StringPiece GetDataResource(int resource_id, ui::ScaleFactor) const override; gfx::Image& GetNativeImageNamed(int resource_id) const override; + base::RefCountedStaticMemory* GetDataResourceBytes( + int resource_id) const override; DISALLOW_COPY_AND_ASSIGN(ContentClient); };