| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/default_browser_infobar_delegate.h" | 5 #include "chrome/browser/ui/startup/default_browser_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 9 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 10 #include "chrome/grit/chromium_strings.h" | 10 #include "chrome/grit/chromium_strings.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #else | 90 #else |
| 91 return PAGE_ACTION_TYPE; | 91 return PAGE_ACTION_TYPE; |
| 92 #endif | 92 #endif |
| 93 } | 93 } |
| 94 | 94 |
| 95 infobars::InfoBarDelegate::InfoBarIdentifier | 95 infobars::InfoBarDelegate::InfoBarIdentifier |
| 96 DefaultBrowserInfoBarDelegate::GetIdentifier() const { | 96 DefaultBrowserInfoBarDelegate::GetIdentifier() const { |
| 97 return DEFAULT_BROWSER_INFOBAR_DELEGATE; | 97 return DEFAULT_BROWSER_INFOBAR_DELEGATE; |
| 98 } | 98 } |
| 99 | 99 |
| 100 gfx::VectorIconId DefaultBrowserInfoBarDelegate::GetVectorIconId() const { | 100 int DefaultBrowserInfoBarDelegate::GetIconId() const { |
| 101 return gfx::VectorIconId::CHROME_PRODUCT; | 101 return IDR_PRODUCT_LOGO_32; |
| 102 } | 102 } |
| 103 | 103 |
| 104 #if defined(OS_WIN) | 104 #if defined(OS_WIN) |
| 105 gfx::Image DefaultBrowserInfoBarDelegate::GetIcon() const { | 105 gfx::Image DefaultBrowserInfoBarDelegate::GetIcon() const { |
| 106 // Experiment for the chrome product icon used on the default browser | 106 // Experiment for the chrome product icon used on the default browser |
| 107 // prompt. | 107 // prompt. |
| 108 std::string icon_color = variations::GetVariationParamValue( | 108 std::string icon_color = variations::GetVariationParamValue( |
| 109 kDefaultBrowserPromptStyle, "IconColor"); | 109 kDefaultBrowserPromptStyle, "IconColor"); |
| 110 if (icon_color == "Colored") { | 110 if (icon_color == "Colored") { |
| 111 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 111 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 const shell_integration::DefaultWebClientWorkerCallback& callback) { | 190 const shell_integration::DefaultWebClientWorkerCallback& callback) { |
| 191 return new shell_integration::DefaultBrowserWorker(callback); | 191 return new shell_integration::DefaultBrowserWorker(callback); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void DefaultBrowserInfoBarDelegate::OnSetAsDefaultFinished( | 194 void DefaultBrowserInfoBarDelegate::OnSetAsDefaultFinished( |
| 195 shell_integration::DefaultWebClientState state) { | 195 shell_integration::DefaultWebClientState state) { |
| 196 infobar()->owner()->RemoveInfoBar(infobar()); | 196 infobar()->owner()->RemoveInfoBar(infobar()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace chrome | 199 } // namespace chrome |
| OLD | NEW |