Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_installed_bubble.cc

Issue 8835003: extensions: remove install/uninstall terminology (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 gfx::Size size(icon->width(), icon->height()); 105 gfx::Size size(icon->width(), icon->height());
106 if (size.width() > kIconSize || size.height() > kIconSize) 106 if (size.width() > kIconSize || size.height() > kIconSize)
107 size = gfx::Size(kIconSize, kIconSize); 107 size = gfx::Size(kIconSize, kIconSize);
108 icon_ = new views::ImageView(); 108 icon_ = new views::ImageView();
109 icon_->SetImageSize(size); 109 icon_->SetImageSize(size);
110 icon_->SetImage(*icon); 110 icon_->SetImage(*icon);
111 AddChildView(icon_); 111 AddChildView(icon_);
112 112
113 string16 extension_name = UTF8ToUTF16(extension->name()); 113 string16 extension_name = UTF8ToUTF16(extension->name());
114 base::i18n::AdjustStringForLocaleDirection(&extension_name); 114 base::i18n::AdjustStringForLocaleDirection(&extension_name);
115 heading_ = new views::Label( 115 heading_ = new views::Label(l10n_util::GetStringFUTF16(
116 l10n_util::GetStringFUTF16(IDS_EXTENSION_INSTALLED_HEADING, 116 IDS_EXTENSION_INSTALLED_HEADING,
117 extension_name)); 117 extension_name,
118 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
118 heading_->SetFont(rb.GetFont(ResourceBundle::MediumFont)); 119 heading_->SetFont(rb.GetFont(ResourceBundle::MediumFont));
119 heading_->SetMultiLine(true); 120 heading_->SetMultiLine(true);
120 heading_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 121 heading_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
121 AddChildView(heading_); 122 AddChildView(heading_);
122 123
123 switch (type_) { 124 switch (type_) {
124 case ExtensionInstalledBubble::PAGE_ACTION: { 125 case ExtensionInstalledBubble::PAGE_ACTION: {
125 info_ = new views::Label(l10n_util::GetStringUTF16( 126 info_ = new views::Label(l10n_util::GetStringUTF16(
126 IDS_EXTENSION_INSTALLED_PAGE_ACTION_INFO)); 127 IDS_EXTENSION_INSTALLED_PAGE_ACTION_INFO));
127 info_->SetFont(font); 128 info_->SetFont(font);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 415 }
415 416
416 void ExtensionInstalledBubble::WindowClosing() { 417 void ExtensionInstalledBubble::WindowClosing() {
417 if (extension_ && type_ == PAGE_ACTION) { 418 if (extension_ && type_ == PAGE_ACTION) {
418 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); 419 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
419 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( 420 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction(
420 extension_->page_action(), 421 extension_->page_action(),
421 false); // preview_enabled 422 false); // preview_enabled
422 } 423 }
423 } 424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698