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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 2488913003: Replacing allocate bitmap IPC messages with a new Mojo interface. (Closed)
Patch Set: More clean-ups 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
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/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 message_loop_->task_runner()->PostDelayedTask( 582 message_loop_->task_runner()->PostDelayedTask(
583 FROM_HERE, base::Bind(&ChildThreadImpl::EnsureConnected, 583 FROM_HERE, base::Bind(&ChildThreadImpl::EnsureConnected,
584 channel_connected_factory_->GetWeakPtr()), 584 channel_connected_factory_->GetWeakPtr()),
585 base::TimeDelta::FromSeconds(connection_timeout)); 585 base::TimeDelta::FromSeconds(connection_timeout));
586 586
587 #if defined(OS_ANDROID) 587 #if defined(OS_ANDROID)
588 g_quit_closure.Get().BindToMainThread(); 588 g_quit_closure.Get().BindToMainThread();
589 #endif 589 #endif
590 590
591 mojom::SharedMemoryAllocatorPtr shared_memory_allocator;
592 GetRemoteInterfaces()->GetInterface(&shared_memory_allocator);
591 shared_bitmap_manager_.reset( 593 shared_bitmap_manager_.reset(
592 new ChildSharedBitmapManager(thread_safe_sender())); 594 new ChildSharedBitmapManager(thread_safe_sender(),
595 std::move(shared_memory_allocator)));
593 596
594 client_discardable_shared_memory_manager_delegate_ = 597 client_discardable_shared_memory_manager_delegate_ =
595 base::MakeUnique<ClientDiscardableSharedMemoryManagerDelegate>( 598 base::MakeUnique<ClientDiscardableSharedMemoryManagerDelegate>(
596 thread_safe_sender()); 599 thread_safe_sender());
597 discardable_shared_memory_manager_ = base::MakeUnique< 600 discardable_shared_memory_manager_ = base::MakeUnique<
598 discardable_memory::ClientDiscardableSharedMemoryManager>( 601 discardable_memory::ClientDiscardableSharedMemoryManager>(
599 client_discardable_shared_memory_manager_delegate_.get()); 602 client_discardable_shared_memory_manager_delegate_.get());
600 } 603 }
601 604
602 ChildThreadImpl::~ChildThreadImpl() { 605 ChildThreadImpl::~ChildThreadImpl() {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 connected_to_browser_ = true; 920 connected_to_browser_ = true;
918 child_info_ = local_info; 921 child_info_ = local_info;
919 browser_info_ = remote_info; 922 browser_info_ = remote_info;
920 } 923 }
921 924
922 bool ChildThreadImpl::IsInBrowserProcess() const { 925 bool ChildThreadImpl::IsInBrowserProcess() const {
923 return static_cast<bool>(browser_process_io_runner_); 926 return static_cast<bool>(browser_process_io_runner_);
924 } 927 }
925 928
926 } // namespace content 929 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698