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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 | 1151 |
1152 // Allow calling this from the compositor thread. | 1152 // Allow calling this from the compositor thread. |
1153 if (base::MessageLoop::current() == message_loop()) | 1153 if (base::MessageLoop::current() == message_loop()) |
1154 success = ChildThread::Send(message); | 1154 success = ChildThread::Send(message); |
1155 else | 1155 else |
1156 success = sync_message_filter()->Send(message); | 1156 success = sync_message_filter()->Send(message); |
1157 | 1157 |
1158 if (!success) | 1158 if (!success) |
1159 return scoped_ptr<gfx::GpuMemoryBuffer>(); | 1159 return scoped_ptr<gfx::GpuMemoryBuffer>(); |
1160 | 1160 |
1161 return GpuMemoryBufferImpl::Create( | 1161 return GpuMemoryBufferImpl::CreateFromHandle( |
1162 handle, | 1162 handle, gfx::Size(width, height), internalformat) |
1163 gfx::Size(width, height), | 1163 .PassAs<gfx::GpuMemoryBuffer>(); |
1164 internalformat).PassAs<gfx::GpuMemoryBuffer>(); | |
1165 } | 1164 } |
1166 | 1165 |
1167 void RenderThreadImpl::AcceptConnection( | 1166 void RenderThreadImpl::AcceptConnection( |
1168 const mojo::String& service_name, | 1167 const mojo::String& service_name, |
1169 mojo::ScopedMessagePipeHandle message_pipe) { | 1168 mojo::ScopedMessagePipeHandle message_pipe) { |
1170 // TODO(darin): Invent some kind of registration system to use here. | 1169 // TODO(darin): Invent some kind of registration system to use here. |
1171 if (service_name.To<base::StringPiece>() == kRendererService_WebUISetup) { | 1170 if (service_name.To<base::StringPiece>() == kRendererService_WebUISetup) { |
1172 WebUISetupImpl::Bind(message_pipe.Pass()); | 1171 WebUISetupImpl::Bind(message_pipe.Pass()); |
1173 } else { | 1172 } else { |
1174 NOTREACHED() << "Unknown service name"; | 1173 NOTREACHED() << "Unknown service name"; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 hidden_widget_count_--; | 1491 hidden_widget_count_--; |
1493 | 1492 |
1494 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1493 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1495 return; | 1494 return; |
1496 } | 1495 } |
1497 | 1496 |
1498 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1497 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1499 } | 1498 } |
1500 | 1499 |
1501 } // namespace content | 1500 } // namespace content |
OLD | NEW |