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

Side by Side Diff: content/shell/browser/shell_android.cc

Issue 287373002: Navigation buttons should not enable if user can not navigate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected spacing problem and modified java doc Created 6 years, 7 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
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/Shell.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 } 29 }
30 30
31 void Shell::PlatformCleanUp() { 31 void Shell::PlatformCleanUp() {
32 JNIEnv* env = AttachCurrentThread(); 32 JNIEnv* env = AttachCurrentThread();
33 if (java_object_.is_null()) 33 if (java_object_.is_null())
34 return; 34 return;
35 Java_Shell_onNativeDestroyed(env, java_object_.obj()); 35 Java_Shell_onNativeDestroyed(env, java_object_.obj());
36 } 36 }
37 37
38 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { 38 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
39 JNIEnv* env = AttachCurrentThread();
40 if (java_object_.is_null())
41 return;
42 Java_Shell_enableUiControl(env, java_object_.obj(), control, is_enabled);
39 } 43 }
40 44
41 void Shell::PlatformSetAddressBarURL(const GURL& url) { 45 void Shell::PlatformSetAddressBarURL(const GURL& url) {
42 JNIEnv* env = AttachCurrentThread(); 46 JNIEnv* env = AttachCurrentThread();
43 ScopedJavaLocalRef<jstring> j_url = ConvertUTF8ToJavaString(env, url.spec()); 47 ScopedJavaLocalRef<jstring> j_url = ConvertUTF8ToJavaString(env, url.spec());
44 Java_Shell_onUpdateUrl(env, java_object_.obj(), j_url.obj()); 48 Java_Shell_onUpdateUrl(env, java_object_.obj(), j_url.obj());
45 } 49 }
46 50
47 void Shell::PlatformSetIsLoading(bool loading) { 51 void Shell::PlatformSetIsLoading(bool loading) {
48 JNIEnv* env = AttachCurrentThread(); 52 JNIEnv* env = AttachCurrentThread();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return RegisterNativesImpl(env); 104 return RegisterNativesImpl(env);
101 } 105 }
102 106
103 // static 107 // static
104 void CloseShell(JNIEnv* env, jclass clazz, jlong shellPtr) { 108 void CloseShell(JNIEnv* env, jclass clazz, jlong shellPtr) {
105 Shell* shell = reinterpret_cast<Shell*>(shellPtr); 109 Shell* shell = reinterpret_cast<Shell*>(shellPtr);
106 shell->Close(); 110 shell->Close();
107 } 111 }
108 112
109 } // namespace content 113 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/Shell.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698