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

Side by Side Diff: content/renderer/render_process_impl.cc

Issue 9271028: android build: progress on content and libjingle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify conditional to make work on non-Android Created 8 years, 11 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) 2011 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 "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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #else 100 #else
101 return command_line.HasSwitch(switches::kInProcessPlugins) || 101 return command_line.HasSwitch(switches::kInProcessPlugins) ||
102 command_line.HasSwitch(switches::kSingleProcess); 102 command_line.HasSwitch(switches::kSingleProcess);
103 #endif 103 #endif
104 } 104 }
105 105
106 // ----------------------------------------------------------------------------- 106 // -----------------------------------------------------------------------------
107 // Platform specific code for dealing with bitmap transport... 107 // Platform specific code for dealing with bitmap transport...
108 108
109 TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) { 109 TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) {
110 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD) 110 #if defined(OS_WIN) || defined(OS_LINUX) || \
111 defined(OS_OPENBSD) || defined(OS_ANDROID)
111 // Windows and Linux create transport DIBs inside the renderer 112 // Windows and Linux create transport DIBs inside the renderer
112 return TransportDIB::Create(size, transport_dib_next_sequence_number_++); 113 return TransportDIB::Create(size, transport_dib_next_sequence_number_++);
113 #elif defined(OS_MACOSX) 114 #elif defined(OS_MACOSX)
114 // Mac creates transport DIBs in the browser, so we need to do a sync IPC to 115 // Mac creates transport DIBs in the browser, so we need to do a sync IPC to
115 // get one. The TransportDIB is cached in the browser. 116 // get one. The TransportDIB is cached in the browser.
116 TransportDIB::Handle handle; 117 TransportDIB::Handle handle;
117 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, true, &handle); 118 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, true, &handle);
118 if (!main_thread()->Send(msg)) 119 if (!main_thread()->Send(msg))
119 return NULL; 120 return NULL;
120 if (handle.fd < 0) 121 if (handle.fd < 0)
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 235 }
235 236
236 void RenderProcessImpl::ClearTransportDIBCache() { 237 void RenderProcessImpl::ClearTransportDIBCache() {
237 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { 238 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) {
238 if (shared_mem_cache_[i]) { 239 if (shared_mem_cache_[i]) {
239 FreeTransportDIB(shared_mem_cache_[i]); 240 FreeTransportDIB(shared_mem_cache_[i]);
240 shared_mem_cache_[i] = NULL; 241 shared_mem_cache_[i] = NULL;
241 } 242 }
242 } 243 }
243 } 244 }
OLDNEW
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698