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

Side by Side Diff: ppapi/proxy/plugin_globals.cc

Issue 515283002: Manual fixups in PPAPI for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary stuff Created 6 years, 3 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
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_file_io_host.cc ('k') | no next file » | 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 "ppapi/proxy/plugin_globals.h" 5 #include "ppapi/proxy/plugin_globals.h"
6 6
7 #include "base/task_runner.h" 7 #include "base/task_runner.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return MessageLoopResource::GetCurrent(); 165 return MessageLoopResource::GetCurrent();
166 } 166 }
167 167
168 base::TaskRunner* PluginGlobals::GetFileTaskRunner() { 168 base::TaskRunner* PluginGlobals::GetFileTaskRunner() {
169 if (!file_thread_.get()) { 169 if (!file_thread_.get()) {
170 file_thread_.reset(new base::Thread("Plugin::File")); 170 file_thread_.reset(new base::Thread("Plugin::File"));
171 base::Thread::Options options; 171 base::Thread::Options options;
172 options.message_loop_type = base::MessageLoop::TYPE_IO; 172 options.message_loop_type = base::MessageLoop::TYPE_IO;
173 file_thread_->StartWithOptions(options); 173 file_thread_->StartWithOptions(options);
174 } 174 }
175 return file_thread_->message_loop_proxy(); 175 return file_thread_->message_loop_proxy().get();
176 } 176 }
177 177
178 void PluginGlobals::MarkPluginIsActive() { 178 void PluginGlobals::MarkPluginIsActive() {
179 if (!plugin_recently_active_) { 179 if (!plugin_recently_active_) {
180 plugin_recently_active_ = true; 180 plugin_recently_active_ = true;
181 if (!GetBrowserSender() || !base::MessageLoop::current()) 181 if (!GetBrowserSender() || !base::MessageLoop::current())
182 return; 182 return;
183 GetBrowserSender()->Send(new PpapiHostMsg_Keepalive()); 183 GetBrowserSender()->Send(new PpapiHostMsg_Keepalive());
184 DCHECK(keepalive_throttle_interval_milliseconds_); 184 DCHECK(keepalive_throttle_interval_milliseconds_);
185 GetMainThreadMessageLoop()->PostDelayedTask( 185 GetMainThreadMessageLoop()->PostDelayedTask(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 return true; 229 return true;
230 } 230 }
231 231
232 void PluginGlobals::OnReleaseKeepaliveThrottle() { 232 void PluginGlobals::OnReleaseKeepaliveThrottle() {
233 ppapi::ProxyLock::AssertAcquiredDebugOnly(); 233 ppapi::ProxyLock::AssertAcquiredDebugOnly();
234 plugin_recently_active_ = false; 234 plugin_recently_active_ = false;
235 } 235 }
236 236
237 } // namespace proxy 237 } // namespace proxy
238 } // namespace ppapi 238 } // namespace ppapi
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_file_io_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698