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

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

Issue 924833003: [Android WebView] Synthesize a fake page loading event on page source modification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed android_aosp & rebased Created 5 years, 10 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
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 jstring message) { 473 jstring message) {
474 DCHECK_GE(level, 0); 474 DCHECK_GE(level, 0);
475 DCHECK_LE(level, CONSOLE_MESSAGE_LEVEL_LAST); 475 DCHECK_LE(level, CONSOLE_MESSAGE_LEVEL_LAST);
476 476
477 web_contents_->GetMainFrame()->Send(new DevToolsAgentMsg_AddMessageToConsole( 477 web_contents_->GetMainFrame()->Send(new DevToolsAgentMsg_AddMessageToConsole(
478 web_contents_->GetMainFrame()->GetRoutingID(), 478 web_contents_->GetMainFrame()->GetRoutingID(),
479 static_cast<ConsoleMessageLevel>(level), 479 static_cast<ConsoleMessageLevel>(level),
480 ConvertJavaStringToUTF8(env, message))); 480 ConvertJavaStringToUTF8(env, message)));
481 } 481 }
482 482
483 jboolean WebContentsAndroid::HasPageScriptAccessedInitialDocument(
Ted C 2015/02/23 21:04:08 Exposing this is a layering violation of sorts. W
Charlie Reis 2015/02/23 21:28:04 Actually, why do we need to expose this? In deskt
mnaganov (inactive) 2015/02/23 22:17:55 This is to avoid generating premature / superfluou
mnaganov (inactive) 2015/02/24 11:28:42 I agree, this isn't good, but as I have noted in m
484 JNIEnv* env,
485 jobject jobj) {
486 return static_cast<content::WebContentsImpl*>(web_contents_)->
487 HasAccessedInitialDocument();
488 }
489
483 } // namespace content 490 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698