| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/autofill_profiles_view_win.h" | 5 #include "chrome/browser/views/autofill_profiles_view_win.h" |
| 6 | 6 |
| 7 #include <vsstyle.h> | 7 #include <vsstyle.h> |
| 8 #include <vssym32.h> | 8 #include <vssym32.h> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 enable_auto_fill_.SetValueIfNotManaged(enabled); | 370 enable_auto_fill_.SetValueIfNotManaged(enabled); |
| 371 preferences_->ScheduleSavePersistentPrefs(); | 371 preferences_->ScheduleSavePersistentPrefs(); |
| 372 UpdateWidgetState(); | 372 UpdateWidgetState(); |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 | 375 |
| 376 ///////////////////////////////////////////////////////////////////////////// | 376 ///////////////////////////////////////////////////////////////////////////// |
| 377 // AutoFillProfilesView, views::LinkController implementations: | 377 // AutoFillProfilesView, views::LinkController implementations: |
| 378 void AutoFillProfilesView::LinkActivated(views::Link* source, int event_flags) { | 378 void AutoFillProfilesView::LinkActivated(views::Link* source, int event_flags) { |
| 379 Browser* browser = BrowserList::GetLastActive(); | 379 Browser* browser = BrowserList::GetLastActive(); |
| 380 browser->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), NEW_FOREGROUND_TAB, | 380 if (!browser || !browser->GetSelectedTabContents()) |
| 381 PageTransition::TYPED); | 381 browser = Browser::Create(profile_); |
| 382 browser->OpenAutoFillHelpTabAndActivate(); |
| 382 } | 383 } |
| 383 | 384 |
| 384 | 385 |
| 385 ///////////////////////////////////////////////////////////////////////////// | 386 ///////////////////////////////////////////////////////////////////////////// |
| 386 // AutoFillProfilesView, views::FocusChangeListener implementations: | 387 // AutoFillProfilesView, views::FocusChangeListener implementations: |
| 387 void AutoFillProfilesView::FocusWillChange(views::View* focused_before, | 388 void AutoFillProfilesView::FocusWillChange(views::View* focused_before, |
| 388 views::View* focused_now) { | 389 views::View* focused_now) { |
| 389 if (focused_now) { | 390 if (focused_now) { |
| 390 focused_now->ScrollRectToVisible(gfx::Rect(focused_now->width(), | 391 focused_now->ScrollRectToVisible(gfx::Rect(focused_now->width(), |
| 391 focused_now->height())); | 392 focused_now->height())); |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 AutoFillDialogObserver* observer, | 1523 AutoFillDialogObserver* observer, |
| 1523 Profile* profile) { | 1524 Profile* profile) { |
| 1524 DCHECK(profile); | 1525 DCHECK(profile); |
| 1525 | 1526 |
| 1526 PersonalDataManager* personal_data_manager = | 1527 PersonalDataManager* personal_data_manager = |
| 1527 profile->GetPersonalDataManager(); | 1528 profile->GetPersonalDataManager(); |
| 1528 DCHECK(personal_data_manager); | 1529 DCHECK(personal_data_manager); |
| 1529 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, | 1530 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, |
| 1530 profile->GetPrefs(), NULL, NULL); | 1531 profile->GetPrefs(), NULL, NULL); |
| 1531 } | 1532 } |
| OLD | NEW |