OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |