| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/sync/one_click_signin_links_delegate_impl.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_links_delegate_impl.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_navigator.h" | 8 #include "chrome/browser/ui/browser_navigator.h" |
| 9 #include "chrome/browser/ui/browser_navigator_params.h" | 9 #include "chrome/browser/ui/browser_navigator_params.h" |
| 10 #include "chrome/browser/ui/chrome_pages.h" | 10 #include "chrome/browser/ui/chrome_pages.h" |
| 11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
| 12 | 12 |
| 13 OneClickSigninLinksDelegateImpl::OneClickSigninLinksDelegateImpl( | 13 OneClickSigninLinksDelegateImpl::OneClickSigninLinksDelegateImpl( |
| 14 Browser* browser) | 14 Browser* browser) |
| 15 : browser_(browser) {} | 15 : browser_(browser) {} |
| 16 | 16 |
| 17 OneClickSigninLinksDelegateImpl::~OneClickSigninLinksDelegateImpl() {} | 17 OneClickSigninLinksDelegateImpl::~OneClickSigninLinksDelegateImpl() {} |
| 18 | 18 |
| 19 void OneClickSigninLinksDelegateImpl::OnLearnMoreLinkClicked(bool is_dialog) { | 19 void OneClickSigninLinksDelegateImpl::OnLearnMoreLinkClicked(bool is_dialog) { |
| 20 chrome::NavigateParams params(browser_, GURL(chrome::kChromeSyncLearnMoreURL), | 20 chrome::NavigateParams params(browser_, GURL(chrome::kChromeSyncLearnMoreURL), |
| 21 ui::PAGE_TRANSITION_LINK); | 21 ui::PAGE_TRANSITION_LINK); |
| 22 params.disposition = is_dialog ? NEW_WINDOW : NEW_FOREGROUND_TAB; | 22 params.disposition = is_dialog ? WindowOpenDisposition::NEW_WINDOW |
| 23 : WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 23 chrome::Navigate(¶ms); | 24 chrome::Navigate(¶ms); |
| 24 } | 25 } |
| 25 | 26 |
| 26 void OneClickSigninLinksDelegateImpl::OnAdvancedLinkClicked() { | 27 void OneClickSigninLinksDelegateImpl::OnAdvancedLinkClicked() { |
| 27 chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage); | 28 chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage); |
| 28 } | 29 } |
| OLD | NEW |