| 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/strings/utf_string_conversions.h" | 6 #include "base/strings/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/toolbar_view.h" | 10 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 views::Label* heading_label = new views::Label( | 134 views::Label* heading_label = new views::Label( |
| 135 heading, rb.GetFontList(ui::ResourceBundle::MediumFont)); | 135 heading, rb.GetFontList(ui::ResourceBundle::MediumFont)); |
| 136 heading_label->SetMultiLine(true); | 136 heading_label->SetMultiLine(true); |
| 137 heading_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 137 heading_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 138 heading_label->SizeToFit(kLeftColumnWidth); | 138 heading_label->SizeToFit(kLeftColumnWidth); |
| 139 layout->AddView(heading_label); | 139 layout->AddView(heading_label); |
| 140 } | 140 } |
| 141 | 141 |
| 142 // views::ButtonListener implementation: | 142 // views::ButtonListener implementation: |
| 143 virtual void ButtonPressed(views::Button* sender, | 143 virtual void ButtonPressed(views::Button* sender, |
| 144 const ui::Event& event) OVERRIDE { | 144 const ui::Event& event) override { |
| 145 GetWidget()->Close(); | 145 GetWidget()->Close(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubble); | 148 DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubble); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace | 151 } // namespace |
| 152 | 152 |
| 153 void BundleInstaller::ShowInstalledBubble( | 153 void BundleInstaller::ShowInstalledBubble( |
| 154 const BundleInstaller* bundle, Browser* browser) { | 154 const BundleInstaller* bundle, Browser* browser) { |
| 155 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 155 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
| 156 views::View* anchor = browser_view->GetToolbarView()->app_menu(); | 156 views::View* anchor = browser_view->GetToolbarView()->app_menu(); |
| 157 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); | 157 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); |
| 158 } | 158 } |
| OLD | NEW |