| OLD | NEW |
| 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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 735 |
| 736 if (sender->ShowingInterstitialPage()) { | 736 if (sender->ShowingInterstitialPage()) { |
| 737 content::RenderViewHost* interstitial_view_host = | 737 content::RenderViewHost* interstitial_view_host = |
| 738 sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost(); | 738 sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost(); |
| 739 interstitial_view_host->Send(new ChromeViewMsg_UpdateTopControlsState( | 739 interstitial_view_host->Send(new ChromeViewMsg_UpdateTopControlsState( |
| 740 interstitial_view_host->GetRoutingID(), constraints_state, | 740 interstitial_view_host->GetRoutingID(), constraints_state, |
| 741 current_state, animate)); | 741 current_state, animate)); |
| 742 } | 742 } |
| 743 } | 743 } |
| 744 | 744 |
| 745 void TabAndroid::ReloadOriginalImage(JNIEnv* env, jobject obj) { |
| 746 content::RenderFrameHost* render_frame_host = web_contents()->GetMainFrame(); |
| 747 render_frame_host->Send(new ChromeViewMsg_RequestReloadImageForContextNode( |
| 748 render_frame_host->GetRoutingID())); |
| 749 } |
| 750 |
| 745 void TabAndroid::SearchByImageInNewTabAsync(JNIEnv* env, jobject obj) { | 751 void TabAndroid::SearchByImageInNewTabAsync(JNIEnv* env, jobject obj) { |
| 746 content::RenderFrameHost* render_frame_host = | 752 content::RenderFrameHost* render_frame_host = |
| 747 web_contents()->GetMainFrame(); | 753 web_contents()->GetMainFrame(); |
| 748 render_frame_host->Send( | 754 render_frame_host->Send( |
| 749 new ChromeViewMsg_RequestThumbnailForContextNode( | 755 new ChromeViewMsg_RequestThumbnailForContextNode( |
| 750 render_frame_host->GetRoutingID(), | 756 render_frame_host->GetRoutingID(), |
| 751 kImageSearchThumbnailMinSize, | 757 kImageSearchThumbnailMinSize, |
| 752 gfx::Size(kImageSearchThumbnailMaxWidth, | 758 gfx::Size(kImageSearchThumbnailMaxWidth, |
| 753 kImageSearchThumbnailMaxHeight))); | 759 kImageSearchThumbnailMaxHeight))); |
| 754 } | 760 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 // s^{n+1} / s^{n} = 2100 / 2000 | 876 // s^{n+1} / s^{n} = 2100 / 2000 |
| 871 // s = 1.05 | 877 // s = 1.05 |
| 872 // s^b = 60000 | 878 // s^b = 60000 |
| 873 // b = ln(60000) / ln(1.05) ~= 225 | 879 // b = ln(60000) / ln(1.05) ~= 225 |
| 874 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", | 880 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", |
| 875 base::Time::Now() - chrome::android::GetMainEntryPointTime(), | 881 base::Time::Now() - chrome::android::GetMainEntryPointTime(), |
| 876 base::TimeDelta::FromMilliseconds(1), | 882 base::TimeDelta::FromMilliseconds(1), |
| 877 base::TimeDelta::FromMinutes(1), | 883 base::TimeDelta::FromMinutes(1), |
| 878 225); | 884 225); |
| 879 } | 885 } |
| OLD | NEW |