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

Side by Side Diff: ppapi/shared_impl/ppb_message_loop_shared.h

Issue 600553002: PPAPI: Disallow blocking callbacks while handling a blocking message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try to improve comment 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 | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/tests/test_message_handler.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 #ifndef PPAPI_SHARED_IMPL_PPB_MESSAGE_LOOP_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_MESSAGE_LOOP_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_MESSAGE_LOOP_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PPB_MESSAGE_LOOP_SHARED_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // if there isn't. 43 // if there isn't.
44 // NOTE: The given closure will be run *WITHOUT* acquiring the Proxy lock. 44 // NOTE: The given closure will be run *WITHOUT* acquiring the Proxy lock.
45 // This only makes sense for user code and completely thread-safe 45 // This only makes sense for user code and completely thread-safe
46 // proxy operations (e.g., MessageLoop::QuitClosure). 46 // proxy operations (e.g., MessageLoop::QuitClosure).
47 virtual void PostClosure(const tracked_objects::Location& from_here, 47 virtual void PostClosure(const tracked_objects::Location& from_here,
48 const base::Closure& closure, 48 const base::Closure& closure,
49 int64 delay_ms) = 0; 49 int64 delay_ms) = 0;
50 50
51 virtual base::MessageLoopProxy* GetMessageLoopProxy() = 0; 51 virtual base::MessageLoopProxy* GetMessageLoopProxy() = 0;
52 52
53 // Returns whether this MessageLoop is currently handling a blocking message
54 // from JavaScript. This is used to make it illegal to use blocking callbacks
55 // while the thread is handling a blocking message.
56 virtual bool CurrentlyHandlingBlockingMessage() = 0;
57
53 DISALLOW_COPY_AND_ASSIGN(MessageLoopShared); 58 DISALLOW_COPY_AND_ASSIGN(MessageLoopShared);
54 }; 59 };
55 60
56 } // namespace ppapi 61 } // namespace ppapi
57 62
58 #endif // PPAPI_SHARED_IMPL_PPB_MESSAGE_LOOP_SHARED_H_ 63 #endif // PPAPI_SHARED_IMPL_PPB_MESSAGE_LOOP_SHARED_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/tests/test_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698