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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 extension_label->SizeToFit(kLeftColumnWidth); | 116 extension_label->SizeToFit(kLeftColumnWidth); |
117 layout->AddView(extension_label); | 117 layout->AddView(extension_label); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 void AddCloseButton(GridLayout* layout, views::ButtonListener* listener) { | 121 void AddCloseButton(GridLayout* layout, views::ButtonListener* listener) { |
122 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 122 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
123 | 123 |
124 views::ImageButton* button = new views::ImageButton(listener); | 124 views::ImageButton* button = new views::ImageButton(listener); |
125 button->SetImage(views::CustomButton::STATE_NORMAL, | 125 button->SetImage(views::CustomButton::STATE_NORMAL, |
126 rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); | 126 rb.GetImageSkiaNamed(IDR_CLOSE_2)); |
127 button->SetImage(views::CustomButton::STATE_HOVERED, | 127 button->SetImage(views::CustomButton::STATE_HOVERED, |
128 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); | 128 rb.GetImageSkiaNamed(IDR_CLOSE_2_H)); |
129 button->SetImage(views::CustomButton::STATE_PRESSED, | 129 button->SetImage(views::CustomButton::STATE_PRESSED, |
130 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); | 130 rb.GetImageSkiaNamed(IDR_CLOSE_2_P)); |
131 layout->AddView(button); | 131 layout->AddView(button); |
132 } | 132 } |
133 | 133 |
134 void AddHeading(GridLayout* layout, const string16& heading) { | 134 void AddHeading(GridLayout* layout, const string16& heading) { |
135 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 135 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
136 views::Label* heading_label = new views::Label( | 136 views::Label* heading_label = new views::Label( |
137 heading, rb.GetFont(ui::ResourceBundle::MediumFont)); | 137 heading, rb.GetFont(ui::ResourceBundle::MediumFont)); |
138 heading_label->SetMultiLine(true); | 138 heading_label->SetMultiLine(true); |
139 heading_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 139 heading_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
140 heading_label->SizeToFit(kLeftColumnWidth); | 140 heading_label->SizeToFit(kLeftColumnWidth); |
(...skipping 10 matching lines...) Expand all Loading... |
151 }; | 151 }; |
152 | 152 |
153 } // namespace | 153 } // namespace |
154 | 154 |
155 void BundleInstaller::ShowInstalledBubble( | 155 void BundleInstaller::ShowInstalledBubble( |
156 const BundleInstaller* bundle, Browser* browser) { | 156 const BundleInstaller* bundle, Browser* browser) { |
157 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 157 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
158 views::View* anchor = browser_view->GetToolbarView()->app_menu(); | 158 views::View* anchor = browser_view->GetToolbarView()->app_menu(); |
159 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); | 159 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); |
160 } | 160 } |
OLD | NEW |