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

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: Got rid of unused includes 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
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "chrome/browser/ui/android/window_android_helper.h"
10 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
11 #include "jni/AutofillDialogGlue_jni.h" 12 #include "jni/AutofillDialogGlue_jni.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/models/menu_model.h" 14 #include "ui/base/models/menu_model.h"
15 #include "ui/gfx/android/window_android.h"
14 16
15 namespace autofill { 17 namespace autofill {
16 18
17 // AutofillDialogView ---------------------------------------------------------- 19 // AutofillDialogView ----------------------------------------------------------
18 20
19 // static 21 // static
20 AutofillDialogView* AutofillDialogView::Create( 22 AutofillDialogView* AutofillDialogView::Create(
21 AutofillDialogController* controller) { 23 AutofillDialogController* controller) {
22 return new AutofillDialogViewAndroid(controller); 24 return new AutofillDialogViewAndroid(controller);
23 } 25 }
24 26
25 // AutofillDialogView ---------------------------------------------------------- 27 // AutofillDialogView ----------------------------------------------------------
26 28
27 AutofillDialogViewAndroid::AutofillDialogViewAndroid( 29 AutofillDialogViewAndroid::AutofillDialogViewAndroid(
28 AutofillDialogController* controller) 30 AutofillDialogController* controller)
29 : controller_(controller) {} 31 : controller_(controller) {}
30 32
31 AutofillDialogViewAndroid::~AutofillDialogViewAndroid() {} 33 AutofillDialogViewAndroid::~AutofillDialogViewAndroid() {}
32 34
33 void AutofillDialogViewAndroid::Show() { 35 void AutofillDialogViewAndroid::Show() {
34 JNIEnv* env = base::android::AttachCurrentThread(); 36 JNIEnv* env = base::android::AttachCurrentThread();
35 java_object_.Reset(Java_AutofillDialogGlue_create( 37 java_object_.Reset(Java_AutofillDialogGlue_create(
36 env, 38 env,
37 reinterpret_cast<jint>(this), 39 reinterpret_cast<jint>(this),
38 base::android::GetApplicationContext())); 40 WindowAndroidHelper::FromWebContents(controller_->web_contents())->
41 GetWindowAndroid()->GetJavaObject().obj()));
39 } 42 }
40 43
41 void AutofillDialogViewAndroid::Hide() { 44 void AutofillDialogViewAndroid::Hide() {
42 NOTIMPLEMENTED(); 45 NOTIMPLEMENTED();
43 } 46 }
44 47
45 void AutofillDialogViewAndroid::UpdateAccountChooser() { 48 void AutofillDialogViewAndroid::UpdateAccountChooser() {
46 NOTIMPLEMENTED(); 49 NOTIMPLEMENTED();
47 } 50 }
48 51
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void AutofillDialogViewAndroid::CancelForTesting() { 186 void AutofillDialogViewAndroid::CancelForTesting() {
184 NOTIMPLEMENTED(); 187 NOTIMPLEMENTED();
185 } 188 }
186 189
187 // static 190 // static
188 bool AutofillDialogViewAndroid::RegisterAutofillDialogViewAndroid(JNIEnv* env) { 191 bool AutofillDialogViewAndroid::RegisterAutofillDialogViewAndroid(JNIEnv* env) {
189 return RegisterNativesImpl(env); 192 return RegisterNativesImpl(env);
190 } 193 }
191 194
192 } // namespace autofill 195 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698