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

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

Issue 2391883006: Mojo-ify implementation of screen orientation locking/unlocking. (Closed)
Patch Set: Moved enum mojo definition to content/common due to dependency issue Created 4 years, 2 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 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"
(...skipping 24 matching lines...) Expand all
35 #include "content/browser/renderer_host/render_widget_host_view_android.h" 35 #include "content/browser/renderer_host/render_widget_host_view_android.h"
36 #include "content/browser/web_contents/web_contents_view_android.h" 36 #include "content/browser/web_contents/web_contents_view_android.h"
37 #include "content/common/frame_messages.h" 37 #include "content/common/frame_messages.h"
38 #include "content/common/input_messages.h" 38 #include "content/common/input_messages.h"
39 #include "content/common/view_messages.h" 39 #include "content/common/view_messages.h"
40 #include "content/public/browser/android/compositor.h" 40 #include "content/public/browser/android/compositor.h"
41 #include "content/public/browser/browser_context.h" 41 #include "content/public/browser/browser_context.h"
42 #include "content/public/browser/browser_thread.h" 42 #include "content/public/browser/browser_thread.h"
43 #include "content/public/browser/favicon_status.h" 43 #include "content/public/browser/favicon_status.h"
44 #include "content/public/browser/render_frame_host.h" 44 #include "content/public/browser/render_frame_host.h"
45 #include "content/public/browser/screen_orientation_dispatcher_host.h" 45 #include "content/public/browser/screen_orientation_provider.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/user_agent.h" 51 #include "content/public/common/user_agent.h"
52 #include "device/geolocation/geolocation_service_context.h" 52 #include "device/geolocation/geolocation_service_context.h"
53 #include "jni/ContentViewCore_jni.h" 53 #include "jni/ContentViewCore_jni.h"
54 #include "jni/DragEvent_jni.h" 54 #include "jni/DragEvent_jni.h"
55 #include "third_party/WebKit/public/web/WebInputEvent.h" 55 #include "third_party/WebKit/public/web/WebInputEvent.h"
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 accessibility_state->accessibility_mode()); 1364 accessibility_state->accessibility_mode());
1365 } 1365 }
1366 } 1366 }
1367 } 1367 }
1368 1368
1369 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { 1369 void ContentViewCoreImpl::SendOrientationChangeEventInternal() {
1370 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); 1370 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid();
1371 if (rwhv) 1371 if (rwhv)
1372 rwhv->UpdateScreenInfo(&view_); 1372 rwhv->UpdateScreenInfo(&view_);
1373 1373
1374 static_cast<WebContentsImpl*>(web_contents())-> 1374 static_cast<WebContentsImpl*>(web_contents())
1375 screen_orientation_dispatcher_host()->OnOrientationChange(); 1375 ->GetScreenOrientationProvider()
1376 ->OnOrientationChange();
1376 } 1377 }
1377 1378
1378 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, 1379 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env,
1379 const JavaParamRef<jobject>& obj, 1380 const JavaParamRef<jobject>& obj,
1380 jint x, 1381 jint x,
1381 jint y, 1382 jint y,
1382 jint width, 1383 jint width,
1383 jint height) { 1384 jint height) {
1384 gfx::Rect rect( 1385 gfx::Rect rect(
1385 static_cast<int>(x / dpi_scale()), 1386 static_cast<int>(x / dpi_scale()),
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 return ScopedJavaLocalRef<jobject>(); 1578 return ScopedJavaLocalRef<jobject>();
1578 1579
1579 return view->GetJavaObject(); 1580 return view->GetJavaObject();
1580 } 1581 }
1581 1582
1582 bool RegisterContentViewCore(JNIEnv* env) { 1583 bool RegisterContentViewCore(JNIEnv* env) {
1583 return RegisterNativesImpl(env); 1584 return RegisterNativesImpl(env);
1584 } 1585 }
1585 1586
1586 } // namespace content 1587 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698