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

Side by Side Diff: chrome/app/chrome_dll_main.cc

Issue 49035: Linux UI theming:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // TODO(port): the ifdefs in here are a first step towards trying to determine 5 // TODO(port): the ifdefs in here are a first step towards trying to determine
6 // the correct abstraction for all the OS functionality required at this 6 // the correct abstraction for all the OS functionality required at this
7 // stage of process initialization. It should not be taken as a final 7 // stage of process initialization. It should not be taken as a final
8 // abstraction. 8 // abstraction.
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } else if (process_type == switches::kPluginProcess) { 386 } else if (process_type == switches::kPluginProcess) {
387 #if defined(OS_WIN) 387 #if defined(OS_WIN)
388 rv = PluginMain(main_params); 388 rv = PluginMain(main_params);
389 #endif 389 #endif
390 } else if (process_type == switches::kWorkerProcess) { 390 } else if (process_type == switches::kWorkerProcess) {
391 #if defined(OS_WIN) 391 #if defined(OS_WIN)
392 rv = WorkerMain(main_params); 392 rv = WorkerMain(main_params);
393 #endif 393 #endif
394 } else if (process_type.empty()) { 394 } else if (process_type.empty()) {
395 #if defined(OS_LINUX) 395 #if defined(OS_LINUX)
396 // Disable user theming.
397 gchar* default_gtkrc_files[] = { NULL };
398 gtk_rc_set_default_files(default_gtkrc_files);
399
396 // gtk_init() can change |argc| and |argv|, but nobody else uses them. 400 // gtk_init() can change |argc| and |argv|, but nobody else uses them.
397 gtk_init(&argc, const_cast<char***>(&argv)); 401 gtk_init(&argc, const_cast<char***>(&argv));
398 // Register GTK assertions to go through our logging system. 402 // Register GTK assertions to go through our logging system.
399 g_log_set_handler(NULL, // All logging domains. 403 g_log_set_handler(NULL, // All logging domains.
400 static_cast<GLogLevelFlags>(G_LOG_FLAG_RECURSION | 404 static_cast<GLogLevelFlags>(G_LOG_FLAG_RECURSION |
401 G_LOG_FLAG_FATAL | 405 G_LOG_FLAG_FATAL |
402 G_LOG_LEVEL_ERROR | 406 G_LOG_LEVEL_ERROR |
403 G_LOG_LEVEL_CRITICAL | 407 G_LOG_LEVEL_CRITICAL |
404 G_LOG_LEVEL_WARNING), 408 G_LOG_LEVEL_WARNING),
405 GtkFatalLogHandler, 409 GtkFatalLogHandler,
406 NULL); 410 NULL);
411
412 // This theme is chosen rather abritrarily. We set many colors ourselves,
413 // so we need to set a light theme or some of the colors will clash.
414 g_object_set(gtk_settings_get_default(),
415 "gtk-theme-name", "Mist",
416 NULL);
407 #endif 417 #endif
408 418
409 ScopedOleInitializer ole_initializer; 419 ScopedOleInitializer ole_initializer;
410 rv = BrowserMain(main_params); 420 rv = BrowserMain(main_params);
411 } else { 421 } else {
412 NOTREACHED() << "Unknown process type"; 422 NOTREACHED() << "Unknown process type";
413 } 423 }
414 424
415 if (!process_type.empty()) { 425 if (!process_type.empty()) {
416 ResourceBundle::CleanupSharedInstance(); 426 ResourceBundle::CleanupSharedInstance();
417 } 427 }
418 428
419 #if defined(OS_WIN) 429 #if defined(OS_WIN)
420 #ifdef _CRTDBG_MAP_ALLOC 430 #ifdef _CRTDBG_MAP_ALLOC
421 _CrtDumpMemoryLeaks(); 431 _CrtDumpMemoryLeaks();
422 #endif // _CRTDBG_MAP_ALLOC 432 #endif // _CRTDBG_MAP_ALLOC
423 433
424 _Module.Term(); 434 _Module.Term();
425 #endif 435 #endif
426 436
427 logging::CleanupChromeLogging(); 437 logging::CleanupChromeLogging();
428 438
429 return rv; 439 return rv;
430 } 440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698