Fix compilation warnings due to API changes
This commit is contained in:
parent
289d3b54f3
commit
2c81fb4719
6 changed files with 20 additions and 47 deletions
|
@ -45,18 +45,6 @@ class BrowserContext::ResourceContext : public content::ResourceContext {
|
||||||
return getter_->GetURLRequestContext();
|
return getter_->GetURLRequestContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: We should probably allow clients to override this to implement more
|
|
||||||
// restrictive policies.
|
|
||||||
virtual bool AllowMicAccess(const GURL& origin) override {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: We should probably allow clients to override this to implement more
|
|
||||||
// restrictive policies.
|
|
||||||
virtual bool AllowCameraAccess(const GURL& origin) override {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
URLRequestContextGetter* getter_;
|
URLRequestContextGetter* getter_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,13 +68,13 @@ void BrowserContext::Initialize() {
|
||||||
base::PrefServiceFactory prefs_factory;
|
base::PrefServiceFactory prefs_factory;
|
||||||
prefs_factory.SetUserPrefsFile(prefs_path,
|
prefs_factory.SetUserPrefsFile(prefs_path,
|
||||||
JsonPrefStore::GetTaskRunnerForFile(
|
JsonPrefStore::GetTaskRunnerForFile(
|
||||||
prefs_path, BrowserThread::GetBlockingPool()));
|
prefs_path, BrowserThread::GetBlockingPool()).get());
|
||||||
|
|
||||||
auto registry = make_scoped_refptr(new PrefRegistrySimple);
|
auto registry = make_scoped_refptr(new PrefRegistrySimple);
|
||||||
RegisterInternalPrefs(registry);
|
RegisterInternalPrefs(registry.get());
|
||||||
RegisterPrefs(registry);
|
RegisterPrefs(registry.get());
|
||||||
|
|
||||||
prefs_ = prefs_factory.Create(registry);
|
prefs_ = prefs_factory.Create(registry.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserContext::~BrowserContext() {
|
BrowserContext::~BrowserContext() {
|
||||||
|
@ -102,7 +90,7 @@ void BrowserContext::RegisterInternalPrefs(PrefRegistrySimple* registry) {
|
||||||
net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
|
net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
|
||||||
content::ProtocolHandlerMap* protocol_handlers,
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
content::URLRequestInterceptorScopedVector protocol_interceptors) {
|
content::URLRequestInterceptorScopedVector protocol_interceptors) {
|
||||||
DCHECK(!url_request_getter_);
|
DCHECK(!url_request_getter_.get());
|
||||||
url_request_getter_ = new URLRequestContextGetter(
|
url_request_getter_ = new URLRequestContextGetter(
|
||||||
this,
|
this,
|
||||||
GetPath(),
|
GetPath(),
|
||||||
|
|
|
@ -68,13 +68,14 @@ class BundledDataSource : public content::URLDataSource {
|
||||||
int resource_id =
|
int resource_id =
|
||||||
content::DevToolsHttpHandler::GetFrontendResourceId(filename);
|
content::DevToolsHttpHandler::GetFrontendResourceId(filename);
|
||||||
|
|
||||||
DLOG_IF(WARNING, -1 == resource_id) << "Unable to find dev tool resource: "
|
DLOG_IF(WARNING, resource_id == -1)
|
||||||
<< filename << ". If you compiled with debug_devtools=1, try running"
|
<< "Unable to find dev tool resource: " << filename
|
||||||
" with --debug-devtools.";
|
<< ". If you compiled with debug_devtools=1, try running with "
|
||||||
|
"--debug-devtools.";
|
||||||
const ResourceBundle& rb = ResourceBundle::GetSharedInstance();
|
const ResourceBundle& rb = ResourceBundle::GetSharedInstance();
|
||||||
scoped_refptr<base::RefCountedStaticMemory> bytes(rb.LoadDataResourceBytes(
|
scoped_refptr<base::RefCountedStaticMemory> bytes(rb.LoadDataResourceBytes(
|
||||||
resource_id));
|
resource_id));
|
||||||
callback.Run(bytes);
|
callback.Run(bytes.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::string GetMimeType(const std::string& path) const override {
|
virtual std::string GetMimeType(const std::string& path) const override {
|
||||||
|
|
|
@ -21,8 +21,6 @@ using namespace brightray;
|
||||||
devtools_docked_ = NO;
|
devtools_docked_ = NO;
|
||||||
|
|
||||||
auto contents = inspectableWebContentsView_->inspectable_web_contents()->GetWebContents();
|
auto contents = inspectableWebContentsView_->inspectable_web_contents()->GetWebContents();
|
||||||
contents->SetAllowOverlappingViews(true);
|
|
||||||
|
|
||||||
auto contentsView = contents->GetNativeView();
|
auto contentsView = contents->GetNativeView();
|
||||||
[contentsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
[contentsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||||
[self addSubview:contentsView];
|
[self addSubview:contentsView];
|
||||||
|
@ -45,9 +43,17 @@ using namespace brightray;
|
||||||
if (visible == devtools_visible_)
|
if (visible == devtools_visible_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto webContents = inspectableWebContentsView_->inspectable_web_contents()->GetWebContents();
|
||||||
auto devToolsWebContents = inspectableWebContentsView_->inspectable_web_contents()->devtools_web_contents();
|
auto devToolsWebContents = inspectableWebContentsView_->inspectable_web_contents()->devtools_web_contents();
|
||||||
auto devToolsView = devToolsWebContents->GetNativeView();
|
auto devToolsView = devToolsWebContents->GetNativeView();
|
||||||
|
|
||||||
|
if (visible && devtools_docked_) {
|
||||||
|
webContents->SetAllowOtherViews(true);
|
||||||
|
devToolsWebContents->SetAllowOtherViews(true);
|
||||||
|
} else {
|
||||||
|
webContents->SetAllowOtherViews(false);
|
||||||
|
}
|
||||||
|
|
||||||
devtools_visible_ = visible;
|
devtools_visible_ = visible;
|
||||||
if (devtools_docked_) {
|
if (devtools_docked_) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
|
|
@ -142,19 +142,6 @@ void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
|
||||||
content::MediaRequestState state) {
|
content::MediaRequestState state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaCaptureDevicesDispatcher::OnAudioStreamPlaying(
|
|
||||||
int render_process_id,
|
|
||||||
int render_frame_id,
|
|
||||||
int stream_id,
|
|
||||||
const ReadPowerAndClipCallback& power_read_callback) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void MediaCaptureDevicesDispatcher::OnAudioStreamStopped(
|
|
||||||
int render_process_id,
|
|
||||||
int render_frame_id,
|
|
||||||
int stream_id) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void MediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
void MediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
||||||
int render_process_id,
|
int render_process_id,
|
||||||
int render_view_id) {
|
int render_view_id) {
|
||||||
|
|
|
@ -60,15 +60,6 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||||
const GURL& security_origin,
|
const GURL& security_origin,
|
||||||
content::MediaStreamType stream_type,
|
content::MediaStreamType stream_type,
|
||||||
content::MediaRequestState state) override;
|
content::MediaRequestState state) override;
|
||||||
virtual void OnAudioStreamPlaying(
|
|
||||||
int render_process_id,
|
|
||||||
int render_frame_id,
|
|
||||||
int stream_id,
|
|
||||||
const ReadPowerAndClipCallback& power_read_callback) override;
|
|
||||||
virtual void OnAudioStreamStopped(
|
|
||||||
int render_process_id,
|
|
||||||
int render_frame_id,
|
|
||||||
int stream_id) override;
|
|
||||||
virtual void OnCreatingAudioStream(int render_process_id,
|
virtual void OnCreatingAudioStream(int render_process_id,
|
||||||
int render_view_id) override;
|
int render_view_id) override;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "net/url_request/url_request_intercepting_job_factory.h"
|
#include "net/url_request/url_request_intercepting_job_factory.h"
|
||||||
#include "net/url_request/url_request_job_factory_impl.h"
|
#include "net/url_request/url_request_job_factory_impl.h"
|
||||||
#include "url/url_constants.h"
|
#include "url/url_constants.h"
|
||||||
#include "webkit/browser/quota/special_storage_policy.h"
|
#include "storage/browser/quota/special_storage_policy.h"
|
||||||
|
|
||||||
using content::BrowserThread;
|
using content::BrowserThread;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ URLRequestContextGetter::URLRequestContextGetter(
|
||||||
// must synchronously run on the glib message loop. This will be passed to
|
// must synchronously run on the glib message loop. This will be passed to
|
||||||
// the URLRequestContextStorage on the IO thread in GetURLRequestContext().
|
// the URLRequestContextStorage on the IO thread in GetURLRequestContext().
|
||||||
proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService(
|
proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService(
|
||||||
io_loop_->message_loop_proxy(), file_loop_));
|
io_loop_->message_loop_proxy(), file_loop_->message_loop_proxy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
URLRequestContextGetter::~URLRequestContextGetter() {
|
URLRequestContextGetter::~URLRequestContextGetter() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue