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

Side by Side Diff: chrome/browser/android/tab_android.cc

Issue 831523005: Remove most native WebContents references from Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Kept same error checking behavior for aw_contents.cc Created 5 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/android/tab_android.h" 5 #include "chrome/browser/android/tab_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 Java_Tab_getNativeInfoBarContainer( 283 Java_Tab_getNativeInfoBarContainer(
284 env, 284 env,
285 weak_java_tab_.get(env).obj())); 285 weak_java_tab_.get(env).obj()));
286 InfoBarService* new_infobar_service = 286 InfoBarService* new_infobar_service =
287 new_contents ? InfoBarService::FromWebContents(new_contents) : NULL; 287 new_contents ? InfoBarService::FromWebContents(new_contents) : NULL;
288 infobar_container->ChangeInfoBarManager(new_infobar_service); 288 infobar_container->ChangeInfoBarManager(new_infobar_service);
289 289
290 Java_Tab_swapWebContents( 290 Java_Tab_swapWebContents(
291 env, 291 env,
292 weak_java_tab_.get(env).obj(), 292 weak_java_tab_.get(env).obj(),
293 reinterpret_cast<intptr_t>(new_contents), 293 new_contents->GetJavaWebContents().obj(),
294 did_start_load, 294 did_start_load,
295 did_finish_load); 295 did_finish_load);
296 } 296 }
297 297
298 void TabAndroid::DefaultSearchProviderChanged() { 298 void TabAndroid::DefaultSearchProviderChanged() {
299 // TODO(kmadhusu): Move this function definition to a common place and update 299 // TODO(kmadhusu): Move this function definition to a common place and update
300 // BrowserInstantController::DefaultSearchProviderChanged to use the same. 300 // BrowserInstantController::DefaultSearchProviderChanged to use the same.
301 if (!web_contents()) 301 if (!web_contents())
302 return; 302 return;
303 303
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 // s^{n+1} / s^{n} = 2100 / 2000 759 // s^{n+1} / s^{n} = 2100 / 2000
760 // s = 1.05 760 // s = 1.05
761 // s^b = 60000 761 // s^b = 60000
762 // b = ln(60000) / ln(1.05) ~= 225 762 // b = ln(60000) / ln(1.05) ~= 225
763 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", 763 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime",
764 base::Time::Now() - chrome::android::GetMainEntryPointTime(), 764 base::Time::Now() - chrome::android::GetMainEntryPointTime(),
765 base::TimeDelta::FromMilliseconds(1), 765 base::TimeDelta::FromMilliseconds(1),
766 base::TimeDelta::FromMinutes(1), 766 base::TimeDelta::FromMinutes(1),
767 225); 767 225);
768 } 768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698