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

Side by Side Diff: chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc

Issue 12412003: Initial UI structure for autofill dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Styling fixes Created 7 years, 9 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/ui/android/autofill/autofill_dialog_view_android.h" 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_view_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "chrome/browser/ui/android/window_android_helper.h"
8 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
9 #include "jni/AutofillDialogGlue_jni.h" 10 #include "jni/AutofillDialogGlue_jni.h"
11 #include "ui/gfx/android/window_android.h"
10 12
11 namespace autofill { 13 namespace autofill {
12
13 // AutofillDialogView ---------------------------------------------------------- 14 // AutofillDialogView ----------------------------------------------------------
14 15
15 // static 16 // static
16 AutofillDialogView* AutofillDialogView::Create( 17 AutofillDialogView* AutofillDialogView::Create(
17 AutofillDialogController* controller) { 18 AutofillDialogController* controller) {
18 return new AutofillDialogViewAndroid(controller); 19 return new AutofillDialogViewAndroid(controller);
19 } 20 }
20 21
21 // AutofillDialogViews --------------------------------------------------------- 22 // AutofillDialogViews ---------------------------------------------------------
22 23
23 AutofillDialogViewAndroid::AutofillDialogViewAndroid( 24 AutofillDialogViewAndroid::AutofillDialogViewAndroid(
24 AutofillDialogController* controller) 25 AutofillDialogController* controller)
25 : controller_(controller) {} 26 : controller_(controller) {}
26 27
27 AutofillDialogViewAndroid::~AutofillDialogViewAndroid() {} 28 AutofillDialogViewAndroid::~AutofillDialogViewAndroid() {}
28 29
29 void AutofillDialogViewAndroid::Show() { 30 void AutofillDialogViewAndroid::Show() {
30 JNIEnv* env = base::android::AttachCurrentThread(); 31 JNIEnv* env = base::android::AttachCurrentThread();
31 java_object_.Reset(Java_AutofillDialogGlue_create( 32 java_object_.Reset(Java_AutofillDialogGlue_create(
32 env, 33 env,
33 reinterpret_cast<jint>(this), 34 reinterpret_cast<jint>(this),
34 base::android::GetApplicationContext())); 35 WindowAndroidHelper::FromWebContents(controller_->web_contents())->
36 GetWindowAndroid()->GetJavaObject().obj()));
35 } 37 }
36 38
37 void AutofillDialogViewAndroid::Hide() { 39 void AutofillDialogViewAndroid::Hide() {
38 NOTIMPLEMENTED(); 40 NOTIMPLEMENTED();
39 } 41 }
40 42
41 void AutofillDialogViewAndroid::UpdateAccountChooser() { 43 void AutofillDialogViewAndroid::UpdateAccountChooser() {
42 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
43 } 45 }
44 46
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void AutofillDialogViewAndroid::CancelForTesting() { 105 void AutofillDialogViewAndroid::CancelForTesting() {
104 NOTIMPLEMENTED(); 106 NOTIMPLEMENTED();
105 } 107 }
106 108
107 // static 109 // static
108 bool AutofillDialogViewAndroid::RegisterAutofillDialogViewAndroid(JNIEnv* env) { 110 bool AutofillDialogViewAndroid::RegisterAutofillDialogViewAndroid(JNIEnv* env) {
109 return RegisterNativesImpl(env); 111 return RegisterNativesImpl(env);
110 } 112 }
111 113
112 } // namespace autofill 114 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698