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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac and win compile errors. 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
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_mac.mm » ('j') | ui/base/layout.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/browser/extensions/extension_service.h" 42 #include "chrome/browser/extensions/extension_service.h"
43 #include "chrome/browser/extensions/extensions_startup.h" 43 #include "chrome/browser/extensions/extensions_startup.h"
44 #include "chrome/browser/first_run/upgrade_util.h" 44 #include "chrome/browser/first_run/upgrade_util.h"
45 #include "chrome/browser/google/google_search_counter.h" 45 #include "chrome/browser/google/google_search_counter.h"
46 #include "chrome/browser/google/google_util.h" 46 #include "chrome/browser/google/google_util.h"
47 #include "chrome/browser/gpu_blacklist.h" 47 #include "chrome/browser/gpu_blacklist.h"
48 #include "chrome/browser/gpu_util.h" 48 #include "chrome/browser/gpu_util.h"
49 #include "chrome/browser/instant/instant_field_trial.h" 49 #include "chrome/browser/instant/instant_field_trial.h"
50 #include "chrome/browser/jankometer.h" 50 #include "chrome/browser/jankometer.h"
51 #include "chrome/browser/language_usage_metrics.h" 51 #include "chrome/browser/language_usage_metrics.h"
52 #include "chrome/browser/metrics/field_trial_synchronizer.h"
52 #include "chrome/browser/metrics/histogram_synchronizer.h" 53 #include "chrome/browser/metrics/histogram_synchronizer.h"
53 #include "chrome/browser/metrics/field_trial_synchronizer.h"
54 #include "chrome/browser/metrics/metrics_log.h" 54 #include "chrome/browser/metrics/metrics_log.h"
55 #include "chrome/browser/metrics/metrics_service.h" 55 #include "chrome/browser/metrics/metrics_service.h"
56 #include "chrome/browser/metrics/thread_watcher.h" 56 #include "chrome/browser/metrics/thread_watcher.h"
57 #include "chrome/browser/metrics/tracking_synchronizer.h" 57 #include "chrome/browser/metrics/tracking_synchronizer.h"
58 #include "chrome/browser/nacl_host/nacl_process_host.h" 58 #include "chrome/browser/nacl_host/nacl_process_host.h"
59 #include "chrome/browser/net/chrome_net_log.h" 59 #include "chrome/browser/net/chrome_net_log.h"
60 #include "chrome/browser/net/predictor.h" 60 #include "chrome/browser/net/predictor.h"
61 #include "chrome/browser/notifications/desktop_notification_service.h" 61 #include "chrome/browser/notifications/desktop_notification_service.h"
62 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 62 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
63 #include "chrome/browser/plugin_prefs.h" 63 #include "chrome/browser/plugin_prefs.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 // gpu feature flags. 425 // gpu feature flags.
426 void InitializeGpuDataManager(const CommandLine& parsed_command_line) { 426 void InitializeGpuDataManager(const CommandLine& parsed_command_line) {
427 content::GpuDataManager::GetInstance(); 427 content::GpuDataManager::GetInstance();
428 if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) || 428 if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) ||
429 parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) { 429 parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) {
430 return; 430 return;
431 } 431 }
432 432
433 const base::StringPiece gpu_blacklist_json( 433 const base::StringPiece gpu_blacklist_json(
434 ResourceBundle::GetSharedInstance().GetRawDataResource( 434 ResourceBundle::GetSharedInstance().GetRawDataResource(
435 IDR_GPU_BLACKLIST)); 435 IDR_GPU_BLACKLIST, ui::kScaleFactorNone));
436 GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance(); 436 GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance();
437 bool succeed = gpu_blacklist->LoadGpuBlacklist( 437 bool succeed = gpu_blacklist->LoadGpuBlacklist(
438 gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly); 438 gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly);
439 DCHECK(succeed); 439 DCHECK(succeed);
440 gpu_blacklist->UpdateGpuDataManager(); 440 gpu_blacklist->UpdateGpuDataManager();
441 } 441 }
442 442
443 #if defined(OS_MACOSX) 443 #if defined(OS_MACOSX)
444 OSStatus KeychainCallback(SecKeychainEvent keychain_event, 444 OSStatus KeychainCallback(SecKeychainEvent keychain_event,
445 SecKeychainCallbackInfo* info, void* context) { 445 SecKeychainCallbackInfo* info, void* context) {
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { 1304 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) {
1305 ShowMissingLocaleMessageBox(); 1305 ShowMissingLocaleMessageBox();
1306 return chrome::RESULT_CODE_MISSING_DATA; 1306 return chrome::RESULT_CODE_MISSING_DATA;
1307 } 1307 }
1308 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; 1308 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
1309 browser_process_->SetApplicationLocale(loaded_locale); 1309 browser_process_->SetApplicationLocale(loaded_locale);
1310 1310
1311 FilePath resources_pack_path; 1311 FilePath resources_pack_path;
1312 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 1312 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
1313 ResourceBundle::GetSharedInstance().AddDataPack( 1313 ResourceBundle::GetSharedInstance().AddDataPack(
1314 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); 1314 resources_pack_path, ui::SCALE_FACTOR_100P);
1315 #endif // defined(OS_MACOSX) 1315 #endif // defined(OS_MACOSX)
1316 } 1316 }
1317 1317
1318 #if defined(TOOLKIT_GTK) 1318 #if defined(TOOLKIT_GTK)
1319 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); 1319 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str());
1320 #endif 1320 #endif
1321 1321
1322 std::string try_chrome = 1322 std::string try_chrome =
1323 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); 1323 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain);
1324 if (!try_chrome.empty()) { 1324 if (!try_chrome.empty()) {
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 if (base::win::GetVersion() <= base::win::VERSION_XP) 2007 if (base::win::GetVersion() <= base::win::VERSION_XP)
2008 uma_name += "_XP"; 2008 uma_name += "_XP";
2009 2009
2010 uma_name += "_PreRead_"; 2010 uma_name += "_PreRead_";
2011 uma_name += pre_read_percentage; 2011 uma_name += pre_read_percentage;
2012 AddPreReadHistogramTime(uma_name.c_str(), time); 2012 AddPreReadHistogramTime(uma_name.c_str(), time);
2013 } 2013 }
2014 #endif 2014 #endif
2015 #endif 2015 #endif
2016 } 2016 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_mac.mm » ('j') | ui/base/layout.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698