Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.cc

Issue 7835039: Implement the inline extensions/apps install UI for Cocoa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698