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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #include "content/renderer/render_frame_proxy.h" | 91 #include "content/renderer/render_frame_proxy.h" |
92 #include "content/renderer/render_process_impl.h" | 92 #include "content/renderer/render_process_impl.h" |
93 #include "content/renderer/render_view_impl.h" | 93 #include "content/renderer/render_view_impl.h" |
94 #include "content/renderer/renderer_blink_platform_impl.h" | 94 #include "content/renderer/renderer_blink_platform_impl.h" |
95 #include "content/renderer/service_worker/embedded_worker_context_message_filter
.h" | 95 #include "content/renderer/service_worker/embedded_worker_context_message_filter
.h" |
96 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" | 96 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" |
97 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" | 97 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" |
98 #include "ipc/ipc_channel_handle.h" | 98 #include "ipc/ipc_channel_handle.h" |
99 #include "ipc/ipc_forwarding_message_filter.h" | 99 #include "ipc/ipc_forwarding_message_filter.h" |
100 #include "ipc/ipc_platform_file.h" | 100 #include "ipc/ipc_platform_file.h" |
| 101 #include "ipc/mojo/ipc_channel_mojo.h" |
101 #include "media/base/audio_hardware_config.h" | 102 #include "media/base/audio_hardware_config.h" |
102 #include "media/base/media.h" | 103 #include "media/base/media.h" |
103 #include "media/filters/gpu_video_accelerator_factories.h" | 104 #include "media/filters/gpu_video_accelerator_factories.h" |
104 #include "mojo/common/common_type_converters.h" | 105 #include "mojo/common/common_type_converters.h" |
105 #include "net/base/net_errors.h" | 106 #include "net/base/net_errors.h" |
106 #include "net/base/net_util.h" | 107 #include "net/base/net_util.h" |
107 #include "skia/ext/event_tracer_impl.h" | 108 #include "skia/ext/event_tracer_impl.h" |
108 #include "third_party/WebKit/public/platform/WebString.h" | 109 #include "third_party/WebKit/public/platform/WebString.h" |
109 #include "third_party/WebKit/public/platform/WebThread.h" | 110 #include "third_party/WebKit/public/platform/WebThread.h" |
110 #include "third_party/WebKit/public/web/WebColorName.h" | 111 #include "third_party/WebKit/public/web/WebColorName.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 private: | 308 private: |
308 int32_t routing_id_highmark_; | 309 int32_t routing_id_highmark_; |
309 }; | 310 }; |
310 | 311 |
311 void CreateRenderFrameSetup(mojo::InterfaceRequest<RenderFrameSetup> request) { | 312 void CreateRenderFrameSetup(mojo::InterfaceRequest<RenderFrameSetup> request) { |
312 mojo::BindToRequest(new RenderFrameSetupImpl(), &request); | 313 mojo::BindToRequest(new RenderFrameSetupImpl(), &request); |
313 } | 314 } |
314 | 315 |
315 bool ShouldUseMojoChannel() { | 316 bool ShouldUseMojoChannel() { |
316 return CommandLine::ForCurrentProcess()->HasSwitch( | 317 return CommandLine::ForCurrentProcess()->HasSwitch( |
317 switches::kEnableRendererMojoChannel); | 318 switches::kEnableRendererMojoChannel) || |
| 319 IPC::ChannelMojo::ShouldBeUsed(); |
318 } | 320 } |
319 | 321 |
320 blink::WebGraphicsContext3D::Attributes GetOffscreenAttribs() { | 322 blink::WebGraphicsContext3D::Attributes GetOffscreenAttribs() { |
321 blink::WebGraphicsContext3D::Attributes attributes; | 323 blink::WebGraphicsContext3D::Attributes attributes; |
322 attributes.shareResources = true; | 324 attributes.shareResources = true; |
323 attributes.depth = false; | 325 attributes.depth = false; |
324 attributes.stencil = false; | 326 attributes.stencil = false; |
325 attributes.antialias = false; | 327 attributes.antialias = false; |
326 attributes.noAutomaticFlushes = true; | 328 attributes.noAutomaticFlushes = true; |
327 return attributes; | 329 return attributes; |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1580 hidden_widget_count_--; | 1582 hidden_widget_count_--; |
1581 | 1583 |
1582 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1584 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1583 return; | 1585 return; |
1584 } | 1586 } |
1585 | 1587 |
1586 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1588 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1587 } | 1589 } |
1588 | 1590 |
1589 } // namespace content | 1591 } // namespace content |
OLD | NEW |