| 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 "base/i18n/rtl.h" | 5 #include "base/i18n/rtl.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/extensions/bundle_installer.h" | 7 #include "chrome/browser/extensions/bundle_installer.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 10 #include "chrome/browser/ui/views/toolbar_view.h" | 10 #include "chrome/browser/ui/views/toolbar_view.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 extension_label->SizeToFit(kLeftColumnWidth); | 123 extension_label->SizeToFit(kLeftColumnWidth); |
| 124 layout->AddView(extension_label); | 124 layout->AddView(extension_label); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 void AddCloseButton(GridLayout* layout, views::ButtonListener* listener) { | 128 void AddCloseButton(GridLayout* layout, views::ButtonListener* listener) { |
| 129 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 129 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 130 | 130 |
| 131 views::ImageButton* button = new views::ImageButton(listener); | 131 views::ImageButton* button = new views::ImageButton(listener); |
| 132 button->SetImage(views::CustomButton::BS_NORMAL, | 132 button->SetImage(views::CustomButton::BS_NORMAL, |
| 133 rb.GetBitmapNamed(IDR_CLOSE_BAR)); | 133 rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); |
| 134 button->SetImage(views::CustomButton::BS_HOT, | 134 button->SetImage(views::CustomButton::BS_HOT, |
| 135 rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); | 135 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); |
| 136 button->SetImage(views::CustomButton::BS_PUSHED, | 136 button->SetImage(views::CustomButton::BS_PUSHED, |
| 137 rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); | 137 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); |
| 138 layout->AddView(button); | 138 layout->AddView(button); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void AddHeading(GridLayout* layout, const string16& heading) { | 141 void AddHeading(GridLayout* layout, const string16& heading) { |
| 142 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 142 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 143 gfx::Font bold_font = rb.GetFont(ui::ResourceBundle::BaseFont).DeriveFont( | 143 gfx::Font bold_font = rb.GetFont(ui::ResourceBundle::BaseFont).DeriveFont( |
| 144 kHeadingFontSizeDelta, gfx::Font::BOLD); | 144 kHeadingFontSizeDelta, gfx::Font::BOLD); |
| 145 | 145 |
| 146 views::Label* heading_label = new views::Label(heading, bold_font); | 146 views::Label* heading_label = new views::Label(heading, bold_font); |
| 147 heading_label->SetMultiLine(true); | 147 heading_label->SetMultiLine(true); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } // namespace | 162 } // namespace |
| 163 | 163 |
| 164 void BundleInstaller::ShowInstalledBubble( | 164 void BundleInstaller::ShowInstalledBubble( |
| 165 const BundleInstaller* bundle, Browser* browser) { | 165 const BundleInstaller* bundle, Browser* browser) { |
| 166 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 166 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
| 167 views::View* anchor = browser_view->GetToolbarView()->app_menu(); | 167 views::View* anchor = browser_view->GetToolbarView()->app_menu(); |
| 168 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); | 168 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); |
| 169 } | 169 } |
| OLD | NEW |