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

Side by Side Diff: ios/chrome/browser/ui/toolbar/tools_menu_button_observer_bridge.h

Issue 2588733002: Upstream Chrome on iOS source code [9/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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLS_MENU_BUTTON_OBSERVER_BRIDGE_H_
6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLS_MENU_BUTTON_OBSERVER_BRIDGE_H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "base/mac/scoped_nsobject.h"
11 #include "components/reading_list/ios/reading_list_model_observer.h"
12
13 @class ToolbarToolsMenuButton;
14
15 // C++ bridge informing a ToolbarToolsMenuButton whether the Reading List Model
16 // contains unread items.
17 class ToolsMenuButtonObserverBridge : public ReadingListModelObserver {
18 public:
19 // Creates the bridge to the ToolbarToolsMenuButton |button|.
20 ToolsMenuButtonObserverBridge(ReadingListModel* readingListModel,
21 ToolbarToolsMenuButton* button);
22
23 ~ToolsMenuButtonObserverBridge() final;
24
25 // ReadingListModelObserver implementation.
26 void ReadingListModelLoaded(const ReadingListModel* model) override;
27 void ReadingListDidApplyChanges(ReadingListModel* model) override;
28
29 private:
30 // Notify the ToolbarToolsMenuButton of whether the reading list contains
31 // unread items.
32 void UpdateButtonWithModel(const ReadingListModel* model);
33 ReadingListModel* readingListModel_;
34 base::scoped_nsobject<ToolbarToolsMenuButton> button_;
35 };
36
37 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLS_MENU_BUTTON_OBSERVER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698