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

Unified Diff: content/browser/frame_host/render_frame_host_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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index ac12b2649be4ee7be55a128da4cba7668c3946e4..53dacd1903f48c02a0a0ee2a26a08e461211a0c5 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -52,6 +52,7 @@
#include "content/browser/renderer_host/render_widget_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/screen_orientation/screen_orientation_service_impl.h"
#include "content/browser/shared_worker/shared_worker_service_impl.h"
#include "content/browser/websockets/websocket_manager.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
@@ -2247,6 +2248,14 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
}
#endif
+ ScreenOrientationProvider* screen_orientation_provider =
+ delegate_ ? delegate_->GetScreenOrientationProvider() : nullptr;
+ if (screen_orientation_provider) {
+ GetInterfaceRegistry()->AddInterface(
+ base::Bind(&ScreenOrientationServiceImpl::Create,
+ base::Unretained(screen_orientation_provider)));
+ }
+
GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
GetInterfaceRegistry(), this);
}

Powered by Google App Engine
This is Rietveld 408576698