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

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

Issue 6516022: Linux: Refactor printing to be more like Windows/Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac build Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_main_posix.h" 5 #include "chrome/browser/browser_main_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 10
11 #include <string>
12
11 #include "base/command_line.h" 13 #include "base/command_line.h"
12 #include "base/eintr_wrapper.h" 14 #include "base/eintr_wrapper.h"
13 #include "base/logging.h" 15 #include "base/logging.h"
14 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
15 #include "base/threading/platform_thread.h" 17 #include "base/threading/platform_thread.h"
16 #include "chrome/browser/browser_list.h" 18 #include "chrome/browser/browser_list.h"
17 #include "chrome/browser/browser_thread.h" 19 #include "chrome/browser/browser_thread.h"
18 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
19 21
22 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
23 #include "chrome/browser/printing/print_dialog_gtk.h"
24 #endif
25
20 namespace { 26 namespace {
21 27
22 // See comment in |PreEarlyInitialization()|, where sigaction is called. 28 // See comment in |PreEarlyInitialization()|, where sigaction is called.
23 void SIGCHLDHandler(int signal) { 29 void SIGCHLDHandler(int signal) {
24 } 30 }
25 31
26 int g_shutdown_pipe_write_fd = -1; 32 int g_shutdown_pipe_write_fd = -1;
27 int g_shutdown_pipe_read_fd = -1; 33 int g_shutdown_pipe_read_fd = -1;
28 34
29 // Common code between SIG{HUP, INT, TERM}Handler. 35 // Common code between SIG{HUP, INT, TERM}Handler.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 g_shutdown_pipe_write_fd = pipefd[1]; 217 g_shutdown_pipe_write_fd = pipefd[1];
212 const size_t kShutdownDetectorThreadStackSize = 4096; 218 const size_t kShutdownDetectorThreadStackSize = 4096;
213 // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so 219 // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so
214 // if you change this, you'll probably need to change the suppression. 220 // if you change this, you'll probably need to change the suppression.
215 if (!base::PlatformThread::CreateNonJoinable( 221 if (!base::PlatformThread::CreateNonJoinable(
216 kShutdownDetectorThreadStackSize, 222 kShutdownDetectorThreadStackSize,
217 new ShutdownDetector(g_shutdown_pipe_read_fd))) { 223 new ShutdownDetector(g_shutdown_pipe_read_fd))) {
218 LOG(DFATAL) << "Failed to create shutdown detector task."; 224 LOG(DFATAL) << "Failed to create shutdown detector task.";
219 } 225 }
220 } 226 }
227
228 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
229 printing::PrintingContextCairo::SetPrintingFunctions(
230 &PrintDialogGtk::CreatePrintDialog,
231 &PrintDialogGtk::PrintDocument);
232 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
221 } 233 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/print_dialog_gtk.h » ('j') | chrome/browser/printing/print_dialog_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698