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

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

Issue 712183002: Navigation transitions (web to native app): Hide/Show transition elements (Chrome side) (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
« 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 void WebContentsAndroid::BeginExitTransition(JNIEnv* env, 178 void WebContentsAndroid::BeginExitTransition(JNIEnv* env,
179 jobject jobj, 179 jobject jobj,
180 jstring css_selector) { 180 jstring css_selector) {
181 web_contents_->GetMainFrame()->Send(new FrameMsg_BeginExitTransition( 181 web_contents_->GetMainFrame()->Send(new FrameMsg_BeginExitTransition(
182 web_contents_->GetMainFrame()->GetRoutingID(), 182 web_contents_->GetMainFrame()->GetRoutingID(),
183 ConvertJavaStringToUTF8(env, css_selector))); 183 ConvertJavaStringToUTF8(env, css_selector)));
184 } 184 }
185 185
186 void WebContentsAndroid::HideTransitionElements(JNIEnv* env,
187 jobject jobj,
188 jstring css_selector) {
189 web_contents_->GetMainFrame()->Send(
190 new FrameMsg_HideTransitionElements(
191 web_contents_->GetMainFrame()->GetRoutingID(),
192 ConvertJavaStringToUTF8(env, css_selector)));
193 }
194
195 void WebContentsAndroid::ShowTransitionElements(JNIEnv* env,
196 jobject jobj,
197 jstring css_selector) {
198 web_contents_->GetMainFrame()->Send(
199 new FrameMsg_ShowTransitionElements(
200 web_contents_->GetMainFrame()->GetRoutingID(),
201 ConvertJavaStringToUTF8(env, css_selector)));
202 }
203
204
186 void WebContentsAndroid::ClearNavigationTransitionData(JNIEnv* env, 205 void WebContentsAndroid::ClearNavigationTransitionData(JNIEnv* env,
187 jobject jobj) { 206 jobject jobj) {
188 static_cast<WebContentsImpl*>(web_contents_)->ClearNavigationTransitionData(); 207 static_cast<WebContentsImpl*>(web_contents_)->ClearNavigationTransitionData();
189 } 208 }
190 209
191 void WebContentsAndroid::OnHide(JNIEnv* env, jobject obj) { 210 void WebContentsAndroid::OnHide(JNIEnv* env, jobject obj) {
192 web_contents_->WasHidden(); 211 web_contents_->WasHidden();
193 } 212 }
194 213
195 void WebContentsAndroid::OnShow(JNIEnv* env, jobject obj) { 214 void WebContentsAndroid::OnShow(JNIEnv* env, jobject obj) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 ViewMsg_PostMessage_Params params; 409 ViewMsg_PostMessage_Params params;
391 params.source_origin = ConvertJavaStringToUTF16(env, source_origin); 410 params.source_origin = ConvertJavaStringToUTF16(env, source_origin);
392 params.target_origin = ConvertJavaStringToUTF16(env, target_origin); 411 params.target_origin = ConvertJavaStringToUTF16(env, target_origin);
393 params.data = ConvertJavaStringToUTF16(env, message); 412 params.data = ConvertJavaStringToUTF16(env, message);
394 params.is_data_raw_string = true; 413 params.is_data_raw_string = true;
395 params.source_routing_id = MSG_ROUTING_NONE; 414 params.source_routing_id = MSG_ROUTING_NONE;
396 host->Send(new ViewMsg_PostMessageEvent(host->GetRoutingID(), params)); 415 host->Send(new ViewMsg_PostMessageEvent(host->GetRoutingID(), params));
397 } 416 }
398 417
399 } // namespace content 418 } // 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