 Chromium Code Reviews
 Chromium Code Reviews Issue 549603003:
  Create Mojo service for locking/unlocking screen orientation.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 549603003:
  Create Mojo service for locking/unlocking screen orientation.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 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 "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/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" | 
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 #include "content/browser/frame_host/interstitial_page_impl.h" | 25 #include "content/browser/frame_host/interstitial_page_impl.h" | 
| 26 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 26 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 
| 27 #include "content/browser/media/media_web_contents_observer.h" | 27 #include "content/browser/media/media_web_contents_observer.h" | 
| 28 #include "content/browser/renderer_host/compositor_impl_android.h" | 28 #include "content/browser/renderer_host/compositor_impl_android.h" | 
| 29 #include "content/browser/renderer_host/input/motion_event_android.h" | 29 #include "content/browser/renderer_host/input/motion_event_android.h" | 
| 30 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " | 30 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " | 
| 31 #include "content/browser/renderer_host/input/web_input_event_util.h" | 31 #include "content/browser/renderer_host/input/web_input_event_util.h" | 
| 32 #include "content/browser/renderer_host/render_view_host_impl.h" | 32 #include "content/browser/renderer_host/render_view_host_impl.h" | 
| 33 #include "content/browser/renderer_host/render_widget_host_impl.h" | 33 #include "content/browser/renderer_host/render_widget_host_impl.h" | 
| 34 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 34 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 
| 35 #include "content/browser/screen_orientation/screen_orientation_context.h" | |
| 35 #include "content/browser/transition_request_manager.h" | 36 #include "content/browser/transition_request_manager.h" | 
| 36 #include "content/browser/web_contents/web_contents_view_android.h" | 37 #include "content/browser/web_contents/web_contents_view_android.h" | 
| 37 #include "content/common/frame_messages.h" | 38 #include "content/common/frame_messages.h" | 
| 38 #include "content/common/input/web_input_event_traits.h" | 39 #include "content/common/input/web_input_event_traits.h" | 
| 39 #include "content/common/input_messages.h" | 40 #include "content/common/input_messages.h" | 
| 40 #include "content/common/view_messages.h" | 41 #include "content/common/view_messages.h" | 
| 41 #include "content/public/browser/browser_context.h" | 42 #include "content/public/browser/browser_context.h" | 
| 42 #include "content/public/browser/browser_thread.h" | 43 #include "content/public/browser/browser_thread.h" | 
| 43 #include "content/public/browser/favicon_status.h" | 44 #include "content/public/browser/favicon_status.h" | 
| 44 #include "content/public/browser/render_frame_host.h" | 45 #include "content/public/browser/render_frame_host.h" | 
| 45 #include "content/public/browser/screen_orientation_dispatcher_host.h" | |
| 46 #include "content/public/browser/ssl_host_state_delegate.h" | 46 #include "content/public/browser/ssl_host_state_delegate.h" | 
| 47 #include "content/public/browser/web_contents.h" | 47 #include "content/public/browser/web_contents.h" | 
| 48 #include "content/public/common/content_client.h" | 48 #include "content/public/common/content_client.h" | 
| 49 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" | 
| 50 #include "content/public/common/menu_item.h" | 50 #include "content/public/common/menu_item.h" | 
| 51 #include "content/public/common/page_transition_types.h" | 51 #include "content/public/common/page_transition_types.h" | 
| 52 #include "content/public/common/user_agent.h" | 52 #include "content/public/common/user_agent.h" | 
| 53 #include "jni/ContentViewCore_jni.h" | 53 #include "jni/ContentViewCore_jni.h" | 
| 54 #include "third_party/WebKit/public/web/WebInputEvent.h" | 54 #include "third_party/WebKit/public/web/WebInputEvent.h" | 
| 55 #include "ui/base/android/view_android.h" | 55 #include "ui/base/android/view_android.h" | 
| (...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1247 accessibility_state->accessibility_mode()); | 1247 accessibility_state->accessibility_mode()); | 
| 1248 } | 1248 } | 
| 1249 } | 1249 } | 
| 1250 } | 1250 } | 
| 1251 | 1251 | 
| 1252 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { | 1252 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { | 
| 1253 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1253 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 
| 1254 if (rwhv) | 1254 if (rwhv) | 
| 1255 rwhv->UpdateScreenInfo(GetViewAndroid()); | 1255 rwhv->UpdateScreenInfo(GetViewAndroid()); | 
| 1256 | 1256 | 
| 1257 static_cast<WebContentsImpl*>(web_contents())-> | 1257 static_cast<WebContentsImpl*>(web_contents()) | 
| 1258 screen_orientation_dispatcher_host()->OnOrientationChange(); | 1258 ->screen_orientation_context() | 
| 
qsr
2014/09/22 13:01:48
The -> should be on the previous line.
 | |
| 1259 ->OnScreenOrientationChange(); | |
| 1259 } | 1260 } | 
| 1260 | 1261 | 
| 1261 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, | 1262 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, | 
| 1262 jobject obj, | 1263 jobject obj, | 
| 1263 jint x, | 1264 jint x, | 
| 1264 jint y, | 1265 jint y, | 
| 1265 jint width, | 1266 jint width, | 
| 1266 jint height) { | 1267 jint height) { | 
| 1267 gfx::Rect rect( | 1268 gfx::Rect rect( | 
| 1268 static_cast<int>(x / dpi_scale()), | 1269 static_cast<int>(x / dpi_scale()), | 
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1339 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1340 reinterpret_cast<ui::WindowAndroid*>(window_android), | 
| 1340 retained_objects_set); | 1341 retained_objects_set); | 
| 1341 return reinterpret_cast<intptr_t>(view); | 1342 return reinterpret_cast<intptr_t>(view); | 
| 1342 } | 1343 } | 
| 1343 | 1344 | 
| 1344 bool RegisterContentViewCore(JNIEnv* env) { | 1345 bool RegisterContentViewCore(JNIEnv* env) { | 
| 1345 return RegisterNativesImpl(env); | 1346 return RegisterNativesImpl(env); | 
| 1346 } | 1347 } | 
| 1347 | 1348 | 
| 1348 } // namespace content | 1349 } // namespace content | 
| OLD | NEW |