| 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/extensions/app_metro_infobar_delegate_win.h" | 5 #include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h" |
| 6 | 6 |
| 7 #include "apps/app_launch_for_metro_restart_win.h" | 7 #include "apps/app_launch_for_metro_restart_win.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 Mode mode, | 62 Mode mode, |
| 63 const std::string& extension_id) | 63 const std::string& extension_id) |
| 64 : ConfirmInfoBarDelegate(info_bar_service), | 64 : ConfirmInfoBarDelegate(info_bar_service), |
| 65 mode_(mode), | 65 mode_(mode), |
| 66 extension_id_(extension_id) { | 66 extension_id_(extension_id) { |
| 67 DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty()); | 67 DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {} | 70 AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {} |
| 71 | 71 |
| 72 gfx::Image* AppMetroInfoBarDelegateWin::GetIcon() const { | 72 int AppMetroInfoBarDelegateWin::GetIconID() const { |
| 73 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 73 return chrome::GetAppListIconResourceId(); |
| 74 chrome::GetAppListIconResourceId()); | |
| 75 } | 74 } |
| 76 | 75 |
| 77 string16 AppMetroInfoBarDelegateWin::GetMessageText() const { | 76 string16 AppMetroInfoBarDelegateWin::GetMessageText() const { |
| 78 return l10n_util::GetStringUTF16(mode_ == SHOW_APP_LIST ? | 77 return l10n_util::GetStringUTF16(mode_ == SHOW_APP_LIST ? |
| 79 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_APP_LIST : | 78 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_APP_LIST : |
| 80 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_PACKAGED_APP); | 79 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_PACKAGED_APP); |
| 81 } | 80 } |
| 82 | 81 |
| 83 string16 AppMetroInfoBarDelegateWin::GetButtonLabel( | 82 string16 AppMetroInfoBarDelegateWin::GetButtonLabel( |
| 84 InfoBarButton button) const { | 83 InfoBarButton button) const { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 content::OpenURLParams params( | 115 content::OpenURLParams params( |
| 117 GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"), | 116 GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"), |
| 118 content::Referrer(), | 117 content::Referrer(), |
| 119 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 118 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
| 120 content::PAGE_TRANSITION_LINK, false); | 119 content::PAGE_TRANSITION_LINK, false); |
| 121 web_contents()->OpenURL(params); | 120 web_contents()->OpenURL(params); |
| 122 return false; | 121 return false; |
| 123 } | 122 } |
| 124 | 123 |
| 125 } // namespace chrome | 124 } // namespace chrome |
| OLD | NEW |