[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / one_click_signin_dialog_controller.h
blob2df897223f5d6c2b43efc36efd184ee9e6154cca
1 // Copyright (c) 2013 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_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
15 namespace content {
16 class WebContents;
18 @class OneClickSigninViewController;
20 // After the user signs into chrome this class is used to display a tab modal
21 // signin confirmation dialog.
22 class OneClickSigninDialogController : public ConstrainedWindowMacDelegate {
23 public:
24 // Creates an OneClickSigninDialogController. |web_contents| is used to
25 // open links, |email| is the user's email address that is used for sync,
26 // and |sync_callback| is called to start sync.
27 OneClickSigninDialogController(
28 content::WebContents* web_contents,
29 const BrowserWindow::StartSyncCallback& sync_callback,
30 const base::string16& email);
31 virtual ~OneClickSigninDialogController();
33 // ConstrainedWindowMacDelegate implementation.
34 virtual void OnConstrainedWindowClosed(
35 ConstrainedWindowMac* window) OVERRIDE;
37 ConstrainedWindowMac* constrained_window() const {
38 return constrained_window_.get();
41 OneClickSigninViewController* view_controller() { return view_controller_; }
43 private:
44 void PerformClose();
46 scoped_ptr<ConstrainedWindowMac> constrained_window_;
47 base::scoped_nsobject<OneClickSigninViewController> view_controller_;
50 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_