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

Side by Side Diff: content/renderer/pepper/pepper_webplugin_impl.cc

Issue 2034663003: Remove use of deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
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/pepper/pepper_webplugin_impl.h" 5 #include "content/renderer/pepper/pepper_webplugin_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <cmath> 8 #include <cmath>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/debug/crash_logging.h" 11 #include "base/debug/crash_logging.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/location.h"
13 #include "base/single_thread_task_runner.h"
14 #include "base/threading/thread_task_runner_handle.h"
13 #include "content/public/renderer/content_renderer_client.h" 15 #include "content/public/renderer/content_renderer_client.h"
14 #include "content/renderer/pepper/message_channel.h" 16 #include "content/renderer/pepper/message_channel.h"
15 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 17 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
16 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" 18 #include "content/renderer/pepper/plugin_instance_throttler_impl.h"
17 #include "content/renderer/pepper/plugin_module.h" 19 #include "content/renderer/pepper/plugin_module.h"
18 #include "content/renderer/pepper/v8object_var.h" 20 #include "content/renderer/pepper/v8object_var.h"
19 #include "content/renderer/render_frame_impl.h" 21 #include "content/renderer/render_frame_impl.h"
20 #include "ppapi/shared_impl/ppapi_globals.h" 22 #include "ppapi/shared_impl/ppapi_globals.h"
21 #include "ppapi/shared_impl/var_tracker.h" 23 #include "ppapi/shared_impl/var_tracker.h"
22 #include "third_party/WebKit/public/platform/WebPoint.h" 24 #include "third_party/WebKit/public/platform/WebPoint.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 150
149 container_ = nullptr; 151 container_ = nullptr;
150 152
151 if (instance_) { 153 if (instance_) {
152 ppapi::PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(instance_object_); 154 ppapi::PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(instance_object_);
153 instance_object_ = PP_MakeUndefined(); 155 instance_object_ = PP_MakeUndefined();
154 instance_->Delete(); 156 instance_->Delete();
155 instance_ = nullptr; 157 instance_ = nullptr;
156 } 158 }
157 159
158 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 160 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
159 } 161 }
160 162
161 v8::Local<v8::Object> PepperWebPluginImpl::v8ScriptableObject( 163 v8::Local<v8::Object> PepperWebPluginImpl::v8ScriptableObject(
162 v8::Isolate* isolate) { 164 v8::Isolate* isolate) {
163 // Re-entrancy may cause JS to try to execute script on the plugin before it 165 // Re-entrancy may cause JS to try to execute script on the plugin before it
164 // is fully initialized. See e.g. crbug.com/503401. 166 // is fully initialized. See e.g. crbug.com/503401.
165 if (!instance_) 167 if (!instance_)
166 return v8::Local<v8::Object>(); 168 return v8::Local<v8::Object>();
167 // Call through the plugin to get its instance object. The plugin should pass 169 // Call through the plugin to get its instance object. The plugin should pass
168 // us a reference which we release in destroy(). 170 // us a reference which we release in destroy().
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 300
299 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } 301 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); }
300 302
301 void PepperWebPluginImpl::rotateView(RotationType type) { 303 void PepperWebPluginImpl::rotateView(RotationType type) {
302 instance_->RotateView(type); 304 instance_->RotateView(type);
303 } 305 }
304 306
305 bool PepperWebPluginImpl::isPlaceholder() { return false; } 307 bool PepperWebPluginImpl::isPlaceholder() { return false; }
306 308
307 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_media_device_manager.cc ('k') | content/renderer/pepper/plugin_power_saver_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698