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

Unified Diff: chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.cc

Issue 1138653003: Move card unmask interfaces and controller into the autofill component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing override declaration Created 5 years, 7 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/android/autofill/card_unmask_prompt_view_android.cc
diff --git a/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.cc b/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.cc
index 405f337d5cee0ee815c982fe255b3aefcb955bb3..6c7ba1b7b52995f5188ce211fc396fcd86079538 100644
--- a/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.cc
+++ b/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.cc
@@ -5,7 +5,8 @@
#include "chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h"
#include "chrome/browser/android/resource_mapper.h"
-#include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h"
+#include "chrome/browser/ui/autofill/create_card_unmask_prompt_view.h"
+#include "components/autofill/core/browser/ui/card_unmask_prompt_controller.h"
#include "content/public/browser/web_contents.h"
#include "jni/CardUnmaskBridge_jni.h"
#include "ui/android/view_android.h"
@@ -13,17 +14,16 @@
namespace autofill {
-CardUnmaskPromptView* CardUnmaskPromptView::CreateAndShow(
- CardUnmaskPromptController* controller) {
- CardUnmaskPromptViewAndroid* view =
- new CardUnmaskPromptViewAndroid(controller);
- view->Show();
- return view;
+CardUnmaskPromptView* CreateCardUnmaskPromptView(
+ CardUnmaskPromptController* controller,
+ content::WebContents* web_contents) {
+ return new CardUnmaskPromptViewAndroid(controller, web_contents);
}
CardUnmaskPromptViewAndroid::CardUnmaskPromptViewAndroid(
- CardUnmaskPromptController* controller)
- : controller_(controller) {
+ CardUnmaskPromptController* controller,
+ content::WebContents* web_contents)
+ : controller_(controller), web_contents_(web_contents) {
}
CardUnmaskPromptViewAndroid::~CardUnmaskPromptViewAndroid() {
@@ -33,8 +33,7 @@ CardUnmaskPromptViewAndroid::~CardUnmaskPromptViewAndroid() {
void CardUnmaskPromptViewAndroid::Show() {
JNIEnv* env = base::android::AttachCurrentThread();
- ui::ViewAndroid* view_android =
- controller_->GetWebContents()->GetNativeView();
+ ui::ViewAndroid* view_android = web_contents_->GetNativeView();
ScopedJavaLocalRef<jstring> dialog_title =
base::android::ConvertUTF16ToJavaString(env,

Powered by Google App Engine
This is Rietveld 408576698