summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/instant_confirm_window_controller.h
blob: 223c1974a1120a4b579f1e9f54e44db425fe6e56 (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) 2010 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_INSTANT_CONFIRM_WINDOW_CONTROLLER_H_
#define CHROME_BROWSER_UI_COCOA_INSTANT_CONFIRM_WINDOW_CONTROLLER_H_
#pragma once

#import <Cocoa/Cocoa.h>

#import "base/cocoa_protocols_mac.h"

class Profile;

// This controller manages a dialog that informs the user about Instant search.
// The recommended API is to not use this class directly, but instead to use
// the functions in //chrome/browser/instant/instant_confirm_dialog.h:
//   void ShowInstantConfirmDialog[IfNecessary](gfx::NativeWindow* parent, ...)
// Which will attach the window to |parent| as a sheet.
@interface InstantConfirmWindowController : NSWindowController<NSWindowDelegate>
{
 @private
  // The long description about Instant that needs to be sized-to-fit.
  IBOutlet NSTextField* description_;

  Profile* profile_;  // weak
}

// Designated initializer. The controller will release itself on window close.
- (id)initWithProfile:(Profile*)profile;

// Action for the "Learn more" link.
- (IBAction)learnMore:(id)sender;

// The user has opted in to Instant. This enables the Instant preference.
- (IBAction)ok:(id)sender;

// Closes the sheet without altering the preference value.
- (IBAction)cancel:(id)sender;

@end

#endif  // CHROME_BROWSER_UI_COCOA_INSTANT_CONFIRM_WINDOW_CONTROLLER_H_