| OLD | NEW |
| 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/shell/browser/shell.h" | 5 #include "content/shell/browser/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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 Java_Shell_toggleFullscreenModeForTab( | 81 Java_Shell_toggleFullscreenModeForTab( |
| 82 env, java_object_.obj(), enter_fullscreen); | 82 env, java_object_.obj(), enter_fullscreen); |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool Shell::PlatformIsFullscreenForTabOrPending( | 85 bool Shell::PlatformIsFullscreenForTabOrPending( |
| 86 const WebContents* web_contents) const { | 86 const WebContents* web_contents) const { |
| 87 JNIEnv* env = AttachCurrentThread(); | 87 JNIEnv* env = AttachCurrentThread(); |
| 88 return Java_Shell_isFullscreenForTabOrPending(env, java_object_.obj()); | 88 return Java_Shell_isFullscreenForTabOrPending(env, java_object_.obj()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool Shell::PlatformHandleContextMenu( | |
| 92 const content::ContextMenuParams& params) { | |
| 93 return false; | |
| 94 } | |
| 95 | |
| 96 void Shell::Close() { | 91 void Shell::Close() { |
| 97 RemoveShellView(java_object_.obj()); | 92 RemoveShellView(java_object_.obj()); |
| 98 delete this; | 93 delete this; |
| 99 } | 94 } |
| 100 | 95 |
| 101 // static | 96 // static |
| 102 bool Shell::Register(JNIEnv* env) { | 97 bool Shell::Register(JNIEnv* env) { |
| 103 return RegisterNativesImpl(env); | 98 return RegisterNativesImpl(env); |
| 104 } | 99 } |
| 105 | 100 |
| 106 // static | 101 // static |
| 107 void CloseShell(JNIEnv* env, | 102 void CloseShell(JNIEnv* env, |
| 108 const JavaParamRef<jclass>& clazz, | 103 const JavaParamRef<jclass>& clazz, |
| 109 jlong shellPtr) { | 104 jlong shellPtr) { |
| 110 Shell* shell = reinterpret_cast<Shell*>(shellPtr); | 105 Shell* shell = reinterpret_cast<Shell*>(shellPtr); |
| 111 shell->Close(); | 106 shell->Close(); |
| 112 } | 107 } |
| 113 | 108 |
| 114 } // namespace content | 109 } // namespace content |
| OLD | NEW |