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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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 "chrome/browser/ui/views/create_application_shortcut_view.h" 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 18 matching lines...) Expand all
29 #include "net/url_request/url_request.h" 29 #include "net/url_request/url_request.h"
30 #include "third_party/skia/include/core/SkBitmap.h" 30 #include "third_party/skia/include/core/SkBitmap.h"
31 #include "third_party/skia/include/core/SkPaint.h" 31 #include "third_party/skia/include/core/SkPaint.h"
32 #include "third_party/skia/include/core/SkRect.h" 32 #include "third_party/skia/include/core/SkRect.h"
33 #include "ui/base/l10n/l10n_util.h" 33 #include "ui/base/l10n/l10n_util.h"
34 #include "ui/base/resource/resource_bundle.h" 34 #include "ui/base/resource/resource_bundle.h"
35 #include "ui/gfx/canvas_skia.h" 35 #include "ui/gfx/canvas_skia.h"
36 #include "ui/gfx/codec/png_codec.h" 36 #include "ui/gfx/codec/png_codec.h"
37 #include "ui/views/layout/grid_layout.h" 37 #include "ui/views/layout/grid_layout.h"
38 #include "ui/views/layout/layout_constants.h" 38 #include "ui/views/layout/layout_constants.h"
39 #include "ui/views/widget/widget.h"
39 #include "views/controls/button/checkbox.h" 40 #include "views/controls/button/checkbox.h"
40 #include "views/controls/image_view.h" 41 #include "views/controls/image_view.h"
41 #include "views/controls/label.h" 42 #include "views/controls/label.h"
42 #include "views/widget/widget.h"
43 43
44 namespace { 44 namespace {
45 45
46 const int kAppIconSize = 32; 46 const int kAppIconSize = 32;
47 47
48 // AppInfoView shows the application icon and title. 48 // AppInfoView shows the application icon and title.
49 class AppInfoView : public views::View { 49 class AppInfoView : public views::View {
50 public: 50 public:
51 AppInfoView(const string16& title, 51 AppInfoView(const string16& title,
52 const string16& description, 52 const string16& description,
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 // Called by tracker_ when the app's icon is loaded. 523 // Called by tracker_ when the app's icon is loaded.
524 void CreateChromeApplicationShortcutView::OnImageLoaded( 524 void CreateChromeApplicationShortcutView::OnImageLoaded(
525 SkBitmap* image, const ExtensionResource& resource, int index) { 525 SkBitmap* image, const ExtensionResource& resource, int index) {
526 if (!image || image->isNull()) 526 if (!image || image->isNull())
527 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON); 527 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON);
528 528
529 shortcut_info_.favicon = *image; 529 shortcut_info_.favicon = *image;
530 CHECK(app_info_); 530 CHECK(app_info_);
531 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); 531 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon);
532 } 532 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/constrained_window_views.cc ('k') | chrome/browser/ui/views/critical_notification_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698