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

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

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
12 #include "components/autofill/content/browser/wallet/required_action.h" 12 #include "components/autofill/content/browser/wallet/required_action.h"
13 #include "components/autofill/core/browser/field_types.h" 13 #include "components/autofill/core/browser/field_types.h"
14 #include "ui/base/range/range.h"
15 #include "ui/base/ui_base_types.h" 14 #include "ui/base/ui_base_types.h"
16 #include "ui/gfx/image/image.h" 15 #include "ui/gfx/image/image.h"
17 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 #include "ui/gfx/range/range.h"
18 18
19 class Profile; 19 class Profile;
20 20
21 namespace content { 21 namespace content {
22 class WebContents; 22 class WebContents;
23 struct NativeWebKeyboardEvent; 23 struct NativeWebKeyboardEvent;
24 } 24 }
25 25
26 namespace gfx { 26 namespace gfx {
27 class Rect; 27 class Rect;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual int GetDialogButtons() const = 0; 81 virtual int GetDialogButtons() const = 0;
82 82
83 // Whether or not the |button| should be enabled. 83 // Whether or not the |button| should be enabled.
84 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; 84 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0;
85 85
86 // Returns a struct full of data concerning what overlay, if any, should be 86 // Returns a struct full of data concerning what overlay, if any, should be
87 // displayed on top of the dialog. 87 // displayed on top of the dialog.
88 virtual DialogOverlayState GetDialogOverlay() const = 0; 88 virtual DialogOverlayState GetDialogOverlay() const = 0;
89 89
90 // Returns ranges to linkify in the text returned by |LegalDocumentsText()|. 90 // Returns ranges to linkify in the text returned by |LegalDocumentsText()|.
91 virtual const std::vector<ui::Range>& LegalDocumentLinks() = 0; 91 virtual const std::vector<gfx::Range>& LegalDocumentLinks() = 0;
92 92
93 // Detail inputs ------------------------------------------------------------- 93 // Detail inputs -------------------------------------------------------------
94 94
95 // Whether the section is currently active (i.e. should be shown). 95 // Whether the section is currently active (i.e. should be shown).
96 virtual bool SectionIsActive(DialogSection section) const = 0; 96 virtual bool SectionIsActive(DialogSection section) const = 0;
97 97
98 // Returns the set of inputs the page has requested which fall under 98 // Returns the set of inputs the page has requested which fall under
99 // |section|. 99 // |section|.
100 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) 100 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section)
101 const = 0; 101 const = 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 virtual std::vector<DialogNotification> CurrentNotifications() = 0; 171 virtual std::vector<DialogNotification> CurrentNotifications() = 0;
172 172
173 // Begins or aborts the flow to sign into Wallet. 173 // Begins or aborts the flow to sign into Wallet.
174 virtual void SignInLinkClicked() = 0; 174 virtual void SignInLinkClicked() = 0;
175 175
176 // Called when a checkbox in the notification area has changed its state. 176 // Called when a checkbox in the notification area has changed its state.
177 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, 177 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type,
178 bool checked) = 0; 178 bool checked) = 0;
179 179
180 // A legal document link has been clicked. 180 // A legal document link has been clicked.
181 virtual void LegalDocumentLinkClicked(const ui::Range& range) = 0; 181 virtual void LegalDocumentLinkClicked(const gfx::Range& range) = 0;
182 182
183 // Called when the view has been cancelled. Returns true if the dialog should 183 // Called when the view has been cancelled. Returns true if the dialog should
184 // now close, or false to keep it open. 184 // now close, or false to keep it open.
185 virtual bool OnCancel() = 0; 185 virtual bool OnCancel() = 0;
186 186
187 // Called when the view has been accepted. This could be to submit the payment 187 // Called when the view has been accepted. This could be to submit the payment
188 // info or to handle a required action. Returns true if the dialog should now 188 // info or to handle a required action. Returns true if the dialog should now
189 // close, or false to keep it open. 189 // close, or false to keep it open.
190 virtual bool OnAccept() = 0; 190 virtual bool OnAccept() = 0;
191 191
192 // Returns the profile for this dialog. 192 // Returns the profile for this dialog.
193 virtual Profile* profile() = 0; 193 virtual Profile* profile() = 0;
194 194
195 // The web contents that prompted the dialog. 195 // The web contents that prompted the dialog.
196 virtual content::WebContents* GetWebContents() = 0; 196 virtual content::WebContents* GetWebContents() = 0;
197 197
198 protected: 198 protected:
199 virtual ~AutofillDialogViewDelegate(); 199 virtual ~AutofillDialogViewDelegate();
200 }; 200 };
201 201
202 } // namespace autofill 202 } // namespace autofill
203 203
204 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 204 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698