| OLD | NEW | 
| (Empty) |  | 
 |   1 // Copyright 2017 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/startup/chromedriver_infobar_delegate.h" | 
 |   6  | 
 |   7 #include "chrome/browser/devtools/global_confirm_info_bar.h" | 
 |   8 #include "chrome/browser/ui/browser.h" | 
 |   9 #include "chrome/grit/generated_resources.h" | 
 |  10 #include "components/infobars/core/infobar.h" | 
 |  11 #include "components/strings/grit/components_strings.h" | 
 |  12 #include "ui/base/l10n/l10n_util.h" | 
 |  13  | 
 |  14 // static | 
 |  15 void ChromeDriverInfoBarDelegate::CreateAndShow(Browser* browser) { | 
 |  16   std::unique_ptr<ChromeDriverInfoBarDelegate> delegate( | 
 |  17       new ChromeDriverInfoBarDelegate()); | 
 |  18   GlobalConfirmInfoBar::Show(std::move(delegate)); | 
 |  19 } | 
 |  20  | 
 |  21 ChromeDriverInfoBarDelegate::ChromeDriverInfoBarDelegate() {} | 
 |  22  | 
 |  23 ChromeDriverInfoBarDelegate::~ChromeDriverInfoBarDelegate() {} | 
 |  24  | 
 |  25 infobars::InfoBarDelegate::InfoBarIdentifier | 
 |  26 ChromeDriverInfoBarDelegate::GetIdentifier() const { | 
 |  27   return CHROMEDRIVER_INFOBAR_DELEGATE; | 
 |  28 } | 
 |  29  | 
 |  30 infobars::InfoBarDelegate::Type | 
 |  31 ChromeDriverInfoBarDelegate::GetInfoBarType() const { | 
 |  32   return PAGE_ACTION_TYPE; | 
 |  33 } | 
 |  34  | 
 |  35 gfx::VectorIconId ChromeDriverInfoBarDelegate::GetVectorIconId() const { | 
 |  36   return gfx::VectorIconId::PRODUCT; | 
 |  37 } | 
 |  38  | 
 |  39 base::string16 ChromeDriverInfoBarDelegate::GetMessageText() const { | 
 |  40   return l10n_util::GetStringUTF16(IDS_CONTROLLED_BY_CHROMEDRIVER); | 
 |  41 } | 
 |  42  | 
 |  43 int ChromeDriverInfoBarDelegate::GetButtons() const { | 
 |  44   return BUTTON_NONE; | 
 |  45 } | 
 |  46  | 
 |  47 base::string16 ChromeDriverInfoBarDelegate::GetLinkText() const { | 
 |  48   return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 
 |  49 } | 
 |  50  | 
 |  51 GURL ChromeDriverInfoBarDelegate::GetLinkURL() const { | 
 |  52   return GURL("http://chromedriver.chromium.org/"); | 
 |  53 } | 
 |  54  | 
 |  55 bool ChromeDriverInfoBarDelegate::ShouldExpire( | 
 |  56     const NavigationDetails& details) const { | 
 |  57   return false; | 
 |  58 } | 
| OLD | NEW |