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

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

Issue 894003005: Revert "Load web contents after tab is created." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 void WebContentsAndroid::OpenURL(JNIEnv* env,
484 jobject obj,
485 jstring url,
486 jboolean user_gesture,
487 jboolean is_renderer_initiated) {
488 GURL gurl(base::android::ConvertJavaStringToUTF8(env, url));
489 OpenURLParams open_params(gurl,
490 Referrer(),
491 CURRENT_TAB,
492 ui::PAGE_TRANSITION_LINK,
493 is_renderer_initiated);
494 open_params.user_gesture = user_gesture;
495 web_contents_->OpenURL(open_params);
496 }
497
498 } // namespace content 483 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698