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

Unified Diff: content/browser/browser_main_loop.cc

Issue 546453004: Centralize ScreenOrientationProvider logic, add platform delegates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_orientation_public_impl_split
Patch Set: Remove Factory Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index d9bfded9f2230b6c0c0b124edf5bf0d3089fde8d..e9c13915ceb8d736d8f4b312b5730b558b1ca37c 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -78,6 +78,8 @@
#include "content/browser/android/browser_startup_controller.h"
#include "content/browser/android/surface_texture_peer_browser_impl.h"
#include "content/browser/android/tracing_controller_android.h"
+#include "content/browser/screen_orientation/screen_orientation_delegate_android.h"
+#include "content/public/browser/screen_orientation_provider.h"
#include "ui/gl/gl_surface.h"
#endif
@@ -540,6 +542,14 @@ void BrowserMainLoop::MainMessageLoopStart() {
TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer");
SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl());
}
+
+ {
+ TRACE_EVENT0("startup",
+ "BrowserMainLoop::Subsystem:ScreenOrientationProvider");
+ screen_orientation_delegate_.reset(
+ new ScreenOrientationDelegateAndroid());
+ ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get());
+ }
#endif
if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) {

Powered by Google App Engine
This is Rietveld 408576698