manage_passwords_bubble_controller.h revision 03b57e008b61dfcb1fbad3aea950ae0e001748b0
103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// found in the LICENSE file.
403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_CONTROLLER_H_
603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#define CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_CONTROLLER_H_
703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#import <Cocoa/Cocoa.h>
903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
1003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "base/mac/scoped_nsobject.h"
1103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
1203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_content_view_controller.h"
1303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller.h"
1403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
1503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
1603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Controller for the Cocoa manage passwords bubble. Transitions through several
1703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// views according to user interaction and updates the password management state
1803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// accordingly.
1903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@interface ManagePasswordsBubbleController
2003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)    : BaseBubbleController<ManagePasswordsBubbleContentViewDelegate,
2103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)                           ManagePasswordsBubblePendingViewDelegate> {
2203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) @private
2303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)  ManagePasswordsBubbleModel* model_;
2403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)  base::scoped_nsobject<NSViewController> currentController_;
2503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)}
2603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)- (id)initWithParentWindow:(NSWindow*)parentWindow
2703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)                     model:(ManagePasswordsBubbleModel*)model;
2803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@end
2903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
3003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@interface ManagePasswordsBubbleController (Testing)
3103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@property(readonly) NSViewController* currentController;
3203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@end
3303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
3403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#endif  // CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_CONTROLLER_H_
35