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

Side by Side Diff: content/browser/renderer_host/ime_adapter_android.h

Issue 22764006: [Android] Fix ime NPE after RWH is destroyed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/ime_adapter_android.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 CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_helper.h" 10 #include "base/android/jni_helper.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class RenderWidgetHostImpl;
14 class RenderWidgetHostViewAndroid; 15 class RenderWidgetHostViewAndroid;
15 struct NativeWebKeyboardEvent; 16 struct NativeWebKeyboardEvent;
16 17
17 // This class is in charge of dispatching key events from the java side 18 // This class is in charge of dispatching key events from the java side
18 // and forward to renderer along with input method results via 19 // and forward to renderer along with input method results via
19 // corresponding host view. 20 // corresponding host view.
20 // Ownership of these objects remains on the native side (see 21 // Ownership of these objects remains on the native side (see
21 // RenderWidgetHostViewAndroid). 22 // RenderWidgetHostViewAndroid).
22 class ImeAdapterAndroid { 23 class ImeAdapterAndroid {
23 public: 24 public:
(...skipping 27 matching lines...) Expand all
51 void SelectAll(JNIEnv*, jobject); 52 void SelectAll(JNIEnv*, jobject);
52 void Cut(JNIEnv*, jobject); 53 void Cut(JNIEnv*, jobject);
53 void Copy(JNIEnv*, jobject); 54 void Copy(JNIEnv*, jobject);
54 void Paste(JNIEnv*, jobject); 55 void Paste(JNIEnv*, jobject);
55 void ResetImeAdapter(JNIEnv*, jobject); 56 void ResetImeAdapter(JNIEnv*, jobject);
56 57
57 // Called from native -> java 58 // Called from native -> java
58 void CancelComposition(); 59 void CancelComposition();
59 60
60 private: 61 private:
62 RenderWidgetHostImpl* GetRenderWidgetHostImpl();
63
61 RenderWidgetHostViewAndroid* rwhva_; 64 RenderWidgetHostViewAndroid* rwhva_;
62 JavaObjectWeakGlobalRef java_ime_adapter_; 65 JavaObjectWeakGlobalRef java_ime_adapter_;
63 }; 66 };
64 67
65 bool RegisterImeAdapter(JNIEnv* env); 68 bool RegisterImeAdapter(JNIEnv* env);
66 69
67 } // namespace content 70 } // namespace content
68 71
69 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ 72 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/ime_adapter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698