Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / profiles / user_manager_mac.h
blob63eb5b6fd76b8fbc28ae6cfb854fa8c1e011c1f6
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_USER_MANAGER_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_window.h"
15 @class UserManagerWindowController;
17 namespace content {
18 class NavigationController;
19 class WebContents;
22 // Dialog widget that contains the Desktop User Manager webui. This object
23 // should always be created from the UserManager::Show() method. Note that only
24 // one User Manager will exist at a time.
25 class UserManagerMac {
26 public:
27 // Called by the cocoa window controller when its window closes and the
28 // controller destroyed itself. Deletes the instance.
29 void WindowWasClosed();
31 // Called from the UserManager class once the |system_profile| is ready. Will
32 // construct a UserManagerMac object and show |url|.
33 static void OnSystemProfileCreated(const base::Time& start_time,
34 Profile* system_profile,
35 const std::string& url);
37 UserManagerWindowController* window_controller() {
38 return window_controller_.get();
41 void set_user_manager_started_showing(
42 const base::Time& user_manager_started_showing) {
43 user_manager_started_showing_ = user_manager_started_showing;
46 void LogTimeToOpen();
48 private:
49 explicit UserManagerMac(Profile* profile);
50 virtual ~UserManagerMac();
52 // Controller of the window.
53 base::scoped_nsobject<UserManagerWindowController> window_controller_;
55 base::Time user_manager_started_showing_;
57 DISALLOW_COPY_AND_ASSIGN(UserManagerMac);
60 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_