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

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

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 years, 5 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 Java_WebContentsObserverProxy_didFinishNavigation( 87 Java_WebContentsObserverProxy_didFinishNavigation(
88 env, obj.obj(), navigation_handle->IsInMainFrame(), 88 env, obj.obj(), navigation_handle->IsInMainFrame(),
89 navigation_handle->IsErrorPage(), navigation_handle->HasCommitted()); 89 navigation_handle->IsErrorPage(), navigation_handle->HasCommitted());
90 } 90 }
91 91
92 void WebContentsObserverProxy::DidStartLoading() { 92 void WebContentsObserverProxy::DidStartLoading() {
93 JNIEnv* env = AttachCurrentThread(); 93 JNIEnv* env = AttachCurrentThread();
94 ScopedJavaLocalRef<jobject> obj(java_observer_); 94 ScopedJavaLocalRef<jobject> obj(java_observer_);
95 ScopedJavaLocalRef<jstring> jstring_url( 95 ScopedJavaLocalRef<jstring> jstring_url(
96 ConvertUTF8ToJavaString(env, web_contents()->GetVisibleURL().spec())); 96 ConvertUTF8ToJavaString(env, web_contents()->GetVisibleURL().spec()));
97 if (auto entry = web_contents()->GetController().GetPendingEntry()) { 97 if (auto* entry = web_contents()->GetController().GetPendingEntry()) {
98 base_url_of_last_started_data_url_ = entry->GetBaseURLForDataURL(); 98 base_url_of_last_started_data_url_ = entry->GetBaseURLForDataURL();
99 } 99 }
100 Java_WebContentsObserverProxy_didStartLoading(env, obj.obj(), 100 Java_WebContentsObserverProxy_didStartLoading(env, obj.obj(),
101 jstring_url.obj()); 101 jstring_url.obj());
102 } 102 }
103 103
104 void WebContentsObserverProxy::DidStopLoading() { 104 void WebContentsObserverProxy::DidStopLoading() {
105 JNIEnv* env = AttachCurrentThread(); 105 JNIEnv* env = AttachCurrentThread();
106 ScopedJavaLocalRef<jobject> obj(java_observer_); 106 ScopedJavaLocalRef<jobject> obj(java_observer_);
107 std::string url_string = web_contents()->GetLastCommittedURL().spec(); 107 std::string url_string = web_contents()->GetLastCommittedURL().spec();
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // a base URL if there has been a loadUrl("javascript:...") after 336 // a base URL if there has been a loadUrl("javascript:...") after
337 // loadDataWithBaseUrl. 337 // loadDataWithBaseUrl.
338 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); 338 *url = base_url_of_last_started_data_url_.possibly_invalid_spec();
339 } 339 }
340 } 340 }
341 341
342 bool RegisterWebContentsObserverProxy(JNIEnv* env) { 342 bool RegisterWebContentsObserverProxy(JNIEnv* env) {
343 return RegisterNativesImpl(env); 343 return RegisterNativesImpl(env);
344 } 344 }
345 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698