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 "content/shell/shell.h" | 5 #include "content/shell/shell.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 env, java_object_.obj(), enter_fullscreen); | 73 env, java_object_.obj(), enter_fullscreen); |
74 } | 74 } |
75 | 75 |
76 bool Shell::PlatformIsFullscreenForTabOrPending( | 76 bool Shell::PlatformIsFullscreenForTabOrPending( |
77 const WebContents* web_contents) const { | 77 const WebContents* web_contents) const { |
78 JNIEnv* env = AttachCurrentThread(); | 78 JNIEnv* env = AttachCurrentThread(); |
79 return Java_Shell_isFullscreenForTabOrPending(env, java_object_.obj()); | 79 return Java_Shell_isFullscreenForTabOrPending(env, java_object_.obj()); |
80 } | 80 } |
81 | 81 |
82 void Shell::Close() { | 82 void Shell::Close() { |
83 // TODO(tedchoc): Implement Close method for android shell | 83 CloseShellView(java_object_.obj()); |
84 NOTIMPLEMENTED(); | 84 java_object_.Reset(); |
| 85 delete this; |
85 } | 86 } |
86 | 87 |
87 // static | 88 // static |
88 bool Shell::Register(JNIEnv* env) { | 89 bool Shell::Register(JNIEnv* env) { |
89 return RegisterNativesImpl(env); | 90 return RegisterNativesImpl(env); |
90 } | 91 } |
91 | 92 |
92 } // namespace content | 93 } // namespace content |
OLD | NEW |