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

Unified Diff: content/browser/android/web_contents_observer_proxy.cc

Issue 2380743003: Refactor ContentViewClient (2/6) (Closed)
Patch Set: // Do nothing Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/web_contents_observer_proxy.cc
diff --git a/content/browser/android/web_contents_observer_proxy.cc b/content/browser/android/web_contents_observer_proxy.cc
index 34e72a96838ec8dff78830568185efea3ae87b22..0efc07cdf50bbbed365c59c140551ed5dbe4e8a7 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -10,6 +10,7 @@
#include "base/android/jni_string.h"
#include "base/android/scoped_java_ref.h"
#include "base/optional.h"
+#include "base/strings/utf_string_conversions.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/android/media_metadata_android.h"
@@ -306,6 +307,16 @@ void WebContentsObserverProxy::WasHidden() {
Java_WebContentsObserverProxy_wasHidden(env, obj);
}
+void WebContentsObserverProxy::TitleWasSet(NavigationEntry* entry,
+ bool explicit_set) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj(java_observer_);
+ ScopedJavaLocalRef<jstring> jstring_title = ConvertUTF8ToJavaString(
+ env,
+ base::UTF16ToUTF8(web_contents()->GetTitle()));
+ Java_WebContentsObserverProxy_titleWasSet(env, obj, jstring_title);
+}
+
void WebContentsObserverProxy::DidStartNavigationToPendingEntry(
const GURL& url,
ReloadType reload_type) {
« no previous file with comments | « content/browser/android/web_contents_observer_proxy.h ('k') | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698