Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4366)

Unified Diff: chrome/renderer/content_settings_observer.cc

Issue 6915017: Chrome side to allow WebKit layer to use WebPermissionClient to check if access to local storage ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/content_settings_observer.h ('k') | content/browser/in_process_webkit/dom_storage_area.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/content_settings_observer.cc
===================================================================
--- chrome/renderer/content_settings_observer.cc (revision 83945)
+++ chrome/renderer/content_settings_observer.cc (working copy)
@@ -7,6 +7,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "content/common/database_messages.h"
+#include "content/common/dom_storage_common.h"
#include "content/common/view_messages.h"
#include "content/renderer/render_view.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
@@ -140,7 +141,7 @@
return false; // Uninitialized document?
bool result;
- if (!Send(new ViewHostMsg_AllowDatabase(routing_id(),
+ if (!Send(new ViewHostMsg_AllowDatabase(
origin.toString().utf8(), name, display_name, estimated_size, &result)))
return false;
Send(new ViewHostMsg_WebDatabaseAccessed(routing_id(),
@@ -168,8 +169,7 @@
bool ContentSettingsObserver::AllowPlugins(WebFrame* frame,
bool enabled_per_settings) {
- return render_view()->WebFrameClient::allowPlugins(
- frame, enabled_per_settings);
+ return enabled_per_settings;
}
bool ContentSettingsObserver::AllowScript(WebFrame* frame,
@@ -185,6 +185,15 @@
return false; // Other protocols fall through here.
}
+bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) {
+ bool result = false;
+ Send(new ViewHostMsg_AllowDOMStorage(
+ routing_id(), frame->url(),
+ local ? DOM_STORAGE_LOCAL : DOM_STORAGE_SESSION,
+ &result));
+ return result;
+}
+
void ContentSettingsObserver::DidNotAllowPlugins(WebFrame* frame) {
DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, std::string());
}
@@ -203,7 +212,7 @@
ContentSettingsType settings_type) {
// CONTENT_SETTING_ASK is only valid for cookies.
return current_content_settings_.settings[settings_type] !=
- CONTENT_SETTING_BLOCK;
+ CONTENT_SETTING_BLOCK;
}
void ContentSettingsObserver::ClearBlockedContentSettings() {
« no previous file with comments | « chrome/renderer/content_settings_observer.h ('k') | content/browser/in_process_webkit/dom_storage_area.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698