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

Side by Side Diff: content/public/test/nested_message_pump_android.cc

Issue 2041033003: clang-tidy WaitableEvent refactor (Android side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0_windows
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/public/test/nested_message_pump_android.h" 5 #include "content/public/test/nested_message_pump_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 10 matching lines...) Expand all
21 } // namespace 21 } // namespace
22 22
23 23
24 namespace content { 24 namespace content {
25 25
26 struct NestedMessagePumpAndroid::RunState { 26 struct NestedMessagePumpAndroid::RunState {
27 RunState(base::MessagePump::Delegate* delegate, int run_depth) 27 RunState(base::MessagePump::Delegate* delegate, int run_depth)
28 : delegate(delegate), 28 : delegate(delegate),
29 run_depth(run_depth), 29 run_depth(run_depth),
30 should_quit(false), 30 should_quit(false),
31 waitable_event(false, false) { 31 waitable_event(base::WaitableEvent::ResetPolicy::AUTOMATIC,
32 } 32 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
33 33
34 base::MessagePump::Delegate* delegate; 34 base::MessagePump::Delegate* delegate;
35 35
36 // Used to count how many Run() invocations are on the stack. 36 // Used to count how many Run() invocations are on the stack.
37 int run_depth; 37 int run_depth;
38 38
39 // Used to flag that the current Run() invocation should return ASAP. 39 // Used to flag that the current Run() invocation should return ASAP.
40 bool should_quit; 40 bool should_quit;
41 41
42 // Used to sleep until there is more work to do. 42 // Used to sleep until there is more work to do.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return; 150 return;
151 } 151 }
152 } 152 }
153 153
154 // static 154 // static
155 bool NestedMessagePumpAndroid::RegisterJni(JNIEnv* env) { 155 bool NestedMessagePumpAndroid::RegisterJni(JNIEnv* env) {
156 return RegisterNativesImpl(env); 156 return RegisterNativesImpl(env);
157 } 157 }
158 158
159 } // namespace content 159 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698