blob: fcc445ae4201c074d37fb2d83fdcee737a1ad553 (
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
35
36
37
38
39
40
41
|
// Copyright 2014 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_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_
#define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
class ManagePasswordsBubbleModel;
namespace content {
class WebContents;
} // namespace content
// Base class for platform-specific password management bubble views. This class
// is responsible for creating and destroying the model associated with the view
// and providing a platform-agnostic interface to the bubble.
class ManagePasswordsBubble {
public:
enum DisplayReason { AUTOMATIC, USER_ACTION };
protected:
// Creates a ManagePasswordsBubble. |contents| is used only to create a
// ManagePasswordsBubbleModel; this class neither takes ownership of the
// object nor stores the pointer.
ManagePasswordsBubble(content::WebContents* contents, DisplayReason reason);
virtual ~ManagePasswordsBubble();
ManagePasswordsBubbleModel* model() { return model_.get(); }
const ManagePasswordsBubbleModel* model() const { return model_.get(); }
private:
scoped_ptr<ManagePasswordsBubbleModel> model_;
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubble);
};
#endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_
|