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"
131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_never_save_view_controller.h"
1403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller.h"
1503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
1603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
1703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Controller for the Cocoa manage passwords bubble. Transitions through several
1803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// views according to user interaction and updates the password management state
1903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// accordingly.
2003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@interface ManagePasswordsBubbleController
2103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)    : BaseBubbleController<ManagePasswordsBubbleContentViewDelegate,
221320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci                           ManagePasswordsBubbleNeverSaveViewDelegate,
2303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)                           ManagePasswordsBubblePendingViewDelegate> {
2403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) @private
2503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)  ManagePasswordsBubbleModel* model_;
261320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  base::scoped_nsobject<ManagePasswordsBubbleContentViewController>
271320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci      currentController_;
2803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)}
2903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)- (id)initWithParentWindow:(NSWindow*)parentWindow
3003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)                     model:(ManagePasswordsBubbleModel*)model;
3103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@end
3203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
3303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@interface ManagePasswordsBubbleController (Testing)
3403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@property(readonly) NSViewController* currentController;
3503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)@end
3603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
3703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#endif  // CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_CONTROLLER_H_
38