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

Side by Side Diff: chrome/browser/extensions/image_loading_tracker.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 #ifndef CHROME_BROWSER_EXTENSIONS_IMAGE_LOADING_TRACKER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_IMAGE_LOADING_TRACKER_H_
6 #define CHROME_BROWSER_EXTENSIONS_IMAGE_LOADING_TRACKER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_IMAGE_LOADING_TRACKER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // image was not found or it failed to decode. |resource| is the 52 // image was not found or it failed to decode. |resource| is the
53 // ExtensionResource where the |image| came from and the |index| represents 53 // ExtensionResource where the |image| came from and the |index| represents
54 // the index of the image just loaded (starts at 0 and increments every 54 // the index of the image just loaded (starts at 0 and increments every
55 // time LoadImage is called). 55 // time LoadImage is called).
56 virtual void OnImageLoaded(SkBitmap* image, 56 virtual void OnImageLoaded(SkBitmap* image,
57 const ExtensionResource& resource, 57 const ExtensionResource& resource,
58 int index) = 0; 58 int index) = 0;
59 }; 59 };
60 60
61 explicit ImageLoadingTracker(Observer* observer); 61 explicit ImageLoadingTracker(Observer* observer);
62 ~ImageLoadingTracker(); 62 virtual ~ImageLoadingTracker();
63 63
64 // Specify image resource to load. If the loaded image is larger than 64 // Specify image resource to load. If the loaded image is larger than
65 // |max_size| it will be resized to those dimensions. IMPORTANT NOTE: this 65 // |max_size| it will be resized to those dimensions. IMPORTANT NOTE: this
66 // function may call back your observer synchronously (ie before it returns) 66 // function may call back your observer synchronously (ie before it returns)
67 // if the image was found in the cache. 67 // if the image was found in the cache.
68 void LoadImage(const Extension* extension, 68 void LoadImage(const Extension* extension,
69 const ExtensionResource& resource, 69 const ExtensionResource& resource,
70 const gfx::Size& max_size, 70 const gfx::Size& max_size,
71 CacheParam cache); 71 CacheParam cache);
72 72
(...skipping 30 matching lines...) Expand all
103 // integer identifies the id assigned to the request. If the extension is 103 // integer identifies the id assigned to the request. If the extension is
104 // deleted while fetching the image the entry is removed from the map. 104 // deleted while fetching the image the entry is removed from the map.
105 LoadMap load_map_; 105 LoadMap load_map_;
106 106
107 NotificationRegistrar registrar_; 107 NotificationRegistrar registrar_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(ImageLoadingTracker); 109 DISALLOW_COPY_AND_ASSIGN(ImageLoadingTracker);
110 }; 110 };
111 111
112 #endif // CHROME_BROWSER_EXTENSIONS_IMAGE_LOADING_TRACKER_H_ 112 #endif // CHROME_BROWSER_EXTENSIONS_IMAGE_LOADING_TRACKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_ui.h ('k') | chrome/browser/extensions/user_script_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698