| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // The ID of the column set for the bubble. | 29 // The ID of the column set for the bubble. |
| 30 const int kColumnSetId = 0; | 30 const int kColumnSetId = 0; |
| 31 | 31 |
| 32 // The width of the left column. | 32 // The width of the left column. |
| 33 const int kLeftColumnWidth = 325; | 33 const int kLeftColumnWidth = 325; |
| 34 | 34 |
| 35 // Heading font size correction. | 35 // Heading font size correction. |
| 36 #if defined(CROS_FONTS_USING_BCI) | |
| 37 const int kHeadingFontSizeDelta = 0; | |
| 38 #else | |
| 39 const int kHeadingFontSizeDelta = 1; | 36 const int kHeadingFontSizeDelta = 1; |
| 40 #endif | |
| 41 | 37 |
| 42 class BundleInstalledBubble : public views::BubbleDelegateView, | 38 class BundleInstalledBubble : public views::BubbleDelegateView, |
| 43 public views::ButtonListener { | 39 public views::ButtonListener { |
| 44 public: | 40 public: |
| 45 BundleInstalledBubble(const BundleInstaller* bundle, | 41 BundleInstalledBubble(const BundleInstaller* bundle, |
| 46 View* anchor_view, | 42 View* anchor_view, |
| 47 views::BubbleBorder::ArrowLocation arrow_location) | 43 views::BubbleBorder::ArrowLocation arrow_location) |
| 48 : views::BubbleDelegateView(anchor_view, arrow_location) { | 44 : views::BubbleDelegateView(anchor_view, arrow_location) { |
| 49 GridLayout* layout = GridLayout::CreatePanel(this); | 45 GridLayout* layout = GridLayout::CreatePanel(this); |
| 50 SetLayoutManager(layout); | 46 SetLayoutManager(layout); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 }; | 156 }; |
| 161 | 157 |
| 162 } // namespace | 158 } // namespace |
| 163 | 159 |
| 164 void BundleInstaller::ShowInstalledBubble( | 160 void BundleInstaller::ShowInstalledBubble( |
| 165 const BundleInstaller* bundle, Browser* browser) { | 161 const BundleInstaller* bundle, Browser* browser) { |
| 166 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 162 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
| 167 views::View* anchor = browser_view->GetToolbarView()->app_menu(); | 163 views::View* anchor = browser_view->GetToolbarView()->app_menu(); |
| 168 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); | 164 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT); |
| 169 } | 165 } |
| OLD | NEW |