[EWK_REFACTOR] Get orientation from native window, not ewebview
authoryh106.jung <yh106.jung@samsung.com>
Wed, 3 Jun 2015 07:29:41 +0000 (16:29 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Get orientation from native window in order to remove dependency on ewebview.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=12028
Reviewed by: Antonio Gomes, Hyunhak Kim, SeungSeop Park, arno renevier

Change-Id: Ifa04a26e562dfd563d59be9a1e9e1478bb5832c0
Signed-off-by: yh106.jung <yh106.jung@samsung.com>
tizen_src/chromium_impl/media/video/capture/tizen/video_capture_device_tizen.cc

index 8590b17..495e04f 100644 (file)
@@ -12,9 +12,9 @@
 #endif
 
 #include "base/bind.h"
-#if defined(EWK_REFACTOR)
-// TODO: remove this dependency.
-#include "eweb_view.h"
+#if defined(OS_TIZEN_MOBILE)
+#include "ui/gfx/display.h"
+#include "ui/gfx/screen.h"
 #endif
 
 #if defined(WEBRTC_DEBUG_DUMPFILE)
@@ -238,8 +238,9 @@ void VideoCaptureDeviceTizen::OnCameraCaptured(camera_preview_data_s* frame,
   DVLOG(3)  << " width:" << frame->width
             << " height:" << frame->height;
 
-#if defined(OS_TIZEN_MOBILE) && defined(EWK_REFACTOR)
-  int orientation = EWebView::GetOrientation();
+#if defined(OS_TIZEN_MOBILE)
+  const gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
+  int orientation = display.RotationAsDegree();
 #else
   int orientation = 0;
 #endif