Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4343)

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble.h

Issue 232753002: Password bubble: Deplatformify ManagePasswordsBubbleView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/passwords/manage_passwords_bubble.h
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble.h b/chrome/browser/ui/passwords/manage_passwords_bubble.h
new file mode 100644
index 0000000000000000000000000000000000000000..49bf001a84249d74faa50dbe70da7628db40b1a1
--- /dev/null
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble.h
@@ -0,0 +1,34 @@
+// 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 "components/password_manager/core/browser/password_manager_metrics_util.h"
+
+class ManagePasswordsBubbleModel;
+
+namespace content {
+class WebContents;
+} // namespace content
+
+// Interface for platform-specific bubble code.
vabr (Chromium) 2014/04/10 09:30:24 nit: It's not purely an interface, because it also
Mike West 2014/04/10 09:53:46 Yeah, this was initially a pure interface. It grew
+class ManagePasswordsBubble {
+ public:
+ enum DisplayReason { AUTOMATIC, USER_ACTION };
+
+ ManagePasswordsBubbleModel* model() const { return model_; }
vabr (Chromium) 2014/04/10 09:30:24 Is the |model_| owned by the ManagePasswordBubble?
vabr (Chromium) 2014/04/10 09:30:24 Could this be protected?
Mike West 2014/04/10 09:53:46 It could!
Mike West 2014/04/10 09:53:46 Well, it's const, in that the _bubble_ isn't modif
vabr (Chromium) 2014/04/10 10:24:44 I agree this is a fuzzy area. And different people
+
+ protected:
+ ManagePasswordsBubble(content::WebContents* contents, DisplayReason reason);
vabr (Chromium) 2014/04/10 09:30:24 nit: comment on the use of |contents|, i.e., that
Mike West 2014/04/10 09:53:46 I'll comment it for now, but I'm trying to get rid
vabr (Chromium) 2014/04/10 10:24:44 Fair enough. All these three ways of landing this
+ ~ManagePasswordsBubble();
+
+ private:
+ ManagePasswordsBubbleModel* model_;
vabr (Chromium) 2014/04/10 09:30:24 Please account for idiots like me, and comment on
Mike West 2014/04/10 09:53:46 You're right. This should be a scoped_ptr. It shou
+
+ DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubble);
+};
+
+#endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_H_

Powered by Google App Engine
This is Rietveld 408576698