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 2447143003: Use kRenderClientId command line flag when starting a render process (Closed)
Patch Set: Changes based on comment Created 4 years, 1 month 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/render_widget.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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 audio_renderer_mixer_manager_ = AudioRendererMixerManager::Create(); 1577 audio_renderer_mixer_manager_ = AudioRendererMixerManager::Create();
1578 } 1578 }
1579 1579
1580 return audio_renderer_mixer_manager_.get(); 1580 return audio_renderer_mixer_manager_.get();
1581 } 1581 }
1582 1582
1583 base::WaitableEvent* RenderThreadImpl::GetShutdownEvent() { 1583 base::WaitableEvent* RenderThreadImpl::GetShutdownEvent() {
1584 return ChildProcess::current()->GetShutDownEvent(); 1584 return ChildProcess::current()->GetShutDownEvent();
1585 } 1585 }
1586 1586
1587 int32_t RenderThreadImpl::GetClientId() {
1588 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
1589 switches::kRendererClientId)) {
piman 2016/10/31 20:34:09 nit: When would this happen? Only tests? If so, ca
Alex Z. 2016/11/07 19:37:43 This happens when running in single-process mode f
1590 return 1;
1591 }
1592 int client_id = 0;
1593 base::StringToInt(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
1594 switches::kRendererClientId),
1595 &client_id);
piman 2016/10/31 20:34:09 Parsing strings (twice) seems like a bit of a heav
Alex Z. 2016/11/07 19:37:43 Done.
1596 return client_id;
1597 }
1598
1587 void RenderThreadImpl::OnAssociatedInterfaceRequest( 1599 void RenderThreadImpl::OnAssociatedInterfaceRequest(
1588 const std::string& name, 1600 const std::string& name,
1589 mojo::ScopedInterfaceEndpointHandle handle) { 1601 mojo::ScopedInterfaceEndpointHandle handle) {
1590 associated_interfaces_.BindRequest(name, std::move(handle)); 1602 associated_interfaces_.BindRequest(name, std::move(handle));
1591 } 1603 }
1592 1604
1593 bool RenderThreadImpl::IsGpuRasterizationForced() { 1605 bool RenderThreadImpl::IsGpuRasterizationForced() {
1594 return is_gpu_rasterization_forced_; 1606 return is_gpu_rasterization_forced_;
1595 } 1607 }
1596 1608
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 } 2494 }
2483 } 2495 }
2484 2496
2485 void RenderThreadImpl::OnRendererInterfaceRequest( 2497 void RenderThreadImpl::OnRendererInterfaceRequest(
2486 mojom::RendererAssociatedRequest request) { 2498 mojom::RendererAssociatedRequest request) {
2487 DCHECK(!renderer_binding_.is_bound()); 2499 DCHECK(!renderer_binding_.is_bound());
2488 renderer_binding_.Bind(std::move(request)); 2500 renderer_binding_.Bind(std::move(request));
2489 } 2501 }
2490 2502
2491 } // namespace content 2503 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698