[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / wrench_menu / recent_tabs_menu_model_delegate.h
blobd9cdd60dc56979c0bd9574624de255aad3aa553d
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 virtual ~RecentTabsMenuModelDelegate();
24 // ui::MenuModelDelegate:
25 virtual 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_