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

Unified Diff: content/public/browser/screen_orientation_provider.h

Issue 2630323002: [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. (Closed)
Patch Set: ScreenOrientation does not maintain pending lock request Created 3 years, 11 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/public/browser/screen_orientation_provider.h
diff --git a/content/public/browser/screen_orientation_provider.h b/content/public/browser/screen_orientation_provider.h
index 2ec21bcac33022bb6db001e992e94328a3be3652..1ee9d828ea45ca7394a795ef7ae79de31af7ad0e 100644
--- a/content/public/browser/screen_orientation_provider.h
+++ b/content/public/browser/screen_orientation_provider.h
@@ -5,10 +5,9 @@
#ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
#define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
-#include <memory>
-
#include "base/callback.h"
#include "base/macros.h"
+#include "base/optional.h"
#include "content/common/content_export.h"
#include "content/public/browser/web_contents_observer.h"
#include "device/screen_orientation/public/interfaces/screen_orientation_lock_types.mojom.h"
@@ -72,10 +71,9 @@ class CONTENT_EXPORT ScreenOrientationProvider : public WebContentsObserver {
// Locks that require orientation changes are not completed until
// OnOrientationChange.
-
base::Optional<blink::WebScreenOrientationLockType> pending_lock_orientation_;
- LockOrientationCallback on_result_callback_;
+ LockOrientationCallback pending_callback_;
DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
};

Powered by Google App Engine
This is Rietveld 408576698