summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/login/login_model.h
blob: f0cb1d6e0900ec98f8f15aad9bfdbd53e4a6e7fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_LOGIN_LOGIN_MODEL_H_
#define CHROME_BROWSER_UI_LOGIN_LOGIN_MODEL_H_

#include "base/string16.h"

// Simple Model & Observer interfaces for a LoginView to facilitate exchanging
// information.
class LoginModelObserver {
 public:
  // Called by the model when a username,password pair has been identified
  // as a match for the pending login prompt.
  virtual void OnAutofillDataAvailable(const string16& username,
                                       const string16& password) = 0;

 protected:
  virtual ~LoginModelObserver() {}
};

class LoginModel {
 public:
  // Set the observer interested in the data from the model.
  // observer can be null, signifying there is no longer any observer
  // interested in the data.
  virtual void SetObserver(LoginModelObserver* observer) = 0;

 protected:
  virtual ~LoginModel() {}
};

#endif  // CHROME_BROWSER_UI_LOGIN_LOGIN_MODEL_H_