• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h"
6 
7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_navigator.h"
9 #include "chrome/browser/ui/chrome_pages.h"
10 #include "chrome/common/url_constants.h"
11 
OneClickSigninBubbleLinksDelegate(Browser * browser)12 OneClickSigninBubbleLinksDelegate::OneClickSigninBubbleLinksDelegate(
13     Browser* browser) : browser_(browser) {}
14 
~OneClickSigninBubbleLinksDelegate()15 OneClickSigninBubbleLinksDelegate::~OneClickSigninBubbleLinksDelegate() {}
16 
OnLearnMoreLinkClicked(bool is_dialog)17 void OneClickSigninBubbleLinksDelegate::OnLearnMoreLinkClicked(
18     bool is_dialog) {
19   chrome::NavigateParams params(browser_,
20                                 GURL(chrome::kChromeSyncLearnMoreURL),
21                                 content::PAGE_TRANSITION_LINK);
22   params.disposition = is_dialog ? NEW_WINDOW : NEW_FOREGROUND_TAB;
23   chrome::Navigate(&params);
24 }
25 
OnAdvancedLinkClicked()26 void OneClickSigninBubbleLinksDelegate::OnAdvancedLinkClicked() {
27   chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage);
28 }
29