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

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

Issue 970883002: [Android WebView] Synthesize a fake page loading event on page source modification (Re-land) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed findbugs warning Created 5 years, 9 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
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/content.gyp » ('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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (!rwhva) 163 if (!rwhva)
164 return SK_ColorWHITE; 164 return SK_ColorWHITE;
165 return rwhva->GetCachedBackgroundColor(); 165 return rwhva->GetCachedBackgroundColor();
166 } 166 }
167 167
168 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetURL(JNIEnv* env, 168 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetURL(JNIEnv* env,
169 jobject obj) const { 169 jobject obj) const {
170 return ConvertUTF8ToJavaString(env, web_contents_->GetURL().spec()); 170 return ConvertUTF8ToJavaString(env, web_contents_->GetURL().spec());
171 } 171 }
172 172
173 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetLastCommittedURL(
174 JNIEnv* env,
175 jobject) const {
176 return ConvertUTF8ToJavaString(env,
177 web_contents_->GetLastCommittedURL().spec());
178 }
179
180
173 jboolean WebContentsAndroid::IsIncognito(JNIEnv* env, jobject obj) { 181 jboolean WebContentsAndroid::IsIncognito(JNIEnv* env, jobject obj) {
174 return web_contents_->GetBrowserContext()->IsOffTheRecord(); 182 return web_contents_->GetBrowserContext()->IsOffTheRecord();
175 } 183 }
176 184
177 void WebContentsAndroid::ResumeResponseDeferredAtStart(JNIEnv* env, 185 void WebContentsAndroid::ResumeResponseDeferredAtStart(JNIEnv* env,
178 jobject obj) { 186 jobject obj) {
179 static_cast<WebContentsImpl*>(web_contents_)->ResumeResponseDeferredAtStart(); 187 static_cast<WebContentsImpl*>(web_contents_)->ResumeResponseDeferredAtStart();
180 } 188 }
181 189
182 void WebContentsAndroid::SetHasPendingNavigationTransitionForTesting( 190 void WebContentsAndroid::SetHasPendingNavigationTransitionForTesting(
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 jstring message) { 481 jstring message) {
474 DCHECK_GE(level, 0); 482 DCHECK_GE(level, 0);
475 DCHECK_LE(level, CONSOLE_MESSAGE_LEVEL_LAST); 483 DCHECK_LE(level, CONSOLE_MESSAGE_LEVEL_LAST);
476 484
477 web_contents_->GetMainFrame()->Send(new DevToolsAgentMsg_AddMessageToConsole( 485 web_contents_->GetMainFrame()->Send(new DevToolsAgentMsg_AddMessageToConsole(
478 web_contents_->GetMainFrame()->GetRoutingID(), 486 web_contents_->GetMainFrame()->GetRoutingID(),
479 static_cast<ConsoleMessageLevel>(level), 487 static_cast<ConsoleMessageLevel>(level),
480 ConvertJavaStringToUTF8(env, message))); 488 ConvertJavaStringToUTF8(env, message)));
481 } 489 }
482 490
491 jboolean WebContentsAndroid::HasAccessedInitialDocument(
492 JNIEnv* env,
493 jobject jobj) {
494 return static_cast<content::WebContentsImpl*>(web_contents_)->
495 HasAccessedInitialDocument();
496 }
497
483 } // namespace content 498 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/content.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698