#include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h"
#endif
+#if BUILDFLAG(IS_EFL)
+#include "content/browser/screen_orientation/screen_orientation_delegate_efl.h"
+#endif
+
// One of the linux specific headers defines this as a macro.
#ifdef DestroyAll
#undef DestroyAll
base::trace_event::CPUFreqMonitor::GetInstance());
#endif
+#if BUILDFLAG(IS_EFL)
+ if (!parsed_command_line_.HasSwitch(
+ switches::kDisableScreenOrientationLock)) {
+ TRACE_EVENT0("startup",
+ "BrowserMainLoop::Subsystem:ScreenOrientationProvider");
+ screen_orientation_delegate_ =
+ std::make_unique<ScreenOrientationDelegateEfl>();
+ }
+#endif
+
if (UsingInProcessGpu()) {
// Make sure to limits for skia font cache are applied for in process
// gpu setup (crbug.com/1183230).
class Watcher;
} // namespace responsiveness
-#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_EFL)
class ScreenOrientationDelegate;
#endif
std::unique_ptr<ScreenlockMonitor> screenlock_monitor_;
// Per-process listener for online state changes.
std::unique_ptr<BrowserOnlineStateObserver> online_state_observer_;
-#if BUILDFLAG(IS_ANDROID)
- // Android implementation of ScreenOrientationDelegate
+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_EFL)
+ // Android/EFL implementation of ScreenOrientationDelegate
std::unique_ptr<ScreenOrientationDelegate> screen_orientation_delegate_;
#endif
const char kDisableOoprDebugCrashDump[] = "disable-oopr-debug-crash-dump";
#endif
+#if BUILDFLAG(IS_EFL)
+// Disable the locking feature of the screen orientation API.
+const char kDisableScreenOrientationLock[] = "disable-screen-orientation-lock";
+#endif
+
// Enable the aggressive flushing of DOM Storage to minimize data loss.
const char kEnableAggressiveDOMStorageFlushing[] =
"enable-aggressive-domstorage-flushing";
CONTENT_EXPORT extern const char kRendererWaitForJavaDebugger[];
#endif
+#if BUILDFLAG(IS_EFL)
+CONTENT_EXPORT extern const char kDisableScreenOrientationLock[];
+#endif
+
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
#include "content/browser/screen_orientation/screen_orientation_delegate_efl.h"
-#include "chromium_impl/content/browser/web_contents/web_contents_impl_efl.h"
+#include "content/browser/web_contents/web_contents_impl_efl.h"
+#include "content/browser/screen_orientation/screen_orientation_provider.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "ewk/efl_integration/web_contents_efl_delegate_ewk.h"
namespace content {
-ScreenOrientationDelegate* CreateScreenOrientationDelegateEfl() {
- return new ScreenOrientationDelegateEfl();
-}
-
ScreenOrientationDelegateEfl::ScreenOrientationDelegateEfl() {
+ ScreenOrientationProvider::SetDelegate(this);
}
ScreenOrientationDelegateEfl::~ScreenOrientationDelegateEfl() {