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

Side by Side Diff: extensions/browser/extension_icon_image.cc

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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
« no previous file with comments | « content/test/test_video_frame_provider.h ('k') | extensions/browser/image_loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_icon_image.h" 5 #include "extensions/browser/extension_icon_image.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
11 #include "extensions/browser/image_loader.h" 11 #include "extensions/browser/image_loader.h"
12 #include "extensions/browser/notification_types.h" 12 #include "extensions/browser/notification_types.h"
13 #include "extensions/common/extension.h" 13 #include "extensions/common/extension.h"
14 #include "ui/gfx/canvas.h" 14 #include "ui/gfx/canvas.h"
15 #include "ui/gfx/geometry/size.h"
16 #include "ui/gfx/geometry/size_conversions.h"
15 #include "ui/gfx/image/canvas_image_source.h" 17 #include "ui/gfx/image/canvas_image_source.h"
16 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
17 #include "ui/gfx/image/image_skia_operations.h" 19 #include "ui/gfx/image/image_skia_operations.h"
18 #include "ui/gfx/image/image_skia_source.h" 20 #include "ui/gfx/image/image_skia_source.h"
19 #include "ui/gfx/size.h"
20 #include "ui/gfx/size_conversions.h"
21 21
22 // The ImageSkia provided by extensions::IconImage contains ImageSkiaReps that 22 // The ImageSkia provided by extensions::IconImage contains ImageSkiaReps that
23 // are computed and updated using the following algorithm (if no default icon 23 // are computed and updated using the following algorithm (if no default icon
24 // was supplied, transparent icon is considered the default): 24 // was supplied, transparent icon is considered the default):
25 // - |LoadImageForScaleFactors()| searches the extension for an icon of an 25 // - |LoadImageForScaleFactors()| searches the extension for an icon of an
26 // appropriate size. If the extension doesn't have a icon resource needed for 26 // appropriate size. If the extension doesn't have a icon resource needed for
27 // the image representation, the default icon's representation for the 27 // the image representation, the default icon's representation for the
28 // requested scale factor is returned by ImageSkiaSource. 28 // requested scale factor is returned by ImageSkiaSource.
29 // - If the extension has the resource, IconImage tries to load it using 29 // - If the extension has the resource, IconImage tries to load it using
30 // ImageLoader. 30 // ImageLoader.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 const content::NotificationDetails& details) { 225 const content::NotificationDetails& details) {
226 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_REMOVED); 226 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_REMOVED);
227 227
228 const Extension* extension = content::Details<const Extension>(details).ptr(); 228 const Extension* extension = content::Details<const Extension>(details).ptr();
229 229
230 if (extension_ == extension) 230 if (extension_ == extension)
231 extension_ = NULL; 231 extension_ = NULL;
232 } 232 }
233 233
234 } // namespace extensions 234 } // namespace extensions
OLDNEW
« no previous file with comments | « content/test/test_video_frame_provider.h ('k') | extensions/browser/image_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698