| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 void Shell::PlatformSetTitle(const base::string16& title) { | 71 void Shell::PlatformSetTitle(const base::string16& title) { |
| 72 NOTIMPLEMENTED() << ": " << title; | 72 NOTIMPLEMENTED() << ": " << title; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void Shell::LoadProgressChanged(WebContents* source, double progress) { | 75 void Shell::LoadProgressChanged(WebContents* source, double progress) { |
| 76 JNIEnv* env = AttachCurrentThread(); | 76 JNIEnv* env = AttachCurrentThread(); |
| 77 Java_Shell_onLoadProgressChanged(env, java_object_, progress); | 77 Java_Shell_onLoadProgressChanged(env, java_object_, progress); |
| 78 } | 78 } |
| 79 | 79 |
| 80 ScopedJavaLocalRef<jobject> Shell::GetContentVideoViewEmbedder() { |
| 81 JNIEnv* env = base::android::AttachCurrentThread(); |
| 82 return Java_Shell_getContentVideoViewEmbedder(env, java_object_); |
| 83 } |
| 84 |
| 80 void Shell::PlatformToggleFullscreenModeForTab(WebContents* web_contents, | 85 void Shell::PlatformToggleFullscreenModeForTab(WebContents* web_contents, |
| 81 bool enter_fullscreen) { | 86 bool enter_fullscreen) { |
| 82 JNIEnv* env = AttachCurrentThread(); | 87 JNIEnv* env = AttachCurrentThread(); |
| 83 Java_Shell_toggleFullscreenModeForTab(env, java_object_, enter_fullscreen); | 88 Java_Shell_toggleFullscreenModeForTab(env, java_object_, enter_fullscreen); |
| 84 } | 89 } |
| 85 | 90 |
| 86 bool Shell::PlatformIsFullscreenForTabOrPending( | 91 bool Shell::PlatformIsFullscreenForTabOrPending( |
| 87 const WebContents* web_contents) const { | 92 const WebContents* web_contents) const { |
| 88 JNIEnv* env = AttachCurrentThread(); | 93 JNIEnv* env = AttachCurrentThread(); |
| 89 return Java_Shell_isFullscreenForTabOrPending(env, java_object_); | 94 return Java_Shell_isFullscreenForTabOrPending(env, java_object_); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 101 | 106 |
| 102 // static | 107 // static |
| 103 void CloseShell(JNIEnv* env, | 108 void CloseShell(JNIEnv* env, |
| 104 const JavaParamRef<jclass>& clazz, | 109 const JavaParamRef<jclass>& clazz, |
| 105 jlong shellPtr) { | 110 jlong shellPtr) { |
| 106 Shell* shell = reinterpret_cast<Shell*>(shellPtr); | 111 Shell* shell = reinterpret_cast<Shell*>(shellPtr); |
| 107 shell->Close(); | 112 shell->Close(); |
| 108 } | 113 } |
| 109 | 114 |
| 110 } // namespace content | 115 } // namespace content |
| OLD | NEW |