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 <jni.h> | 5 #include <jni.h> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // suspended as opposed to all the current renderer processes because the | 34 // suspended as opposed to all the current renderer processes because the |
35 // suspend calls are refcounted within BlinkPlatformImpl and it expects a | 35 // suspend calls are refcounted within BlinkPlatformImpl and it expects a |
36 // perfectly matched number of resume calls. | 36 // perfectly matched number of resume calls. |
37 // Note that this class is only accessed from the UI thread. | 37 // Note that this class is only accessed from the UI thread. |
38 class SuspendedProcessWatcher : public content::RenderProcessHostObserver { | 38 class SuspendedProcessWatcher : public content::RenderProcessHostObserver { |
39 public: | 39 public: |
40 | 40 |
41 // If the process crashes, stop watching the corresponding RenderProcessHost | 41 // If the process crashes, stop watching the corresponding RenderProcessHost |
42 // and ensure it doesn't get over-resumed. | 42 // and ensure it doesn't get over-resumed. |
43 virtual void RenderProcessExited(content::RenderProcessHost* host, | 43 virtual void RenderProcessExited(content::RenderProcessHost* host, |
44 base::ProcessHandle handle, | |
45 base::TerminationStatus status, | 44 base::TerminationStatus status, |
46 int exit_code) override { | 45 int exit_code) override { |
47 StopWatching(host); | 46 StopWatching(host); |
48 } | 47 } |
49 | 48 |
50 virtual void RenderProcessHostDestroyed( | 49 virtual void RenderProcessHostDestroyed( |
51 content::RenderProcessHost* host) override { | 50 content::RenderProcessHost* host) override { |
52 StopWatching(host); | 51 StopWatching(host); |
53 } | 52 } |
54 | 53 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 115 } |
117 } | 116 } |
118 | 117 |
119 namespace content { | 118 namespace content { |
120 | 119 |
121 bool RegisterWebViewStatics(JNIEnv* env) { | 120 bool RegisterWebViewStatics(JNIEnv* env) { |
122 return RegisterNativesImpl(env); | 121 return RegisterNativesImpl(env); |
123 } | 122 } |
124 | 123 |
125 } // namespace content | 124 } // namespace content |
OLD | NEW |