Update to Chromium revision fc6ad471 (#342568)

This commit is contained in:
Marshall Greenblatt
2015-08-14 10:41:08 -04:00
parent a08686e6a6
commit a63d646e3b
61 changed files with 460 additions and 600 deletions

View File

@@ -0,0 +1,36 @@
// Copyright 2015 The Chromium Embedded Framework Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/renderer/extensions/extensions_dispatcher_delegate.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/extension.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
namespace extensions {
CefExtensionsDispatcherDelegate::CefExtensionsDispatcherDelegate() {
}
CefExtensionsDispatcherDelegate::~CefExtensionsDispatcherDelegate() {
}
void CefExtensionsDispatcherDelegate::InitOriginPermissions(
const Extension* extension,
bool is_extension_active) {
if (is_extension_active) {
// The chrome: scheme is marked as display isolated in
// RenderThreadImpl::RegisterSchemes() so an exception must be added for
// accessing chrome://resources from the extension origin.
blink::WebSecurityPolicy::addOriginAccessWhitelistEntry(
extension->url(),
blink::WebString::fromUTF8(content::kChromeUIScheme),
blink::WebString::fromUTF8("resources"),
false);
}
}
} // namespace extensions

View File

@@ -0,0 +1,28 @@
// Copyright 2015 The Chromium Embedded Framework Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_RENDERER_EXTENSIONS_EXTENSIONS_DISPATCHER_DELEGATE_H_
#define CEF_LIBCEF_RENDERER_EXTENSIONS_EXTENSIONS_DISPATCHER_DELEGATE_H_
#include "base/macros.h"
#include "extensions/renderer/dispatcher_delegate.h"
namespace extensions {
class CefExtensionsDispatcherDelegate : public DispatcherDelegate {
public:
CefExtensionsDispatcherDelegate();
~CefExtensionsDispatcherDelegate() override;
private:
// DispatcherDelegate implementation.
void InitOriginPermissions(const Extension* extension,
bool is_extension_active) override;
DISALLOW_COPY_AND_ASSIGN(CefExtensionsDispatcherDelegate);
};
} // namespace extensions
#endif // CEF_LIBCEF_RENDERER_EXTENSIONS_EXTENSIONS_DISPATCHER_DELEGATE_H_