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

Side by Side Diff: content/browser/android/web_contents_observer_proxy.cc

Issue 2434893003: Hide the page info dialog if the underlying webcontents is hidden. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
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 "content/browser/android/web_contents_observer_proxy.h" 5 #include "content/browser/android/web_contents_observer_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 env, obj, is_provisional_load, is_main_frame, error_code, 287 env, obj, is_provisional_load, is_main_frame, error_code,
288 jstring_error_description, jstring_url, was_ignored_by_handler); 288 jstring_error_description, jstring_url, was_ignored_by_handler);
289 } 289 }
290 290
291 void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() { 291 void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() {
292 JNIEnv* env = AttachCurrentThread(); 292 JNIEnv* env = AttachCurrentThread();
293 ScopedJavaLocalRef<jobject> obj(java_observer_); 293 ScopedJavaLocalRef<jobject> obj(java_observer_);
294 Java_WebContentsObserverProxy_didFirstVisuallyNonEmptyPaint(env, obj); 294 Java_WebContentsObserverProxy_didFirstVisuallyNonEmptyPaint(env, obj);
295 } 295 }
296 296
297 void WebContentsObserverProxy::WasShown() {
298 JNIEnv* env = AttachCurrentThread();
299 ScopedJavaLocalRef<jobject> obj(java_observer_);
300 Java_WebContentsObserverProxy_wasShown(env, obj);
301 }
302
303 void WebContentsObserverProxy::WasHidden() {
304 JNIEnv* env = AttachCurrentThread();
305 ScopedJavaLocalRef<jobject> obj(java_observer_);
306 Java_WebContentsObserverProxy_wasHidden(env, obj);
307 }
308
297 void WebContentsObserverProxy::DidStartNavigationToPendingEntry( 309 void WebContentsObserverProxy::DidStartNavigationToPendingEntry(
298 const GURL& url, 310 const GURL& url,
299 ReloadType reload_type) { 311 ReloadType reload_type) {
300 JNIEnv* env = AttachCurrentThread(); 312 JNIEnv* env = AttachCurrentThread();
301 ScopedJavaLocalRef<jobject> obj(java_observer_); 313 ScopedJavaLocalRef<jobject> obj(java_observer_);
302 ScopedJavaLocalRef<jstring> jstring_url( 314 ScopedJavaLocalRef<jstring> jstring_url(
303 ConvertUTF8ToJavaString(env, url.spec())); 315 ConvertUTF8ToJavaString(env, url.spec()));
304 316
305 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry(env, obj, 317 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry(env, obj,
306 jstring_url); 318 jstring_url);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // a base URL if there has been a loadUrl("javascript:...") after 356 // a base URL if there has been a loadUrl("javascript:...") after
345 // loadDataWithBaseUrl. 357 // loadDataWithBaseUrl.
346 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); 358 *url = base_url_of_last_started_data_url_.possibly_invalid_spec();
347 } 359 }
348 } 360 }
349 361
350 bool RegisterWebContentsObserverProxy(JNIEnv* env) { 362 bool RegisterWebContentsObserverProxy(JNIEnv* env) {
351 return RegisterNativesImpl(env); 363 return RegisterNativesImpl(env);
352 } 364 }
353 } // namespace content 365 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698