| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 manage_ = new views::Label( | 218 manage_ = new views::Label( |
| 219 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_MANAGE_INFO)); | 219 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_MANAGE_INFO)); |
| 220 manage_->SetFont(font); | 220 manage_->SetFont(font); |
| 221 manage_->SetMultiLine(true); | 221 manage_->SetMultiLine(true); |
| 222 manage_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 222 manage_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 223 AddChildView(manage_); | 223 AddChildView(manage_); |
| 224 } | 224 } |
| 225 | 225 |
| 226 close_button_ = new views::ImageButton(this); | 226 close_button_ = new views::ImageButton(this); |
| 227 close_button_->SetImage(views::CustomButton::BS_NORMAL, | 227 close_button_->SetImage(views::CustomButton::BS_NORMAL, |
| 228 rb.GetBitmapNamed(IDR_CLOSE_BAR)); | 228 rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); |
| 229 close_button_->SetImage(views::CustomButton::BS_HOT, | 229 close_button_->SetImage(views::CustomButton::BS_HOT, |
| 230 rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); | 230 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); |
| 231 close_button_->SetImage(views::CustomButton::BS_PUSHED, | 231 close_button_->SetImage(views::CustomButton::BS_PUSHED, |
| 232 rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); | 232 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); |
| 233 AddChildView(close_button_); | 233 AddChildView(close_button_); |
| 234 } | 234 } |
| 235 | 235 |
| 236 virtual void ButtonPressed(views::Button* sender, const views::Event& event) { | 236 virtual void ButtonPressed(views::Button* sender, const views::Event& event) { |
| 237 if (sender == close_button_) | 237 if (sender == close_button_) |
| 238 bubble_->StartFade(false); | 238 bubble_->StartFade(false); |
| 239 else | 239 else |
| 240 NOTREACHED() << "Unknown view"; | 240 NOTREACHED() << "Unknown view"; |
| 241 } | 241 } |
| 242 | 242 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 } | 474 } |
| 475 | 475 |
| 476 void ExtensionInstalledBubble::WindowClosing() { | 476 void ExtensionInstalledBubble::WindowClosing() { |
| 477 if (extension_ && type_ == PAGE_ACTION) { | 477 if (extension_ && type_ == PAGE_ACTION) { |
| 478 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); | 478 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); |
| 479 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 479 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
| 480 extension_->page_action(), | 480 extension_->page_action(), |
| 481 false); // preview_enabled | 481 false); // preview_enabled |
| 482 } | 482 } |
| 483 } | 483 } |
| OLD | NEW |