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

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

Issue 549603003: Create Mojo service for locking/unlocking screen orientation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix 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/screen_orientation/screen_orientation_context.cc
diff --git a/content/browser/screen_orientation/screen_orientation_context.cc b/content/browser/screen_orientation/screen_orientation_context.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a41c7f0e7962a4151b3ea0703fb4ec6f81a30641
--- /dev/null
+++ b/content/browser/screen_orientation/screen_orientation_context.cc
@@ -0,0 +1,31 @@
+// Copyright 2014 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_context.h"
+
+namespace content {
+
+ScreenOrientationContext::ScreenOrientationContext() {
+}
+
+ScreenOrientationContext::~ScreenOrientationContext() {
+}
+
+void ScreenOrientationContext::AddObserver(Observer* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void ScreenOrientationContext::RemoveObserver(Observer* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+void ScreenOrientationContext::OnScreenOrientationChange() {
+ FOR_EACH_OBSERVER(Observer, observer_list_, OnScreenOrientationChange());
+}
+
+void ScreenOrientationContext::OnNewLockRequest() {
+ FOR_EACH_OBSERVER(Observer, observer_list_, OnNewLockRequest());
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698