| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/client/android/toolbar.h" | 5 #include "blimp/client/android/toolbar.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "blimp/client/session/blimp_client_session_android.h" | 8 #include "blimp/client/session/blimp_client_session_android.h" |
| 9 #include "jni/Toolbar_jni.h" | 9 #include "jni/Toolbar_jni.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "ui/gfx/android/java_bitmap.h" | 11 #include "ui/gfx/android/java_bitmap.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 namespace blimp { | 14 namespace blimp { |
| 15 namespace client { |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 const int kDummyTabId = 0; | 19 const int kDummyTabId = 0; |
| 19 | 20 |
| 20 } // namespace | 21 } // namespace |
| 21 | 22 |
| 22 static jlong Init(JNIEnv* env, | 23 static jlong Init(JNIEnv* env, |
| 23 const JavaParamRef<jobject>& jobj, | 24 const JavaParamRef<jobject>& jobj, |
| 24 const JavaParamRef<jobject>& blimp_client_session) { | 25 const JavaParamRef<jobject>& blimp_client_session) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 101 } |
| 101 | 102 |
| 102 void Toolbar::OnLoadingChanged(int tab_id, bool loading) { | 103 void Toolbar::OnLoadingChanged(int tab_id, bool loading) { |
| 103 JNIEnv* env = base::android::AttachCurrentThread(); | 104 JNIEnv* env = base::android::AttachCurrentThread(); |
| 104 | 105 |
| 105 Java_Toolbar_onEngineSentLoading(env, | 106 Java_Toolbar_onEngineSentLoading(env, |
| 106 java_obj_.obj(), | 107 java_obj_.obj(), |
| 107 static_cast<jboolean>(loading)); | 108 static_cast<jboolean>(loading)); |
| 108 } | 109 } |
| 109 | 110 |
| 111 } // namespace client |
| 110 } // namespace blimp | 112 } // namespace blimp |
| OLD | NEW |