OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); | 229 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); |
230 sign_in_link_ = new views::Link(signin_promo_link_text_); | 230 sign_in_link_ = new views::Link(signin_promo_link_text_); |
231 sign_in_link_->SetFont(font); | 231 sign_in_link_->SetFont(font); |
232 sign_in_link_->set_listener(this); | 232 sign_in_link_->set_listener(this); |
233 AddChildView(sign_in_link_); | 233 AddChildView(sign_in_link_); |
234 } | 234 } |
235 | 235 |
236 // Add the Close button (for all flavors). | 236 // Add the Close button (for all flavors). |
237 close_button_ = new views::ImageButton(this); | 237 close_button_ = new views::ImageButton(this); |
238 close_button_->SetImage(views::CustomButton::STATE_NORMAL, | 238 close_button_->SetImage(views::CustomButton::STATE_NORMAL, |
239 rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); | 239 rb.GetImageSkiaNamed(IDR_CLOSE_2)); |
240 close_button_->SetImage(views::CustomButton::STATE_HOVERED, | 240 close_button_->SetImage(views::CustomButton::STATE_HOVERED, |
241 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); | 241 rb.GetImageSkiaNamed(IDR_CLOSE_2_H)); |
242 close_button_->SetImage(views::CustomButton::STATE_PRESSED, | 242 close_button_->SetImage(views::CustomButton::STATE_PRESSED, |
243 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); | 243 rb.GetImageSkiaNamed(IDR_CLOSE_2_P)); |
244 AddChildView(close_button_); | 244 AddChildView(close_button_); |
245 } | 245 } |
246 | 246 |
247 virtual void ButtonPressed(views::Button* sender, | 247 virtual void ButtonPressed(views::Button* sender, |
248 const ui::Event& event) OVERRIDE { | 248 const ui::Event& event) OVERRIDE { |
249 if (sender == close_button_) | 249 if (sender == close_button_) |
250 bubble_->StartFade(false); | 250 bubble_->StartFade(false); |
251 else | 251 else |
252 NOTREACHED() << "Unknown view"; | 252 NOTREACHED() << "Unknown view"; |
253 } | 253 } |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 | 662 |
663 void ExtensionInstalledBubble::WindowClosing() { | 663 void ExtensionInstalledBubble::WindowClosing() { |
664 if (extension_ && type_ == PAGE_ACTION) { | 664 if (extension_ && type_ == PAGE_ACTION) { |
665 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); | 665 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); |
666 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 666 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
667 extensions::ExtensionActionManager::Get(browser_->profile())-> | 667 extensions::ExtensionActionManager::Get(browser_->profile())-> |
668 GetPageAction(*extension_), | 668 GetPageAction(*extension_), |
669 false); // preview_enabled | 669 false); // preview_enabled |
670 } | 670 } |
671 } | 671 } |
OLD | NEW |