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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 2558323002: Record user action of screen orientation change (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
17 #include "base/metrics/user_metrics.h"
17 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h" 20 #include "base/values.h"
20 #include "cc/layers/layer.h" 21 #include "cc/layers/layer.h"
21 #include "cc/layers/solid_color_layer.h" 22 #include "cc/layers/solid_color_layer.h"
22 #include "cc/output/begin_frame_args.h" 23 #include "cc/output/begin_frame_args.h"
23 #include "content/browser/accessibility/browser_accessibility_manager_android.h" 24 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
24 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 25 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
25 #include "content/browser/android/gesture_event_type.h" 26 #include "content/browser/android/gesture_event_type.h"
26 #include "content/browser/android/interstitial_page_delegate_android.h" 27 #include "content/browser/android/interstitial_page_delegate_android.h"
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 GetRenderWidgetHostViewAndroid()->Focus(); 893 GetRenderWidgetHostViewAndroid()->Focus();
893 else 894 else
894 GetRenderWidgetHostViewAndroid()->Blur(); 895 GetRenderWidgetHostViewAndroid()->Blur();
895 } 896 }
896 897
897 void ContentViewCoreImpl::SendOrientationChangeEvent( 898 void ContentViewCoreImpl::SendOrientationChangeEvent(
898 JNIEnv* env, 899 JNIEnv* env,
899 const JavaParamRef<jobject>& obj, 900 const JavaParamRef<jobject>& obj,
900 jint orientation) { 901 jint orientation) {
901 if (device_orientation_ != orientation) { 902 if (device_orientation_ != orientation) {
903 base::RecordAction(base::UserMetricsAction("ScreenOrientationChange"));
902 device_orientation_ = orientation; 904 device_orientation_ = orientation;
903 SendOrientationChangeEventInternal(); 905 SendOrientationChangeEventInternal();
904 } 906 }
905 } 907 }
906 908
907 jboolean ContentViewCoreImpl::OnTouchEvent( 909 jboolean ContentViewCoreImpl::OnTouchEvent(
908 JNIEnv* env, 910 JNIEnv* env,
909 const JavaParamRef<jobject>& obj, 911 const JavaParamRef<jobject>& obj,
910 const JavaParamRef<jobject>& motion_event, 912 const JavaParamRef<jobject>& motion_event,
911 jlong time_ms, 913 jlong time_ms,
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 return ScopedJavaLocalRef<jobject>(); 1625 return ScopedJavaLocalRef<jobject>();
1624 1626
1625 return view->GetJavaObject(); 1627 return view->GetJavaObject();
1626 } 1628 }
1627 1629
1628 bool RegisterContentViewCore(JNIEnv* env) { 1630 bool RegisterContentViewCore(JNIEnv* env) {
1629 return RegisterNativesImpl(env); 1631 return RegisterNativesImpl(env);
1630 } 1632 }
1631 1633
1632 } // namespace content 1634 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698