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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller.h

Issue 11231063: [views] "Hello, world" autofill imperative API dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/string16.h"
10
11 namespace content {
12 class WebContents;
13 }
14
15 class AutofillDialogController;
16
17 class AutofillDialogView {
Ilya Sherman 2012/10/23 00:39:00 nit: Please include a comment describing this clas
Ilya Sherman 2012/10/23 00:39:00 nit: Please move this class into its own file.
Evan Stade 2012/10/23 01:52:04 oh yea, forgot class level comments. I'll add all
Evan Stade 2012/10/23 01:52:04 I don't believe it warrants its own file, but done
18 public:
19 virtual ~AutofillDialogView;
20
21 // Shows the dialog.
22 virtual void Show() = 0;
23
24 static AutofillDialogView* CreateDialog(AutofillDialogController* controller);
Ilya Sherman 2012/10/23 00:39:00 nit: Please include a comment describing this func
Evan Stade 2012/10/23 01:52:04 Done.
25 };
26
27 class AutofillDialogController {
Ilya Sherman 2012/10/23 00:39:00 nit: Please include a brief comment describing thi
Evan Stade 2012/10/23 01:52:04 Done.
28 public:
29 explicit AutofillDialogController(content::WebContents* contents);
30 ~AutofillDialogController() {}
31
32 void Show();
33
34 // Called by the view.
35 string16 DialogTitle();
36 string16 CancelButtonText();
37 string16 ConfirmButtonText();
38 bool ConfirmButtonEnabled();
Ilya Sherman 2012/10/23 00:39:00 nit: If these are only called by the view, why not
Ilya Sherman 2012/10/23 00:39:00 nit: These should all be const methods, and the st
Evan Stade 2012/10/23 01:52:04 changed to const methods, but the return values ca
Evan Stade 2012/10/23 01:52:04 the controller contains the logic and state for th
Ilya Sherman 2012/10/23 04:52:29 Sadly, const without a ref does have a meaning. W
Evan Stade 2012/10/23 18:48:04 Sorry, I'm not trying to be difficult, but... if
39
40 // Called when the view has been closed. A false value for |accepted|
41 // indicates that the autofill operation should be aborted.
Ilya Sherman 2012/10/23 00:39:00 nit: "autofill" -> "Autofill", since this is refer
Evan Stade 2012/10/23 01:52:04 Done.
42 void ViewClosed(bool accepted);
Ilya Sherman 2012/10/23 00:39:00 nit: This boolean's meaning will not be clear at t
Evan Stade 2012/10/23 01:52:04 Done.
43
44 content::WebContents* web_contents() { return contents_; }
Ilya Sherman 2012/10/23 00:39:00 nit: Can this be constified?
Evan Stade 2012/10/23 01:52:04 Done.
45
46 private:
47 // The WebContents that initiated the autofill action.
Ilya Sherman 2012/10/23 00:39:00 nit: The user initiates an Autofill action, not th
Evan Stade 2012/10/23 01:52:04 well, it's initiated by a javascript call which is
Ilya Sherman 2012/10/23 04:52:29 Fair enough, but I still think that describing thi
Evan Stade 2012/10/23 18:48:04 I tried to improve the wording.
48 content::WebContents* contents_;
Ilya Sherman 2012/10/23 00:39:00 nit: content::WebContents* const contents_;
Evan Stade 2012/10/23 01:52:04 Done.
49
50 scoped_ptr<AutofillDialogView> view_;
51 };
52
53 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698