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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 549603003: Create Mojo service for locking/unlocking screen orientation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 3 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7ff5d88b6bc37deb890dabdbe4d1fa26604a8f85..58ed6e2b19f3f731fbf0373e83e65c8944f53ba4 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -48,7 +48,6 @@
#include "content/browser/renderer_host/render_view_host_impl.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_dispatcher_host_impl.h"
#include "content/browser/site_instance_impl.h"
#include "content/browser/web_contents/web_contents_view_guest.h"
#include "content/browser/webui/generic_handler.h"
@@ -77,7 +76,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_widget_host_iterator.h"
#include "content/public/browser/resource_request_details.h"
-#include "content/public/browser/screen_orientation_dispatcher_host.h"
+#include "content/public/browser/screen_orientation_provider.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_delegate.h"
@@ -333,9 +332,8 @@ WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() {
// WebContentsImpl -------------------------------------------------------------
-WebContentsImpl::WebContentsImpl(
- BrowserContext* browser_context,
- WebContentsImpl* opener)
+WebContentsImpl::WebContentsImpl(BrowserContext* browser_context,
+ WebContentsImpl* opener)
: delegate_(NULL),
controller_(this, browser_context),
render_view_host_delegate_view_(NULL),
@@ -345,7 +343,10 @@ WebContentsImpl::WebContentsImpl(
accessible_parent_(NULL),
#endif
frame_tree_(new NavigatorImpl(&controller_, this),
- this, this, this, this),
+ this,
+ this,
+ this,
+ this),
is_loading_(false),
is_load_to_different_document_(false),
crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING),
@@ -1203,9 +1204,6 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this));
midi_dispatcher_host_.reset(new MidiDispatcherHost(this));
- screen_orientation_dispatcher_host_.reset(
- new ScreenOrientationDispatcherHostImpl(this));
-
#if defined(OS_ANDROID)
date_time_chooser_.reset(new DateTimeChooserAndroid());
#endif
@@ -3473,6 +3471,12 @@ gfx::NativeViewAccessible WebContentsImpl::GetParentNativeViewAccessible() {
}
#endif
+ScreenOrientationProvider* WebContentsImpl::GetScreenOrientationProvider() {
+ if (!screen_orientation_provider_)
+ screen_orientation_provider_.reset(ScreenOrientationProvider::Create(this));
+ return screen_orientation_provider_.get();
+}
+
RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() {
return render_view_host_delegate_view_;
}

Powered by Google App Engine
This is Rietveld 408576698