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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 745 |
746 if (sender->ShowingInterstitialPage()) { | 746 if (sender->ShowingInterstitialPage()) { |
747 content::RenderViewHost* interstitial_view_host = | 747 content::RenderViewHost* interstitial_view_host = |
748 sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost(); | 748 sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost(); |
749 interstitial_view_host->Send(new ChromeViewMsg_UpdateTopControlsState( | 749 interstitial_view_host->Send(new ChromeViewMsg_UpdateTopControlsState( |
750 interstitial_view_host->GetRoutingID(), constraints_state, | 750 interstitial_view_host->GetRoutingID(), constraints_state, |
751 current_state, animate)); | 751 current_state, animate)); |
752 } | 752 } |
753 } | 753 } |
754 | 754 |
| 755 void TabAndroid::ShowOriginalImage(JNIEnv* env, jobject obj) { |
| 756 content::RenderFrameHost* render_frame_host = web_contents()->GetMainFrame(); |
| 757 render_frame_host->Send(new ChromeViewMsg_RequestReloadImageForContextNode( |
| 758 render_frame_host->GetRoutingID())); |
| 759 } |
| 760 |
755 void TabAndroid::SearchByImageInNewTabAsync(JNIEnv* env, jobject obj) { | 761 void TabAndroid::SearchByImageInNewTabAsync(JNIEnv* env, jobject obj) { |
756 content::RenderFrameHost* render_frame_host = | 762 content::RenderFrameHost* render_frame_host = |
757 web_contents()->GetMainFrame(); | 763 web_contents()->GetMainFrame(); |
758 render_frame_host->Send( | 764 render_frame_host->Send( |
759 new ChromeViewMsg_RequestThumbnailForContextNode( | 765 new ChromeViewMsg_RequestThumbnailForContextNode( |
760 render_frame_host->GetRoutingID(), | 766 render_frame_host->GetRoutingID(), |
761 kImageSearchThumbnailMinSize, | 767 kImageSearchThumbnailMinSize, |
762 gfx::Size(kImageSearchThumbnailMaxWidth, | 768 gfx::Size(kImageSearchThumbnailMaxWidth, |
763 kImageSearchThumbnailMaxHeight))); | 769 kImageSearchThumbnailMaxHeight))); |
764 } | 770 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 // s^{n+1} / s^{n} = 2100 / 2000 | 886 // s^{n+1} / s^{n} = 2100 / 2000 |
881 // s = 1.05 | 887 // s = 1.05 |
882 // s^b = 60000 | 888 // s^b = 60000 |
883 // b = ln(60000) / ln(1.05) ~= 225 | 889 // b = ln(60000) / ln(1.05) ~= 225 |
884 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", | 890 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", |
885 base::Time::Now() - chrome::android::GetMainEntryPointTime(), | 891 base::Time::Now() - chrome::android::GetMainEntryPointTime(), |
886 base::TimeDelta::FromMilliseconds(1), | 892 base::TimeDelta::FromMilliseconds(1), |
887 base::TimeDelta::FromMinutes(1), | 893 base::TimeDelta::FromMinutes(1), |
888 225); | 894 225); |
889 } | 895 } |
OLD | NEW |