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

Side by Side Diff: content/common/gpu/gpu_channel_manager.cc

Issue 8572047: base::Bind() conversion for content/common/gpu and content/gpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scoped_ptr<base::WPF> -> base::WPF Created 9 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include "base/bind.h"
7 #include "content/common/child_thread.h" 8 #include "content/common/child_thread.h"
8 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
9 #include "content/common/gpu/gpu_messages.h" 10 #include "content/common/gpu/gpu_messages.h"
10 11
11 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, 12 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread,
12 GpuWatchdog* watchdog, 13 GpuWatchdog* watchdog,
13 base::MessageLoopProxy* io_message_loop, 14 base::MessageLoopProxy* io_message_loop,
14 base::WaitableEvent* shutdown_event) 15 base::WaitableEvent* shutdown_event)
15 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), 16 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
16 io_message_loop_(io_message_loop), 17 io_message_loop_(io_message_loop),
17 shutdown_event_(shutdown_event), 18 shutdown_event_(shutdown_event),
18 gpu_child_thread_(gpu_child_thread), 19 gpu_child_thread_(gpu_child_thread),
19 watchdog_(watchdog) { 20 watchdog_(watchdog) {
20 DCHECK(gpu_child_thread); 21 DCHECK(gpu_child_thread);
21 DCHECK(io_message_loop); 22 DCHECK(io_message_loop);
22 DCHECK(shutdown_event); 23 DCHECK(shutdown_event);
23 } 24 }
24 25
25 GpuChannelManager::~GpuChannelManager() { 26 GpuChannelManager::~GpuChannelManager() {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id); 143 GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
143 if (iter == gpu_channels_.end()) 144 if (iter == gpu_channels_.end())
144 return; 145 return;
145 scoped_refptr<GpuChannel> channel = iter->second; 146 scoped_refptr<GpuChannel> channel = iter->second;
146 147
147 channel->ViewResized(command_buffer_route_id); 148 channel->ViewResized(command_buffer_route_id);
148 } 149 }
149 150
150 void GpuChannelManager::LoseAllContexts() { 151 void GpuChannelManager::LoseAllContexts() {
151 MessageLoop::current()->PostTask( 152 MessageLoop::current()->PostTask(
152 FROM_HERE, method_factory_.NewRunnableMethod( 153 FROM_HERE,
153 &GpuChannelManager::OnLoseAllContexts)); 154 base::Bind(&GpuChannelManager::OnLoseAllContexts,
155 weak_factory_.GetWeakPtr()));
154 } 156 }
155 157
156 void GpuChannelManager::OnLoseAllContexts() { 158 void GpuChannelManager::OnLoseAllContexts() {
157 gpu_channels_.clear(); 159 gpu_channels_.clear();
158 } 160 }
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698