BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / wrench_menu / recent_tabs_menu_model_delegate.h
blob774979a20cd95ead1389f3a69e07759bd6da221e
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_COCOA_WRENCH_MENU_RECENT_TABS_MENU_MODEL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_RECENT_TABS_MENU_MODEL_DELEGATE_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "ui/base/models/menu_model_delegate.h"
13 namespace ui {
14 class MenuModel;
17 // Updates the recent tabs menu when the model changes.
18 class RecentTabsMenuModelDelegate : public ui::MenuModelDelegate {
19 public:
20 // |model| must live longer than this object.
21 RecentTabsMenuModelDelegate(ui::MenuModel* model, NSMenu* menu);
22 ~RecentTabsMenuModelDelegate() override;
24 // ui::MenuModelDelegate:
25 void OnIconChanged(int index) override;
27 private:
28 ui::MenuModel* model_; // weak
29 base::scoped_nsobject<NSMenu> menu_;
31 DISALLOW_COPY_AND_ASSIGN(RecentTabsMenuModelDelegate);
34 #endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_RECENT_TABS_MENU_MODEL_DELEGATE_H_