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

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

Issue 14273043: ppapi: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 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 | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | ppapi/proxy/ppb_message_loop_proxy.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) 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/ppb_instance_proxy.h" 5 #include "ppapi/proxy/ppb_instance_proxy.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/pp_time.h" 10 #include "ppapi/c/pp_time.h"
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // 780 //
781 // Be careful to post a task to avoid reentering the plugin. 781 // Be careful to post a task to avoid reentering the plugin.
782 782
783 InstanceData* data = 783 InstanceData* data =
784 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance); 784 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
785 if (!data) 785 if (!data)
786 return; 786 return;
787 data->should_do_request_surrounding_text = true; 787 data->should_do_request_surrounding_text = true;
788 788
789 if (!data->is_request_surrounding_text_pending) { 789 if (!data->is_request_surrounding_text_pending) {
790 MessageLoop::current()->PostTask( 790 base::MessageLoop::current()->PostTask(
791 FROM_HERE, 791 FROM_HERE,
792 RunWhileLocked(base::Bind(&RequestSurroundingText, instance))); 792 RunWhileLocked(base::Bind(&RequestSurroundingText, instance)));
793 data->is_request_surrounding_text_pending = true; 793 data->is_request_surrounding_text_pending = true;
794 } 794 }
795 } 795 }
796 796
797 void PPB_Instance_Proxy::UpdateSurroundingText(PP_Instance instance, 797 void PPB_Instance_Proxy::UpdateSurroundingText(PP_Instance instance,
798 const char* text, 798 const char* text,
799 uint32_t caret, 799 uint32_t caret,
800 uint32_t anchor) { 800 uint32_t anchor) {
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 PP_Instance instance) { 1250 PP_Instance instance) {
1251 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> 1251 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
1252 GetInstanceData(instance); 1252 GetInstanceData(instance);
1253 if (!data) 1253 if (!data)
1254 return; // Instance was probably deleted. 1254 return; // Instance was probably deleted.
1255 data->should_do_request_surrounding_text = false; 1255 data->should_do_request_surrounding_text = false;
1256 } 1256 }
1257 1257
1258 } // namespace proxy 1258 } // namespace proxy
1259 } // namespace ppapi 1259 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | ppapi/proxy/ppb_message_loop_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698