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

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: compile 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 AutofillDialogView;
16
17 // This class drives the dialog that appears when a site uses the imperative
18 // autocomplete API to fill out a form.
19 class AutofillDialogController {
20 public:
21 enum Action {
22 AUTOFILL_ACTION_ABORT,
23 AUTOFILL_ACTION_SUBMIT,
24 };
25
26 explicit AutofillDialogController(content::WebContents* contents);
27 ~AutofillDialogController();
28
29 void Show();
30
31 // Called by the view.
32 string16 DialogTitle() const;
33 string16 CancelButtonText() const;
34 string16 ConfirmButtonText() const;
35 bool ConfirmButtonEnabled() const;
36
37 // Called when the view has been closed. The value for |action| indicates
38 // whether the Autofill operation should be aborted.
39 void ViewClosed(Action action);
40
41 content::WebContents* web_contents() { return contents_; }
42
43 private:
44 // The WebContents where the Autofill action originated.
45 content::WebContents* const contents_;
46
47 scoped_ptr<AutofillDialogView> view_;
48
49 DISALLOW_COPY_AND_ASSIGN(AutofillDialogController);
50 };
51
52 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698