Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / login / login_model.h
blob6140e7a7919ebd9ce713a2d80ddb10f341f68980
1 // Copyright (c) 2011 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_LOGIN_LOGIN_MODEL_H_
6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_MODEL_H_
8 #include "base/strings/string16.h"
10 // Simple Model & Observer interfaces for a LoginView to facilitate exchanging
11 // information.
12 class LoginModelObserver {
13 public:
14 // Called by the model when a username,password pair has been identified
15 // as a match for the pending login prompt.
16 virtual void OnAutofillDataAvailable(const base::string16& username,
17 const base::string16& password) = 0;
19 virtual void OnLoginModelDestroying() = 0;
21 protected:
22 virtual ~LoginModelObserver() {}
25 class LoginModel {
26 public:
27 // Add an observer interested in the data from the model.
28 virtual void AddObserver(LoginModelObserver* observer) = 0;
29 // Remove an observer from the model.
30 virtual void RemoveObserver(LoginModelObserver* observer) = 0;
32 protected:
33 virtual ~LoginModel() {}
36 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_MODEL_H_