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

Side by Side Diff: chrome/browser/extensions/extension_webkit_preferences.cc

Issue 10409088: Get rid of the RenderViewType concept in content, since it was only used by Chrome. Store the enum… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/extensions/extension_webkit_preferences.h" 5 #include "chrome/browser/extensions/extension_webkit_preferences.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 #include "webkit/glue/webpreferences.h" 10 #include "webkit/glue/webpreferences.h"
11 11
12 namespace extension_webkit_preferences { 12 namespace extension_webkit_preferences {
13 13
14 void SetPreferences(const extensions::Extension* extension, 14 void SetPreferences(const extensions::Extension* extension,
15 content::ViewType render_view_type, 15 chrome::ViewType render_view_type,
16 webkit_glue::WebPreferences* webkit_prefs) { 16 webkit_glue::WebPreferences* webkit_prefs) {
17 if (!extension) 17 if (!extension)
18 return; 18 return;
19 19
20 if (!extension->is_hosted_app()) { 20 if (!extension->is_hosted_app()) {
21 // Extensions are trusted so we override any user preferences for disabling 21 // Extensions are trusted so we override any user preferences for disabling
22 // javascript or images. 22 // javascript or images.
23 webkit_prefs->loads_images_automatically = true; 23 webkit_prefs->loads_images_automatically = true;
24 webkit_prefs->javascript_enabled = true; 24 webkit_prefs->javascript_enabled = true;
25 25
(...skipping 26 matching lines...) Expand all
52 // performance characteristics to be similar in both cases. 52 // performance characteristics to be similar in both cases.
53 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 53 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
54 if (extension->location() == extensions::Extension::COMPONENT && 54 if (extension->location() == extensions::Extension::COMPONENT &&
55 !command_line.HasSwitch(switches::kAllowWebUICompositing)) { 55 !command_line.HasSwitch(switches::kAllowWebUICompositing)) {
56 webkit_prefs->accelerated_compositing_enabled = false; 56 webkit_prefs->accelerated_compositing_enabled = false;
57 webkit_prefs->accelerated_2d_canvas_enabled = false; 57 webkit_prefs->accelerated_2d_canvas_enabled = false;
58 } 58 }
59 } 59 }
60 60
61 } // extension_webkit_preferences 61 } // extension_webkit_preferences
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698