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

Side by Side Diff: chrome/browser/dom_ui/ntp_resource_cache.cc

Issue 3342016: Turning WebGL and the accelerated compositor on by default (linux and windows... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/dom_ui/ntp_resource_cache.h" 5 #include "chrome/browser/dom_ui/ntp_resource_cache.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/animation.h" 10 #include "app/animation.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings); 300 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings);
301 301
302 // Control fade and resize animations. 302 // Control fade and resize animations.
303 std::string anim = 303 std::string anim =
304 Animation::ShouldRenderRichAnimation() ? "true" : "false"; 304 Animation::ShouldRenderRichAnimation() ? "true" : "false";
305 localized_strings.SetString("anim", anim); 305 localized_strings.SetString("anim", anim);
306 306
307 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 307 const CommandLine* command_line = CommandLine::ForCurrentProcess();
308 bool has_3d = 308 bool has_3d =
309 command_line->HasSwitch(switches::kEnableAcceleratedCompositing); 309 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing);
310 localized_strings.SetString("has_3d", has_3d ? "true" : "false"); 310 localized_strings.SetString("has_3d", has_3d ? "true" : "false");
311 311
312 // Pass the shown_sections pref early so that we can prevent flicker. 312 // Pass the shown_sections pref early so that we can prevent flicker.
313 const int shown_sections = ShownSectionsHandler::GetShownSections( 313 const int shown_sections = ShownSectionsHandler::GetShownSections(
314 profile_->GetPrefs()); 314 profile_->GetPrefs());
315 localized_strings.SetInteger("shown_sections", shown_sections); 315 localized_strings.SetInteger("shown_sections", shown_sections);
316 316
317 base::StringPiece new_tab_html(ResourceBundle::GetSharedInstance(). 317 base::StringPiece new_tab_html(ResourceBundle::GetSharedInstance().
318 GetRawDataResource(IDR_NEW_NEW_TAB_HTML)); 318 GetRawDataResource(IDR_NEW_NEW_TAB_HTML));
319 319
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 std::string css_string; 475 std::string css_string;
476 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 476 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
477 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); 477 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL);
478 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); 478 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL);
479 479
480 new_tab_css_ = new RefCountedBytes; 480 new_tab_css_ = new RefCountedBytes;
481 new_tab_css_->data.resize(css_string.size()); 481 new_tab_css_->data.resize(css_string.size());
482 std::copy(css_string.begin(), css_string.end(), 482 std::copy(css_string.begin(), css_string.end(),
483 new_tab_css_->data.begin()); 483 new_tab_css_->data.begin());
484 } 484 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698