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

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: Rebased 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 // s^{n+1} / s^{n} = 2100 / 2000 761 // s^{n+1} / s^{n} = 2100 / 2000
762 // s = 1.05 762 // s = 1.05
763 // s^b = 60000 763 // s^b = 60000
764 // b = ln(60000) / ln(1.05) ~= 225 764 // b = ln(60000) / ln(1.05) ~= 225
765 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", 765 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime",
766 base::Time::Now() - chrome::android::GetMainEntryPointTime(), 766 base::Time::Now() - chrome::android::GetMainEntryPointTime(),
767 base::TimeDelta::FromMilliseconds(1), 767 base::TimeDelta::FromMilliseconds(1),
768 base::TimeDelta::FromMinutes(1), 768 base::TimeDelta::FromMinutes(1),
769 225); 769 225);
770 } 770 }
OLDNEW
« no previous file with comments | « chrome/browser/android/content_view_util.cc ('k') | chrome/browser/prerender/external_prerender_handler_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698