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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1157 |
1158 // Allow calling this from the compositor thread. | 1158 // Allow calling this from the compositor thread. |
1159 if (base::MessageLoop::current() == message_loop()) | 1159 if (base::MessageLoop::current() == message_loop()) |
1160 success = ChildThread::Send(message); | 1160 success = ChildThread::Send(message); |
1161 else | 1161 else |
1162 success = sync_message_filter()->Send(message); | 1162 success = sync_message_filter()->Send(message); |
1163 | 1163 |
1164 if (!success) | 1164 if (!success) |
1165 return scoped_ptr<gfx::GpuMemoryBuffer>(); | 1165 return scoped_ptr<gfx::GpuMemoryBuffer>(); |
1166 | 1166 |
1167 return GpuMemoryBufferImpl::Create( | 1167 return GpuMemoryBufferImpl::CreateFromHandle( |
1168 handle, gfx::Size(width, height), internalformat) | 1168 handle, gfx::Size(width, height), internalformat) |
1169 .PassAs<gfx::GpuMemoryBuffer>(); | 1169 .PassAs<gfx::GpuMemoryBuffer>(); |
1170 } | 1170 } |
1171 | 1171 |
1172 void RenderThreadImpl::AcceptConnection( | 1172 void RenderThreadImpl::AcceptConnection( |
1173 const mojo::String& service_name, | 1173 const mojo::String& service_name, |
1174 mojo::ScopedMessagePipeHandle message_pipe) { | 1174 mojo::ScopedMessagePipeHandle message_pipe) { |
1175 // TODO(darin): Invent some kind of registration system to use here. | 1175 // TODO(darin): Invent some kind of registration system to use here. |
1176 if (service_name.To<base::StringPiece>() == kRendererService_WebUISetup) { | 1176 if (service_name.To<base::StringPiece>() == kRendererService_WebUISetup) { |
1177 WebUISetupImpl::Bind(message_pipe.Pass()); | 1177 WebUISetupImpl::Bind(message_pipe.Pass()); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 hidden_widget_count_--; | 1497 hidden_widget_count_--; |
1498 | 1498 |
1499 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1499 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1500 return; | 1500 return; |
1501 } | 1501 } |
1502 | 1502 |
1503 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1503 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1504 } | 1504 } |
1505 | 1505 |
1506 } // namespace content | 1506 } // namespace content |
OLD | NEW |