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

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

Issue 2808093006: [Device Service] Move Gamepad Blink headers to be part of the Gamepad client library (Closed)
Patch Set: rebase and address comments Created 3 years, 8 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.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) 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 <utility> 10 #include <utility>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 #include "content/renderer/p2p/socket_dispatcher.h" 115 #include "content/renderer/p2p/socket_dispatcher.h"
116 #include "content/renderer/render_frame_proxy.h" 116 #include "content/renderer/render_frame_proxy.h"
117 #include "content/renderer/render_process_impl.h" 117 #include "content/renderer/render_process_impl.h"
118 #include "content/renderer/render_view_impl.h" 118 #include "content/renderer/render_view_impl.h"
119 #include "content/renderer/renderer_blink_platform_impl.h" 119 #include "content/renderer/renderer_blink_platform_impl.h"
120 #include "content/renderer/scheduler/resource_dispatch_throttler.h" 120 #include "content/renderer/scheduler/resource_dispatch_throttler.h"
121 #include "content/renderer/service_worker/embedded_worker_instance_client_impl.h " 121 #include "content/renderer/service_worker/embedded_worker_instance_client_impl.h "
122 #include "content/renderer/service_worker/service_worker_context_client.h" 122 #include "content/renderer/service_worker/service_worker_context_client.h"
123 #include "content/renderer/service_worker/service_worker_context_message_filter. h" 123 #include "content/renderer/service_worker/service_worker_context_message_filter. h"
124 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" 124 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h"
125 #include "device/gamepad/public/cpp/gamepads.h"
125 #include "gin/public/debug.h" 126 #include "gin/public/debug.h"
126 #include "gpu/GLES2/gl2extchromium.h" 127 #include "gpu/GLES2/gl2extchromium.h"
127 #include "gpu/command_buffer/client/shared_memory_limits.h" 128 #include "gpu/command_buffer/client/shared_memory_limits.h"
128 #include "gpu/ipc/client/command_buffer_proxy_impl.h" 129 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
129 #include "gpu/ipc/client/gpu_channel_host.h" 130 #include "gpu/ipc/client/gpu_channel_host.h"
130 #include "ipc/ipc_channel_handle.h" 131 #include "ipc/ipc_channel_handle.h"
131 #include "ipc/ipc_channel_mojo.h" 132 #include "ipc/ipc_channel_mojo.h"
132 #include "ipc/ipc_platform_file.h" 133 #include "ipc/ipc_platform_file.h"
133 #include "media/base/media.h" 134 #include "media/base/media.h"
134 #include "media/base/media_switches.h" 135 #include "media/base/media_switches.h"
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 bool support_locking = true; 2320 bool support_locking = true;
2320 shared_worker_context_provider_ = CreateOffscreenContext( 2321 shared_worker_context_provider_ = CreateOffscreenContext(
2321 std::move(gpu_channel_host), gpu::SharedMemoryLimits(), support_locking, 2322 std::move(gpu_channel_host), gpu::SharedMemoryLimits(), support_locking,
2322 ui::command_buffer_metrics::RENDER_WORKER_CONTEXT, stream_id, 2323 ui::command_buffer_metrics::RENDER_WORKER_CONTEXT, stream_id,
2323 stream_priority); 2324 stream_priority);
2324 if (!shared_worker_context_provider_->BindToCurrentThread()) 2325 if (!shared_worker_context_provider_->BindToCurrentThread())
2325 shared_worker_context_provider_ = nullptr; 2326 shared_worker_context_provider_ = nullptr;
2326 return shared_worker_context_provider_; 2327 return shared_worker_context_provider_;
2327 } 2328 }
2328 2329
2329 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { 2330 void RenderThreadImpl::SampleGamepads(device::Gamepads* data) {
2330 blink_platform_impl_->SampleGamepads(*data); 2331 blink_platform_impl_->SampleGamepads(*data);
2331 } 2332 }
2332 2333
2333 bool RenderThreadImpl::RendererIsHidden() const { 2334 bool RenderThreadImpl::RendererIsHidden() const {
2334 return widget_count_ > 0 && hidden_widget_count_ == widget_count_; 2335 return widget_count_ > 0 && hidden_widget_count_ == widget_count_;
2335 } 2336 }
2336 2337
2337 void RenderThreadImpl::WidgetCreated() { 2338 void RenderThreadImpl::WidgetCreated() {
2338 bool renderer_was_hidden = RendererIsHidden(); 2339 bool renderer_was_hidden = RendererIsHidden();
2339 widget_count_++; 2340 widget_count_++;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 } 2446 }
2446 } 2447 }
2447 2448
2448 void RenderThreadImpl::OnRendererInterfaceRequest( 2449 void RenderThreadImpl::OnRendererInterfaceRequest(
2449 mojom::RendererAssociatedRequest request) { 2450 mojom::RendererAssociatedRequest request) {
2450 DCHECK(!renderer_binding_.is_bound()); 2451 DCHECK(!renderer_binding_.is_bound());
2451 renderer_binding_.Bind(std::move(request)); 2452 renderer_binding_.Bind(std::move(request));
2452 } 2453 }
2453 2454
2454 } // namespace content 2455 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698