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/views/extensions/extension_installed_bubble_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 manage_->SetMultiLine(true); | 209 manage_->SetMultiLine(true); |
210 manage_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 210 manage_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
211 AddChildView(manage_); | 211 AddChildView(manage_); |
212 } | 212 } |
213 | 213 |
214 if (flavors_ & SIGN_IN_PROMO) { | 214 if (flavors_ & SIGN_IN_PROMO) { |
215 signin_promo_text_ = | 215 signin_promo_text_ = |
216 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_SIGNIN_PROMO); | 216 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_SIGNIN_PROMO); |
217 | 217 |
218 signin_promo_link_text_ = | 218 signin_promo_link_text_ = |
219 l10n_util::GetStringFUTF16( | 219 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_SIGNIN_PROMO_LINK); |
220 IDS_EXTENSION_INSTALLED_SIGNIN_PROMO_LINK, | |
221 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); | |
222 sign_in_link_ = new views::Link(signin_promo_link_text_); | 220 sign_in_link_ = new views::Link(signin_promo_link_text_); |
223 sign_in_link_->SetFontList(font_list); | 221 sign_in_link_->SetFontList(font_list); |
224 sign_in_link_->set_listener(this); | 222 sign_in_link_->set_listener(this); |
225 AddChildView(sign_in_link_); | 223 AddChildView(sign_in_link_); |
226 } | 224 } |
227 | 225 |
228 // Add the Close button (for all flavors). | 226 // Add the Close button (for all flavors). |
229 close_button_ = new views::ImageButton(this); | 227 close_button_ = new views::ImageButton(this); |
230 close_button_->SetImage(views::CustomButton::STATE_NORMAL, | 228 close_button_->SetImage(views::CustomButton::STATE_NORMAL, |
231 rb.GetImageSkiaNamed(IDR_CLOSE_2)); | 229 rb.GetImageSkiaNamed(IDR_CLOSE_2)); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 void ExtensionInstalledBubbleView::WindowClosing() { | 606 void ExtensionInstalledBubbleView::WindowClosing() { |
609 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) { | 607 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) { |
610 BrowserView* browser_view = | 608 BrowserView* browser_view = |
611 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); | 609 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); |
612 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 610 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
613 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> | 611 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> |
614 GetPageAction(*bubble_.extension()), | 612 GetPageAction(*bubble_.extension()), |
615 false); // preview_enabled | 613 false); // preview_enabled |
616 } | 614 } |
617 } | 615 } |
OLD | NEW |