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

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

Issue 1390513002: Remove base::MessageLoop::{Quit,QuitClosure} functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split into small CLs Created 5 years, 2 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 | « jingle/glue/thread_wrapper_unittest.cc ('k') | storage/common/database/database_connections.cc » ('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_message_loop_proxy.h" 5 #include "ppapi/proxy/ppb_message_loop_proxy.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 int32_t MessageLoopResource::PostQuit(PP_Bool should_destroy) { 136 int32_t MessageLoopResource::PostQuit(PP_Bool should_destroy) {
137 if (is_main_thread_loop_) 137 if (is_main_thread_loop_)
138 return PP_ERROR_WRONG_THREAD; 138 return PP_ERROR_WRONG_THREAD;
139 139
140 if (PP_ToBool(should_destroy)) 140 if (PP_ToBool(should_destroy))
141 should_destroy_ = true; 141 should_destroy_ = true;
142 142
143 if (IsCurrent() && nested_invocations_ > 0) 143 if (IsCurrent() && nested_invocations_ > 0)
144 loop_->Quit(); 144 loop_->QuitWhenIdle();
145 else 145 else
146 PostClosure(FROM_HERE, base::MessageLoop::QuitClosure(), 0); 146 PostClosure(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), 0);
147 return PP_OK; 147 return PP_OK;
148 } 148 }
149 149
150 // static 150 // static
151 MessageLoopResource* MessageLoopResource::GetCurrent() { 151 MessageLoopResource* MessageLoopResource::GetCurrent() {
152 PluginGlobals* globals = PluginGlobals::Get(); 152 PluginGlobals* globals = PluginGlobals::Get();
153 if (!globals->msg_loop_slot()) 153 if (!globals->msg_loop_slot())
154 return NULL; 154 return NULL;
155 return reinterpret_cast<MessageLoopResource*>( 155 return reinterpret_cast<MessageLoopResource*>(
156 globals->msg_loop_slot()->Get()); 156 globals->msg_loop_slot()->Get());
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { 275 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() {
276 } 276 }
277 277
278 // static 278 // static
279 const PPB_MessageLoop_1_0* PPB_MessageLoop_Proxy::GetInterface() { 279 const PPB_MessageLoop_1_0* PPB_MessageLoop_Proxy::GetInterface() {
280 return &ppb_message_loop_interface; 280 return &ppb_message_loop_interface;
281 } 281 }
282 282
283 } // namespace proxy 283 } // namespace proxy
284 } // namespace ppapi 284 } // namespace ppapi
OLDNEW
« no previous file with comments | « jingle/glue/thread_wrapper_unittest.cc ('k') | storage/common/database/database_connections.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698