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

Side by Side Diff: chrome/renderer/render_process.cc

Issue 199105: Continue with the FreeBSD port - this version builds and links, though... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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/renderer/print_web_view_helper.h ('k') | chrome/renderer/render_view.h » ('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) 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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <objidl.h> 9 #include <objidl.h>
10 #include <mlang.h> 10 #include <mlang.h>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #else 109 #else
110 return command_line.HasSwitch(switches::kInProcessPlugins) || 110 return command_line.HasSwitch(switches::kInProcessPlugins) ||
111 command_line.HasSwitch(switches::kSingleProcess); 111 command_line.HasSwitch(switches::kSingleProcess);
112 #endif 112 #endif
113 } 113 }
114 114
115 // ----------------------------------------------------------------------------- 115 // -----------------------------------------------------------------------------
116 // Platform specific code for dealing with bitmap transport... 116 // Platform specific code for dealing with bitmap transport...
117 117
118 TransportDIB* RenderProcess::CreateTransportDIB(size_t size) { 118 TransportDIB* RenderProcess::CreateTransportDIB(size_t size) {
119 #if defined(OS_WIN) || defined(OS_LINUX) 119 #if defined(OS_WIN) || defined(USE_X11)
120 // Windows and Linux create transport DIBs inside the renderer 120 // Windows and Linux create transport DIBs inside the renderer
121 return TransportDIB::Create(size, sequence_number_++); 121 return TransportDIB::Create(size, sequence_number_++);
122 #elif defined(OS_MACOSX) // defined(OS_WIN) || defined(OS_LINUX) 122 #elif defined(OS_MACOSX) // defined(OS_WIN) || defined(OS_LINUX)
123 // Mac creates transport DIBs in the browser, so we need to do a sync IPC to 123 // Mac creates transport DIBs in the browser, so we need to do a sync IPC to
124 // get one. 124 // get one.
125 TransportDIB::Handle handle; 125 TransportDIB::Handle handle;
126 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, &handle); 126 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, &handle);
127 if (!main_thread()->Send(msg)) 127 if (!main_thread()->Send(msg))
128 return NULL; 128 return NULL;
129 if (handle.fd < 0) 129 if (handle.fd < 0)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 void RenderProcess::ClearTransportDIBCache() { 241 void RenderProcess::ClearTransportDIBCache() {
242 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { 242 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) {
243 if (shared_mem_cache_[i]) { 243 if (shared_mem_cache_[i]) {
244 FreeTransportDIB(shared_mem_cache_[i]); 244 FreeTransportDIB(shared_mem_cache_[i]);
245 shared_mem_cache_[i] = NULL; 245 shared_mem_cache_[i] = NULL;
246 } 246 }
247 } 247 }
248 } 248 }
OLDNEW
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698