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

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

Issue 2544953002: content: Some code cleanup related to shared memory allocation. (Closed)
Patch Set: . Created 4 years 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
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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { 1369 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) {
1370 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); 1370 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_));
1371 } 1371 }
1372 1372
1373 void RenderThreadImpl::RecordComputedAction(const std::string& action) { 1373 void RenderThreadImpl::RecordComputedAction(const std::string& action) {
1374 Send(new ViewHostMsg_UserMetricsRecordAction(action)); 1374 Send(new ViewHostMsg_UserMetricsRecordAction(action));
1375 } 1375 }
1376 1376
1377 std::unique_ptr<base::SharedMemory> 1377 std::unique_ptr<base::SharedMemory>
1378 RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) { 1378 RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) {
1379 return ChildThreadImpl::AllocateSharedMemory(size, thread_safe_sender(), 1379 return ChildThreadImpl::AllocateSharedMemory(size);
1380 nullptr);
1381 } 1380 }
1382 1381
1383 cc::SharedBitmapManager* RenderThreadImpl::GetSharedBitmapManager() { 1382 cc::SharedBitmapManager* RenderThreadImpl::GetSharedBitmapManager() {
1384 return shared_bitmap_manager(); 1383 return shared_bitmap_manager();
1385 } 1384 }
1386 1385
1387 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) { 1386 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) {
1388 WebScriptController::registerExtension(extension); 1387 WebScriptController::registerExtension(extension);
1389 } 1388 }
1390 1389
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 } 2511 }
2513 } 2512 }
2514 2513
2515 void RenderThreadImpl::OnRendererInterfaceRequest( 2514 void RenderThreadImpl::OnRendererInterfaceRequest(
2516 mojom::RendererAssociatedRequest request) { 2515 mojom::RendererAssociatedRequest request) {
2517 DCHECK(!renderer_binding_.is_bound()); 2516 DCHECK(!renderer_binding_.is_bound());
2518 renderer_binding_.Bind(std::move(request)); 2517 renderer_binding_.Bind(std::move(request));
2519 } 2518 }
2520 2519
2521 } // namespace content 2520 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | content/renderer/renderer_clipboard_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698