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/gpu/gpu_thread.cc

Issue 2716007: Linux: Catch X errors and force a crash.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « chrome/app/chrome_dll_main.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gpu/gpu_thread.h" 5 #include "chrome/gpu/gpu_thread.h"
6 6
7 #include "build/build_config.h" 7 #include <string>
8 #include <vector>
8 9
9 #include "base/command_line.h" 10 #include "base/command_line.h"
10 #include "chrome/common/child_process.h" 11 #include "chrome/common/child_process.h"
11 #include "chrome/common/gpu_messages.h" 12 #include "chrome/common/gpu_messages.h"
12 #include "chrome/gpu/gpu_config.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include "chrome/gpu/gpu_view_win.h" 15 #include "chrome/gpu/gpu_view_win.h"
16 #elif defined(GPU_USE_GLX) 16 #elif defined(GPU_USE_GLX)
17 #include "chrome/gpu/gpu_backing_store_glx_context.h" 17 #include "chrome/gpu/gpu_backing_store_glx_context.h"
18 #include "chrome/gpu/gpu_view_x.h" 18 #include "chrome/gpu/gpu_view_x.h"
19 19
20 #include <X11/Xutil.h> // Must be last. 20 #include <X11/Xutil.h> // Must be last.
21 #endif 21 #endif
22 22
(...skipping 22 matching lines...) Expand all
45 // here. 45 // here.
46 argv[i] = strdup(args[i].c_str()); 46 argv[i] = strdup(args[i].c_str());
47 } 47 }
48 argv[argc] = NULL; 48 argv[argc] = NULL;
49 char **argv_pointer = argv.get(); 49 char **argv_pointer = argv.get();
50 50
51 gtk_init(&argc, &argv_pointer); 51 gtk_init(&argc, &argv_pointer);
52 for (size_t i = 0; i < args.size(); ++i) { 52 for (size_t i = 0; i < args.size(); ++i) {
53 free(argv[i]); 53 free(argv[i]);
54 } 54 }
55 x11_util::SetX11ErrorHandlers();
55 } 56 }
56 #endif 57 #endif
57 } 58 }
58 59
59 GpuThread::~GpuThread() { 60 GpuThread::~GpuThread() {
60 } 61 }
61 62
62 #if defined(GPU_USE_GLX) 63 #if defined(GPU_USE_GLX)
63 GpuBackingStoreGLXContext* GpuThread::GetGLXContext() { 64 GpuBackingStoreGLXContext* GpuThread::GetGLXContext() {
64 if (!glx_context_.get()) 65 if (!glx_context_.get())
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // message to destroy the GpuRWHView when necessary. So we don't manage the 124 // message to destroy the GpuRWHView when necessary. So we don't manage the
124 // lifetime of this object. 125 // lifetime of this object.
125 #if defined(OS_WIN) 126 #if defined(OS_WIN)
126 new GpuViewWin(this, parent_window, routing_id); 127 new GpuViewWin(this, parent_window, routing_id);
127 #elif defined(GPU_USE_GLX) 128 #elif defined(GPU_USE_GLX)
128 new GpuViewX(this, parent_window, routing_id); 129 new GpuViewX(this, parent_window, routing_id);
129 #else 130 #else
130 NOTIMPLEMENTED(); 131 NOTIMPLEMENTED();
131 #endif 132 #endif
132 } 133 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698