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

Unified Diff: content/browser/screen_orientation/screen_orientation.cc

Issue 2685513002: [For trybots test] [ScreenOrientation] Hide ScreenOrientationProvider inside WebContentsImpl. (Closed)
Patch Set: Fix android bots 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
Index: content/browser/screen_orientation/screen_orientation.cc
diff --git a/content/browser/screen_orientation/screen_orientation.cc b/content/browser/screen_orientation/screen_orientation.cc
deleted file mode 100644
index 6296fbc2c3876af646b164ed19ff25e89c0f2819..0000000000000000000000000000000000000000
--- a/content/browser/screen_orientation/screen_orientation.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/screen_orientation/screen_orientation.h"
-
-#include "content/public/browser/navigation_handle.h"
-#include "content/public/browser/screen_orientation_provider.h"
-#include "content/public/browser/web_contents.h"
-
-namespace content {
-
-ScreenOrientation::ScreenOrientation(WebContents* web_contents)
- : WebContentsObserver(web_contents),
- bindings_(web_contents, this),
- weak_factory_(this) {
- provider_.reset(new ScreenOrientationProvider(web_contents));
-}
-
-ScreenOrientation::~ScreenOrientation() = default;
-
-void ScreenOrientation::LockOrientation(
- blink::WebScreenOrientationLockType orientation,
- const LockOrientationCallback& callback) {
- provider_->LockOrientation(orientation, callback);
-}
-
-void ScreenOrientation::UnlockOrientation() {
- provider_->UnlockOrientation();
-}
-
-void ScreenOrientation::DidFinishNavigation(
- NavigationHandle* navigation_handle) {
- if (!navigation_handle->IsInMainFrame() ||
- !navigation_handle->HasCommitted() ||
- navigation_handle->IsSamePage()) {
- return;
- }
- provider_->UnlockOrientation();
-}
-
-ScreenOrientationProvider* ScreenOrientation::GetScreenOrientationProvider() {
- return provider_.get();
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698