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

Unified Diff: chrome/browser/ui/cocoa/notifications/xpc_transaction_handler.h

Issue 2419213003: Ensure the xpc transaction is ended (Closed)
Patch Set: review Created 4 years, 2 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: chrome/browser/ui/cocoa/notifications/xpc_transaction_handler.h
diff --git a/chrome/browser/ui/cocoa/notifications/xpc_transaction_handler.h b/chrome/browser/ui/cocoa/notifications/xpc_transaction_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..4342f6970149fb791931d49e2030c3161b004237
--- /dev/null
+++ b/chrome/browser/ui/cocoa/notifications/xpc_transaction_handler.h
@@ -0,0 +1,20 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_XPC_TRANSACTION_HANDLER_H_
+#define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_XPC_TRANSACTION_HANDLER_H_
+
+#import <Foundation/Foundation.h>
+
+// Keeps track of whether a XPC transaction is opened.
+@interface XPCTransactionHandler : NSObject
+
+// Only open a new transaction if one is not already opened.
+- (void)openTransactionIfNeeded;
+
+// Close the transaction if no alerts are being displayed.
+- (void)closeTransactionIfNeeded;
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_XPC_TRANSACTION_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698