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

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 672973003: Navigation transitions (web to native app): Clear navigation transition data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
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/browser/web_contents/web_contents_android.h" 5 #include "content/browser/web_contents/web_contents_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 void WebContentsAndroid::BeginExitTransition(JNIEnv* env, 169 void WebContentsAndroid::BeginExitTransition(JNIEnv* env,
170 jobject jobj, 170 jobject jobj,
171 jstring css_selector) { 171 jstring css_selector) {
172 web_contents_->GetMainFrame()->Send(new FrameMsg_BeginExitTransition( 172 web_contents_->GetMainFrame()->Send(new FrameMsg_BeginExitTransition(
173 web_contents_->GetMainFrame()->GetRoutingID(), 173 web_contents_->GetMainFrame()->GetRoutingID(),
174 ConvertJavaStringToUTF8(env, css_selector))); 174 ConvertJavaStringToUTF8(env, css_selector)));
175 } 175 }
176 176
177 void WebContentsAndroid::ClearNavigationTransitionData(JNIEnv* env,
178 jobject jobj) {
179 static_cast<WebContentsImpl*>(web_contents_)->ClearNavigationTransitionData();
180 }
181
177 void WebContentsAndroid::OnHide(JNIEnv* env, jobject obj) { 182 void WebContentsAndroid::OnHide(JNIEnv* env, jobject obj) {
178 web_contents_->WasHidden(); 183 web_contents_->WasHidden();
179 } 184 }
180 185
181 void WebContentsAndroid::OnShow(JNIEnv* env, jobject obj) { 186 void WebContentsAndroid::OnShow(JNIEnv* env, jobject obj) {
182 web_contents_->WasShown(); 187 web_contents_->WasShown();
183 } 188 }
184 189
185 void WebContentsAndroid::ReleaseMediaPlayers(JNIEnv* env, jobject jobj) { 190 void WebContentsAndroid::ReleaseMediaPlayers(JNIEnv* env, jobject jobj) {
186 #if defined(ENABLE_BROWSER_CDMS) 191 #if defined(ENABLE_BROWSER_CDMS)
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 ViewMsg_PostMessage_Params params; 381 ViewMsg_PostMessage_Params params;
377 params.source_origin = ConvertJavaStringToUTF16(env, source_origin); 382 params.source_origin = ConvertJavaStringToUTF16(env, source_origin);
378 params.target_origin = ConvertJavaStringToUTF16(env, target_origin); 383 params.target_origin = ConvertJavaStringToUTF16(env, target_origin);
379 params.data = ConvertJavaStringToUTF16(env, message); 384 params.data = ConvertJavaStringToUTF16(env, message);
380 params.is_data_raw_string = true; 385 params.is_data_raw_string = true;
381 params.source_routing_id = MSG_ROUTING_NONE; 386 params.source_routing_id = MSG_ROUTING_NONE;
382 host->Send(new ViewMsg_PostMessageEvent(host->GetRoutingID(), params)); 387 host->Send(new ViewMsg_PostMessageEvent(host->GetRoutingID(), params));
383 } 388 }
384 389
385 } // namespace content 390 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698