| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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/startup/automation_infobar_delegate.h" | 5 #include "chrome/browser/ui/startup/automation_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/devtools/global_confirm_info_bar.h" | 7 #include "chrome/browser/devtools/global_confirm_info_bar.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
| 10 #include "components/infobars/core/infobar.h" | 10 #include "components/infobars/core/infobar.h" |
| 11 #include "components/strings/grit/components_strings.h" | |
| 12 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
| 13 | 12 |
| 14 // static | 13 // static |
| 15 void AutomationInfoBarDelegate::Create() { | 14 void AutomationInfoBarDelegate::Create() { |
| 16 std::unique_ptr<ConfirmInfoBarDelegate> delegate( | 15 std::unique_ptr<ConfirmInfoBarDelegate> delegate( |
| 17 new AutomationInfoBarDelegate()); | 16 new AutomationInfoBarDelegate()); |
| 18 GlobalConfirmInfoBar::Show(std::move(delegate)); | 17 GlobalConfirmInfoBar::Show(std::move(delegate)); |
| 19 } | 18 } |
| 20 | 19 |
| 21 AutomationInfoBarDelegate::AutomationInfoBarDelegate() {} | 20 AutomationInfoBarDelegate::AutomationInfoBarDelegate() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 return false; | 31 return false; |
| 33 } | 32 } |
| 34 | 33 |
| 35 base::string16 AutomationInfoBarDelegate::GetMessageText() const { | 34 base::string16 AutomationInfoBarDelegate::GetMessageText() const { |
| 36 return l10n_util::GetStringUTF16(IDS_CONTROLLED_BY_AUTOMATION); | 35 return l10n_util::GetStringUTF16(IDS_CONTROLLED_BY_AUTOMATION); |
| 37 } | 36 } |
| 38 | 37 |
| 39 int AutomationInfoBarDelegate::GetButtons() const { | 38 int AutomationInfoBarDelegate::GetButtons() const { |
| 40 return BUTTON_NONE; | 39 return BUTTON_NONE; |
| 41 } | 40 } |
| OLD | NEW |