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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/EditorBase.java

Issue 2413833002: PaymentRequest: Rename ContactInfo to PayerInfo.
Patch Set: test Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.Callback; 9 import org.chromium.base.Callback;
10 import org.chromium.chrome.browser.payments.ui.EditorView; 10 import org.chromium.chrome.browser.payments.ui.EditorView;
11 import org.chromium.chrome.browser.payments.ui.PaymentOption; 11 import org.chromium.chrome.browser.payments.ui.PaymentOption;
12 12
13 import javax.annotation.Nullable; 13 import javax.annotation.Nullable;
14 14
15 /** 15 /**
16 * The base class for an editor controller. 16 * The base class for an editor controller.
17 */ 17 */
18 abstract class EditorBase<T extends PaymentOption> { 18 abstract class EditorBase<T extends PaymentOption> {
19 @Nullable protected EditorView mEditorView; 19 @Nullable protected EditorView mEditorView;
20 @Nullable protected Context mContext; 20 @Nullable protected Context mContext;
21 21
22 /** 22 /**
23 * Sets the user interface to be used for editing contact information. 23 * Sets the user interface to be used for editing payer information.
24 * 24 *
25 * @param editorView The user interface to be used. 25 * @param editorView The user interface to be used.
26 */ 26 */
27 public void setEditorView(EditorView editorView) { 27 public void setEditorView(EditorView editorView) {
28 assert editorView != null; 28 assert editorView != null;
29 mEditorView = editorView; 29 mEditorView = editorView;
30 mContext = mEditorView.getContext(); 30 mContext = mEditorView.getContext();
31 } 31 }
32 32
33 /** 33 /**
34 * Shows the user interface for editing the given information. 34 * Shows the user interface for editing the given information.
35 * 35 *
36 * @param toEdit The information to edit. Can be null if the user is addin g new information 36 * @param toEdit The information to edit. Can be null if the user is addin g new information
37 * instead of editing an existing one. 37 * instead of editing an existing one.
38 * @param callback The callback to invoke with the complete and valid inform ation. Can be 38 * @param callback The callback to invoke with the complete and valid inform ation. Can be
39 * invoked with null if the user clicked Cancel. 39 * invoked with null if the user clicked Cancel.
40 */ 40 */
41 protected void edit(@Nullable T toEdit, Callback<T> callback) { 41 protected void edit(@Nullable T toEdit, Callback<T> callback) {
42 assert callback != null; 42 assert callback != null;
43 assert mEditorView != null; 43 assert mEditorView != null;
44 assert mContext != null; 44 assert mContext != null;
45 } 45 }
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698