| OLD | NEW |
| 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_posix.h" | 5 #include "chrome/browser/chrome_browser_main_posix.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <limits.h> | 8 #include <limits.h> |
| 9 #include <pthread.h> | 9 #include <pthread.h> |
| 10 #include <signal.h> | 10 #include <signal.h> |
| 11 #include <sys/resource.h> | 11 #include <sys/resource.h> |
| 12 #include <unistd.h> | 12 #include <unistd.h> |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 18 #include "base/eintr_wrapper.h" | 18 #include "base/eintr_wrapper.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/string_number_conversions.h" | 20 #include "base/string_number_conversions.h" |
| 21 #include "chrome/browser/lifetime/application_lifetime.h" | 21 #include "chrome/browser/lifetime/application_lifetime.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 | 24 |
| 25 #if defined(OS_ANDROID) | |
| 26 #include <asm/page.h> // for PAGE_SIZE needed by PTHREAD_STACK_MIN | |
| 27 #endif | |
| 28 | |
| 29 #if defined(TOOLKIT_GTK) | 25 #if defined(TOOLKIT_GTK) |
| 30 #include "chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.h" | 26 #include "chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.h" |
| 31 #include "chrome/browser/printing/print_dialog_gtk.h" | 27 #include "chrome/browser/printing/print_dialog_gtk.h" |
| 32 #endif | 28 #endif |
| 33 | 29 |
| 34 using content::BrowserThread; | 30 using content::BrowserThread; |
| 35 | 31 |
| 36 namespace { | 32 namespace { |
| 37 | 33 |
| 38 // See comment in |PreEarlyInitialization()|, where sigaction is called. | 34 // See comment in |PreEarlyInitialization()|, where sigaction is called. |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 272 |
| 277 #if defined(TOOLKIT_GTK) | 273 #if defined(TOOLKIT_GTK) |
| 278 printing::PrintingContextGtk::SetCreatePrintDialogFunction( | 274 printing::PrintingContextGtk::SetCreatePrintDialogFunction( |
| 279 &PrintDialogGtk::CreatePrintDialog); | 275 &PrintDialogGtk::CreatePrintDialog); |
| 280 #endif | 276 #endif |
| 281 } | 277 } |
| 282 | 278 |
| 283 void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() { | 279 void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() { |
| 284 #if defined(OS_CHROMEOS) | 280 #if defined(OS_CHROMEOS) |
| 285 NOTREACHED(); // Should not ever happen on ChromeOS. | 281 NOTREACHED(); // Should not ever happen on ChromeOS. |
| 286 #elif defined(OS_ANDROID) | |
| 287 // TODO(port) Update this as needed. | |
| 288 // Probably should not ever happen on Android, but at the time of this | |
| 289 // writing, Android isn't even using ChromeBrowserMainPartsPosix yet. | |
| 290 NOTREACHED(); | |
| 291 #elif defined(OS_MACOSX) | 282 #elif defined(OS_MACOSX) |
| 292 // Not called on Mac because we load the locale files differently. | 283 // Not called on Mac because we load the locale files differently. |
| 293 NOTREACHED(); | 284 NOTREACHED(); |
| 294 #elif defined(TOOLKIT_GTK) | 285 #elif defined(TOOLKIT_GTK) |
| 295 ChromeBrowserMainExtraPartsGtk::ShowMessageBox( | 286 ChromeBrowserMainExtraPartsGtk::ShowMessageBox( |
| 296 chrome_browser::kMissingLocaleDataMessage); | 287 chrome_browser::kMissingLocaleDataMessage); |
| 297 #elif defined(USE_AURA) | 288 #elif defined(USE_AURA) |
| 298 // TODO(port): We may want a views based message dialog here eventually, but | 289 // TODO(port): We may want a views based message dialog here eventually, but |
| 299 // for now, crash. | 290 // for now, crash. |
| 300 NOTREACHED(); | 291 NOTREACHED(); |
| 301 #else | 292 #else |
| 302 #error "Need MessageBox implementation." | 293 #error "Need MessageBox implementation." |
| 303 #endif | 294 #endif |
| 304 } | 295 } |
| OLD | NEW |