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

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

Issue 6901146: Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. This allows us to remov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months 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/pepper_plugin_registry.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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/win/scoped_com_initializer.h" 10 #include "app/win/scoped_com_initializer.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/threading/worker_pool.h" 12 #include "base/threading/worker_pool.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "content/common/child_process.h" 14 #include "content/common/child_process.h"
15 #include "content/common/gpu/gpu_messages.h" 15 #include "content/common/gpu/gpu_messages.h"
16 #include "ipc/ipc_channel_handle.h" 16 #include "ipc/ipc_channel_handle.h"
17 #include "ui/gfx/gl/gl_context.h" 17 #include "ui/gfx/gl/gl_context.h"
18 #include "ui/gfx/gl/gl_implementation.h" 18 #include "ui/gfx/gl/gl_implementation.h"
19 19
20 GpuChannelManager::GpuChannelManager(IPC::Message::Sender* browser_channel, 20 GpuChannelManager::GpuChannelManager(IPC::Message::Sender* browser_channel,
21 GpuWatchdog* watchdog, 21 GpuWatchdog* watchdog,
22 MessageLoop* io_message_loop, 22 base::MessageLoopProxy* io_message_loop,
23 base::WaitableEvent* shutdown_event) 23 base::WaitableEvent* shutdown_event)
24 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), 24 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
25 io_message_loop_(io_message_loop), 25 io_message_loop_(io_message_loop),
26 shutdown_event_(shutdown_event), 26 shutdown_event_(shutdown_event),
27 browser_channel_(browser_channel), 27 browser_channel_(browser_channel),
28 watchdog_(watchdog) { 28 watchdog_(watchdog) {
29 DCHECK(browser_channel); 29 DCHECK(browser_channel);
30 DCHECK(io_message_loop); 30 DCHECK(io_message_loop);
31 DCHECK(shutdown_event); 31 DCHECK(shutdown_event);
32 } 32 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 void GpuChannelManager::LoseAllContexts() { 166 void GpuChannelManager::LoseAllContexts() {
167 MessageLoop::current()->PostTask( 167 MessageLoop::current()->PostTask(
168 FROM_HERE, method_factory_.NewRunnableMethod( 168 FROM_HERE, method_factory_.NewRunnableMethod(
169 &GpuChannelManager::OnLoseAllContexts)); 169 &GpuChannelManager::OnLoseAllContexts));
170 } 170 }
171 171
172 void GpuChannelManager::OnLoseAllContexts() { 172 void GpuChannelManager::OnLoseAllContexts() {
173 gpu_channels_.clear(); 173 gpu_channels_.clear();
174 } 174 }
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/pepper_plugin_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698