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_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/password_manager/core/browser/password_manager_metrics_util.h"
12 class ManagePasswordsBubbleModel
;
16 } // namespace content
18 // Base class for platform-specific password management bubble views. This class
19 // is responsible for creating and destroying the model associated with the view
20 // and providing a platform-agnostic interface to the bubble.
21 class ManagePasswordsBubble
{
23 enum DisplayReason
{ AUTOMATIC
, USER_ACTION
};
26 // Creates a ManagePasswordsBubble. |contents| is used only to create a
27 // ManagePasswordsBubbleModel; this class neither takes ownership of the
28 // object nor stores the pointer.
29 ManagePasswordsBubble(content::WebContents
* contents
, DisplayReason reason
);
30 virtual ~ManagePasswordsBubble();
32 ManagePasswordsBubbleModel
* model() { return model_
.get(); }
33 const ManagePasswordsBubbleModel
* model() const { return model_
.get(); }
36 scoped_ptr
<ManagePasswordsBubbleModel
> model_
;
38 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubble
);
41 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_