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

Unified Diff: ios/chrome/today_extension/lock_screen_state.h

Issue 2586713002: Upstream code and resources for Chrome on iOS extensions. (Closed)
Patch Set: Created 4 years 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 | « ios/chrome/today_extension/interactive_label.mm ('k') | ios/chrome/today_extension/lock_screen_state.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/today_extension/lock_screen_state.h
diff --git a/ios/chrome/today_extension/lock_screen_state.h b/ios/chrome/today_extension/lock_screen_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..9db82cf97909b4f07ee04b50eb66ca897779a51f
--- /dev/null
+++ b/ios/chrome/today_extension/lock_screen_state.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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.
+
+#ifndef IOS_CHROME_TODAY_EXTENSION_LOCK_SCREEN_STATE_H_
+#define IOS_CHROME_TODAY_EXTENSION_LOCK_SCREEN_STATE_H_
+
+#import <Foundation/Foundation.h>
+
+@protocol LockScreenStateDelegate;
+
+// A shared object to track screen lock state. Object is statically allocated
+// to get notification even when widget is not displayed.
+@interface LockScreenState : NSObject
+
++ (instancetype)sharedInstance;
+
+// Whether or not the screen is currently locked.
+// The value can be temporary |NO| on lock screen if the widget is allocated
+// in the 10 seconds following the lock.
+@property(nonatomic, readonly) BOOL isScreenLocked;
+
+// Sets the delegate to receive future |lockScreenStateDidChange:|
+// notifications.
+- (void)setDelegate:(id<LockScreenStateDelegate>)delegate;
+
+@end
+
+@protocol LockScreenStateDelegate<NSObject>
+
+- (void)lockScreenStateDidChange:(LockScreenState*)lockScreenState;
+
+@end
+
+#endif // IOS_CHROME_TODAY_EXTENSION_LOCK_SCREEN_STATE_H_
« no previous file with comments | « ios/chrome/today_extension/interactive_label.mm ('k') | ios/chrome/today_extension/lock_screen_state.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698