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

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

Issue 775843004: Navigation transitions (web to native app): Revert exit transition (Chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void WebContentsAndroid::BeginExitTransition(JNIEnv* env, 179 void WebContentsAndroid::BeginExitTransition(JNIEnv* env,
180 jobject jobj, 180 jobject jobj,
181 jstring css_selector, 181 jstring css_selector,
182 jboolean exit_to_native_app) { 182 jboolean exit_to_native_app) {
183 web_contents_->GetMainFrame()->Send(new FrameMsg_BeginExitTransition( 183 web_contents_->GetMainFrame()->Send(new FrameMsg_BeginExitTransition(
184 web_contents_->GetMainFrame()->GetRoutingID(), 184 web_contents_->GetMainFrame()->GetRoutingID(),
185 ConvertJavaStringToUTF8(env, css_selector), 185 ConvertJavaStringToUTF8(env, css_selector),
186 exit_to_native_app)); 186 exit_to_native_app));
187 } 187 }
188 188
189 void WebContentsAndroid::RevertExitTransition(JNIEnv* env,
190 jobject jobj) {
191 web_contents_->GetMainFrame()->Send(new FrameMsg_RevertExitTransition(
192 web_contents_->GetMainFrame()->GetRoutingID()));
193 }
194
189 void WebContentsAndroid::HideTransitionElements(JNIEnv* env, 195 void WebContentsAndroid::HideTransitionElements(JNIEnv* env,
190 jobject jobj, 196 jobject jobj,
191 jstring css_selector) { 197 jstring css_selector) {
192 web_contents_->GetMainFrame()->Send( 198 web_contents_->GetMainFrame()->Send(
193 new FrameMsg_HideTransitionElements( 199 new FrameMsg_HideTransitionElements(
194 web_contents_->GetMainFrame()->GetRoutingID(), 200 web_contents_->GetMainFrame()->GetRoutingID(),
195 ConvertJavaStringToUTF8(env, css_selector))); 201 ConvertJavaStringToUTF8(env, css_selector)));
196 } 202 }
197 203
198 void WebContentsAndroid::ShowTransitionElements(JNIEnv* env, 204 void WebContentsAndroid::ShowTransitionElements(JNIEnv* env,
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 ScopedJavaGlobalRef<jobject> j_callback; 444 ScopedJavaGlobalRef<jobject> j_callback;
439 j_callback.Reset(env, callback); 445 j_callback.Reset(env, callback);
440 content::RenderFrameHost::JavaScriptResultCallback js_callback = 446 content::RenderFrameHost::JavaScriptResultCallback js_callback =
441 base::Bind(&JavaScriptResultCallback, j_callback); 447 base::Bind(&JavaScriptResultCallback, j_callback);
442 448
443 web_contents_->GetMainFrame()->ExecuteJavaScript( 449 web_contents_->GetMainFrame()->ExecuteJavaScript(
444 ConvertJavaStringToUTF16(env, script), js_callback); 450 ConvertJavaStringToUTF16(env, script), js_callback);
445 } 451 }
446 452
447 } // namespace content 453 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698