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

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

Issue 2682643002: [ScreenOrientation] Hide ScreenOrientationProvider inside WebContentsImpl. (Closed)
Patch Set: Rebase only Created 3 years, 10 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 01a810115cad34d45f09f089116e46209c11b174..b17fddd9f6c534864787080be1fbaab78ee17c93 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -74,6 +74,7 @@
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/renderer_host/text_input_manager.h"
+#include "content/browser/screen_orientation/screen_orientation_provider.h"
#include "content/browser/site_instance_impl.h"
#include "content/browser/web_contents/web_contents_view_child_frame.h"
#include "content/browser/web_contents/web_contents_view_guest.h"
@@ -107,7 +108,6 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_widget_host_iterator.h"
#include "content/public/browser/resource_request_details.h"
-#include "content/public/browser/screen_orientation_provider.h"
#include "content/public/browser/security_style_explanations.h"
#include "content/public/browser/ssl_status.h"
#include "content/public/browser/storage_partition.h"
@@ -324,6 +324,11 @@ WebContents* WebContents::FromFrameTreeNodeId(int frame_tree_node_id) {
return FromRenderFrameHost(frame_tree_node->current_frame_host());
}
+void WebContents::SetScreenOrientationDelegate(
+ ScreenOrientationDelegate* delegate) {
+ ScreenOrientationProvider::SetDelegate(delegate);
+}
+
// WebContentsImpl::DestructionObserver ----------------------------------------
class WebContentsImpl::DestructionObserver : public WebContentsObserver {
@@ -929,9 +934,9 @@ WebContentsView* WebContentsImpl::GetView() const {
return view_.get();
}
-ScreenOrientationProvider* WebContentsImpl::GetScreenOrientationProvider()
- const {
- return screen_orientation_provider_.get();
+void WebContentsImpl::OnScreenOrientationChange() {
+ DCHECK(screen_orientation_provider_);
+ return screen_orientation_provider_->OnOrientationChange();
}
SkColor WebContentsImpl::GetThemeColor() const {
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698