blob: 13bb585619f0e6c48fb97a0e082d2f873dd5421c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (c) 2009 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 CHROME_BROWSER_UI_COCOA_BACK_FORWARD_MENU_CONTROLLER_H_
#define CHROME_BROWSER_UI_COCOA_BACK_FORWARD_MENU_CONTROLLER_H_
#pragma once
#import <Cocoa/Cocoa.h>
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
@class DelayedMenuButton;
typedef BackForwardMenuModel::ModelType BackForwardMenuType;
const BackForwardMenuType BACK_FORWARD_MENU_TYPE_BACK =
BackForwardMenuModel::BACKWARD_MENU;
const BackForwardMenuType BACK_FORWARD_MENU_TYPE_FORWARD =
BackForwardMenuModel::FORWARD_MENU;
// A class that manages the back/forward menu (and delayed-menu button, and
// model).
@interface BackForwardMenuController : NSObject {
@private
BackForwardMenuType type_;
DelayedMenuButton* button_; // Weak; comes from nib.
scoped_ptr<BackForwardMenuModel> model_;
scoped_nsobject<NSMenu> backForwardMenu_;
}
// Type (back or forwards); can only be set on initialization.
@property(readonly, nonatomic) BackForwardMenuType type;
- (id)initWithBrowser:(Browser*)browser
modelType:(BackForwardMenuType)type
button:(DelayedMenuButton*)button;
@end // @interface BackForwardMenuController
#endif // CHROME_BROWSER_UI_COCOA_BACK_FORWARD_MENU_CONTROLLER_H_
|