OLD | NEW |
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 "webkit/plugins/ppapi/ppb_flash_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 PP_ToBool(from_user_action)); | 192 PP_ToBool(from_user_action)); |
193 } | 193 } |
194 | 194 |
195 int32_t Navigate11(PP_Resource request_id, | 195 int32_t Navigate11(PP_Resource request_id, |
196 const char* target, | 196 const char* target, |
197 bool from_user_action) { | 197 bool from_user_action) { |
198 return Navigate(request_id, target, PP_FromBool(from_user_action)); | 198 return Navigate(request_id, target, PP_FromBool(from_user_action)); |
199 } | 199 } |
200 | 200 |
201 void RunMessageLoop(PP_Instance instance) { | 201 void RunMessageLoop(PP_Instance instance) { |
202 bool old_state = MessageLoop::current()->NestableTasksAllowed(); | 202 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); |
203 MessageLoop::current()->SetNestableTasksAllowed(true); | |
204 MessageLoop::current()->Run(); | 203 MessageLoop::current()->Run(); |
205 MessageLoop::current()->SetNestableTasksAllowed(old_state); | |
206 } | 204 } |
207 | 205 |
208 void QuitMessageLoop(PP_Instance instance) { | 206 void QuitMessageLoop(PP_Instance instance) { |
209 MessageLoop::current()->QuitNow(); | 207 MessageLoop::current()->QuitNow(); |
210 } | 208 } |
211 | 209 |
212 double GetLocalTimeZoneOffset(PP_Instance pp_instance, PP_Time t) { | 210 double GetLocalTimeZoneOffset(PP_Instance pp_instance, PP_Time t) { |
213 PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance); | 211 PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance); |
214 if (!instance) | 212 if (!instance) |
215 return 0.0; | 213 return 0.0; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 return &ppb_flash_11; | 272 return &ppb_flash_11; |
275 } | 273 } |
276 | 274 |
277 // static | 275 // static |
278 const PPB_Flash_12_0* PPB_Flash_Impl::GetInterface12_0() { | 276 const PPB_Flash_12_0* PPB_Flash_Impl::GetInterface12_0() { |
279 return &ppb_flash_12; | 277 return &ppb_flash_12; |
280 } | 278 } |
281 | 279 |
282 } // namespace ppapi | 280 } // namespace ppapi |
283 } // namespace webkit | 281 } // namespace webkit |
OLD | NEW |