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"
17 // Updates the recent tabs menu when the model changes.
18 class RecentTabsMenuModelDelegate
: public ui::MenuModelDelegate
{
20 // |model| must live longer than this object.
21 RecentTabsMenuModelDelegate(ui::MenuModel
* model
, NSMenu
* menu
);
22 virtual ~RecentTabsMenuModelDelegate();
24 // ui::MenuModelDelegate:
25 virtual void OnIconChanged(int index
) OVERRIDE
;
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_