From d5283b23375329a22789af6688eb374632341164 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Jul 2014 15:38:53 +0800 Subject: [PATCH] Allow access FileSystem api in devtools. It is required by the load/save feature of profilers. --- brightray/browser/browser_client.cc | 8 ++++++++ brightray/browser/browser_client.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/brightray/browser/browser_client.cc b/brightray/browser/browser_client.cc index fabd51cc74cd..f96e7f057e0f 100644 --- a/brightray/browser/browser_client.cc +++ b/brightray/browser/browser_client.cc @@ -9,6 +9,8 @@ #include "browser/media/media_capture_devices_dispatcher.h" #include "browser/notification_presenter.h" +#include "content/public/common/url_constants.h" + namespace brightray { namespace { @@ -88,4 +90,10 @@ content::MediaObserver* BrowserClient::GetMediaObserver() { return MediaCaptureDevicesDispatcher::GetInstance(); } +void BrowserClient::GetAdditionalAllowedSchemesForFileSystem( + std::vector* additional_schemes) { + additional_schemes->push_back(content::kChromeDevToolsScheme); + additional_schemes->push_back(content::kChromeUIScheme); +} + } // namespace brightray diff --git a/brightray/browser/browser_client.h b/brightray/browser/browser_client.h index 42a7380a63c3..41b15ea9716a 100644 --- a/brightray/browser/browser_client.h +++ b/brightray/browser/browser_client.h @@ -51,6 +51,8 @@ class BrowserClient : public content::ContentBrowserClient { int render_view_id, int notification_id) OVERRIDE; virtual content::MediaObserver* GetMediaObserver() OVERRIDE; + virtual void GetAdditionalAllowedSchemesForFileSystem( + std::vector* additional_schemes) OVERRIDE; BrowserMainParts* browser_main_parts_; scoped_ptr notification_presenter_;