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

Unified Diff: ios/chrome/browser/ui/bookmarks/undo_manager_bridge_observer.h

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (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
Index: ios/chrome/browser/ui/bookmarks/undo_manager_bridge_observer.h
diff --git a/ios/chrome/browser/ui/bookmarks/undo_manager_bridge_observer.h b/ios/chrome/browser/ui/bookmarks/undo_manager_bridge_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7eb76d9af7bc1c4cce27b796c19929fc6f6d895
--- /dev/null
+++ b/ios/chrome/browser/ui/bookmarks/undo_manager_bridge_observer.h
@@ -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.
+
+#ifndef IOS_CHROME_BROWSER_UI_BOOKMARKS_UNDO_MANAGER_BRIDGE_OBSERVER_H_
+#define IOS_CHROME_BROWSER_UI_BOOKMARKS_UNDO_MANAGER_BRIDGE_OBSERVER_H_
+
+#include "base/compiler_specific.h"
+#include "components/undo/undo_manager_observer.h"
+
+// The ObjC translations of the C++ observer callbacks are defined here.
+@protocol UndoManagerBridgeObserver
+// Invoked when the internal state of the undo manager has changed.
+- (void)undoManagerChanged;
+@end
+
+namespace bookmarks {
+// A bridge that translates UndoManagerObserver C++ callbacks into ObjC
+// callbacks.
+class UndoManagerBridge : public UndoManagerObserver {
+ public:
+ explicit UndoManagerBridge(id<UndoManagerBridgeObserver> observer);
+ ~UndoManagerBridge() override{};
+
+ private:
+ void OnUndoManagerStateChange() override;
+ id<UndoManagerBridgeObserver> observer_;
+};
+} // namespace bookmarks
+
+#endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_UNDO_MANAGER_BRIDGE_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698