2016-09-21 16:17:30 +00:00
|
|
|
// Copyright (c) 2016 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
|
|
|
|
#define ATOM_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
|
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
#include "content/public/renderer/render_frame_observer.h"
|
2017-06-16 20:54:18 +00:00
|
|
|
#include "third_party/WebKit/public/platform/WebContentSettingsClient.h"
|
2016-09-21 16:17:30 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class ContentSettingsObserver : public content::RenderFrameObserver,
|
|
|
|
public blink::WebContentSettingsClient {
|
|
|
|
public:
|
|
|
|
explicit ContentSettingsObserver(content::RenderFrame* render_frame);
|
|
|
|
~ContentSettingsObserver() override;
|
|
|
|
|
|
|
|
// blink::WebContentSettingsClient implementation.
|
2017-06-16 20:42:33 +00:00
|
|
|
bool AllowDatabase(const blink::WebString& name,
|
2016-09-21 16:17:30 +00:00
|
|
|
const blink::WebString& display_name,
|
|
|
|
unsigned estimated_size) override;
|
2017-06-16 20:42:33 +00:00
|
|
|
bool AllowStorage(bool local) override;
|
|
|
|
bool AllowIndexedDB(const blink::WebString& name,
|
2016-09-21 16:17:30 +00:00
|
|
|
const blink::WebSecurityOrigin& security_origin) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// content::RenderFrameObserver implementation.
|
|
|
|
void OnDestruct() override;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
|