Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / profiles / avatar_base_controller.h
blob232ac659191270318eab702b53fa7b08c5491aed
1 // Copyright 2014 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_PROFILES_AVATAR_BASE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_
8 #import <AppKit/AppKit.h>
10 #import "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/browser_window.h"
14 @class BaseBubbleController;
15 class Browser;
16 class ProfileInfoUpdateObserver;
18 // This view controller manages the button that sits in the top of the
19 // window frame when using multi-profiles, and shows information about the
20 // current profile. Clicking the button will open the profile menu.
21 @interface AvatarBaseController : NSViewController {
22 @protected
23 Browser* browser_;
25 // The avatar button. Child classes are responsible for implementing it.
26 base::scoped_nsobject<NSButton> button_;
28 @private
29 // The menu controller, if the menu is open.
30 BaseBubbleController* menuController_;
32 // Observer that listens for updates to the ProfileInfoCache.
33 scoped_ptr<ProfileInfoUpdateObserver> profileInfoObserver_;
36 // The avatar button view.
37 @property(readonly, nonatomic) NSButton* buttonView;
39 // Designated initializer.
40 - (id)initWithBrowser:(Browser*)browser;
42 // Shows the avatar bubble in the given mode.
43 - (void)showAvatarBubbleAnchoredAt:(NSView*)anchor
44 withMode:(BrowserWindow::AvatarBubbleMode)mode
45 withServiceType:(signin::GAIAServiceType)serviceType;
47 @end
49 @interface AvatarBaseController (ExposedForTesting)
50 - (BaseBubbleController*)menuController;
51 @end
53 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_