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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 7012007: Chrome side of having the WebKit FileSystem API use WebPermissionClient for checking if using fil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 bool ChromeRenderViewObserver::allowDatabase( 295 bool ChromeRenderViewObserver::allowDatabase(
296 WebFrame* frame, 296 WebFrame* frame,
297 const WebString& name, 297 const WebString& name,
298 const WebString& display_name, 298 const WebString& display_name,
299 unsigned long estimated_size) { 299 unsigned long estimated_size) {
300 return content_settings_->AllowDatabase( 300 return content_settings_->AllowDatabase(
301 frame, name, display_name, estimated_size); 301 frame, name, display_name, estimated_size);
302 } 302 }
303 303
304 bool ChromeRenderViewObserver::allowFileSystem(WebFrame* frame) {
305 return content_settings_->AllowFileSystem(frame);
306 }
307
304 bool ChromeRenderViewObserver::allowImages(WebFrame* frame, 308 bool ChromeRenderViewObserver::allowImages(WebFrame* frame,
305 bool enabled_per_settings) { 309 bool enabled_per_settings) {
306 return content_settings_->AllowImages(frame, enabled_per_settings); 310 return content_settings_->AllowImages(frame, enabled_per_settings);
307 } 311 }
308 312
309 bool ChromeRenderViewObserver::allowIndexedDB(WebFrame* frame, 313 bool ChromeRenderViewObserver::allowIndexedDB(WebFrame* frame,
310 const WebString& name, 314 const WebString& name,
311 const WebSecurityOrigin& origin) { 315 const WebSecurityOrigin& origin) {
312 return content_settings_->AllowIndexedDB(frame, name, origin); 316 return content_settings_->AllowIndexedDB(frame, name, origin);
313 } 317 }
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) && !data.empty()) { 696 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) && !data.empty()) {
693 // Decode the favicon using WebKit's image decoder. 697 // Decode the favicon using WebKit's image decoder.
694 webkit_glue::ImageDecoder decoder(gfx::Size(kFaviconSize, kFaviconSize)); 698 webkit_glue::ImageDecoder decoder(gfx::Size(kFaviconSize, kFaviconSize));
695 const unsigned char* src_data = 699 const unsigned char* src_data =
696 reinterpret_cast<const unsigned char*>(&data[0]); 700 reinterpret_cast<const unsigned char*>(&data[0]);
697 701
698 return decoder.Decode(src_data, data.size()); 702 return decoder.Decode(src_data, data.size());
699 } 703 }
700 return SkBitmap(); 704 return SkBitmap();
701 } 705 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.h ('k') | chrome/renderer/content_settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698