| OLD | NEW |
| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_install_dialog.h" | 9 #include "chrome/browser/extensions/extension_install_dialog.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 // Heading font size correction. | 43 // Heading font size correction. |
| 44 #if defined(CROS_FONTS_USING_BCI) | 44 #if defined(CROS_FONTS_USING_BCI) |
| 45 const int kHeadingFontSizeDelta = 0; | 45 const int kHeadingFontSizeDelta = 0; |
| 46 #else | 46 #else |
| 47 const int kHeadingFontSizeDelta = 1; | 47 const int kHeadingFontSizeDelta = 1; |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 const int kRatingFontSizeDelta = -1; | 50 const int kRatingFontSizeDelta = -1; |
| 51 | 51 |
| 52 void AddResourceIcon(int resource_id, views::View* parent) { | 52 void AddResourceIcon(const SkBitmap* skia_image, views::View* parent) { |
| 53 const SkBitmap* skia_image = ResourceBundle::GetSharedInstance(). | |
| 54 GetBitmapNamed(resource_id); | |
| 55 views::ImageView* image_view = new views::ImageView(); | 53 views::ImageView* image_view = new views::ImageView(); |
| 56 image_view->SetImage(*skia_image); | 54 image_view->SetImage(*skia_image); |
| 57 parent->AddChildView(image_view); | 55 parent->AddChildView(image_view); |
| 58 } | 56 } |
| 59 | 57 |
| 60 } // namespace | 58 } // namespace |
| 61 | 59 |
| 62 // Implements the extension installation dialog for TOOLKIT_VIEWS. | 60 // Implements the extension installation dialog for TOOLKIT_VIEWS. |
| 63 class ExtensionInstallDialogView : public views::DialogDelegateView, | 61 class ExtensionInstallDialogView : public views::DialogDelegateView, |
| 64 public views::LinkListener { | 62 public views::LinkListener { |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 327 } |
| 330 | 328 |
| 331 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( | 329 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( |
| 332 delegate, extension, icon, prompt); | 330 delegate, extension, icon, prompt); |
| 333 | 331 |
| 334 views::Widget* window = browser::CreateViewsWindow( | 332 views::Widget* window = browser::CreateViewsWindow( |
| 335 browser_window->GetNativeHandle(), dialog); | 333 browser_window->GetNativeHandle(), dialog); |
| 336 | 334 |
| 337 window->Show(); | 335 window->Show(); |
| 338 } | 336 } |
| OLD | NEW |