| 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_
|
|
|