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

Side by Side Diff: content/shell/android/shell_manager.h

Issue 1294333002: Fix wrong usages of ScopedJavaLocalRef::Release(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment to Release() explaining it should not be used to call java methods Created 5 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
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_SHELL_ANDROID_SHELL_MANAGER_H_ 5 #ifndef CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_
6 #define CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_ 6 #define CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 12
13 class Shell; 13 class Shell;
14 14
15 namespace blink { 15 namespace blink {
16 class WebLayer; 16 class WebLayer;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 20
21 // Creates an Android specific shell view, which is our version of a shell 21 // Creates an Android specific shell view, which is our version of a shell
22 // window. This view holds the controls and content views necessary to 22 // window. This view holds the controls and content views necessary to
23 // render a shell window. Returns the java object representing the shell view. 23 // render a shell window. Returns the java object representing the shell view.
24 // object. 24 // object.
25 jobject CreateShellView(Shell* shell); 25 base::android::ScopedJavaLocalRef<jobject> CreateShellView(Shell* shell);
26 26
27 // Removes a previously created shell view. 27 // Removes a previously created shell view.
28 void RemoveShellView(jobject shell_view); 28 void RemoveShellView(jobject shell_view);
29 29
30 // Registers the ShellManager native methods. 30 // Registers the ShellManager native methods.
31 bool RegisterShellManager(JNIEnv* env); 31 bool RegisterShellManager(JNIEnv* env);
32 32
33 void ShellAttachLayer(blink::WebLayer* layer); 33 void ShellAttachLayer(blink::WebLayer* layer);
34 void ShellRemoveLayer(blink::WebLayer* layer); 34 void ShellRemoveLayer(blink::WebLayer* layer);
35 } // namespace content 35 } // namespace content
36 36
37 #endif // CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_ 37 #endif // CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_
OLDNEW
« no previous file with comments | « components/web_contents_delegate_android/web_contents_delegate_android.cc ('k') | content/shell/android/shell_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698