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

Side by Side Diff: ppapi/proxy/ppb_image_data_proxy.cc

Issue 14307011: ppapi: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/proxy/ppb_image_data_proxy.h" 5 #include "ppapi/proxy/ppb_image_data_proxy.h"
6 6
7 #include <string.h> // For memcpy 7 #include <string.h> // For memcpy
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Go to the next location, wrapping around to get LRU. 210 // Go to the next location, wrapping around to get LRU.
211 next_insertion_point_++; 211 next_insertion_point_++;
212 if (next_insertion_point_ >= kCacheSize) 212 if (next_insertion_point_ >= kCacheSize)
213 next_insertion_point_ = 0; 213 next_insertion_point_ = 0;
214 } 214 }
215 215
216 // ImageDataCache -------------------------------------------------------------- 216 // ImageDataCache --------------------------------------------------------------
217 217
218 class ImageDataCache { 218 class ImageDataCache {
219 public: 219 public:
220 ImageDataCache() : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {} 220 ImageDataCache() : weak_factory_(this) {}
221 ~ImageDataCache() {} 221 ~ImageDataCache() {}
222 222
223 static ImageDataCache* GetInstance(); 223 static ImageDataCache* GetInstance();
224 224
225 // Retrieves an image data from the cache of the specified size and format if 225 // Retrieves an image data from the cache of the specified size and format if
226 // one exists. If one doesn't exist, this will return a null refptr. 226 // one exists. If one doesn't exist, this will return a null refptr.
227 scoped_refptr<ImageData> Get(PP_Instance instance, 227 scoped_refptr<ImageData> Get(PP_Instance instance,
228 int width, int height, 228 int width, int height,
229 PP_ImageDataFormat format); 229 PP_ImageDataFormat format);
230 230
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 // still cached in our process, the proxy still holds a reference so we can 628 // still cached in our process, the proxy still holds a reference so we can
629 // remove the one the renderer just sent is. If the proxy no longer holds a 629 // remove the one the renderer just sent is. If the proxy no longer holds a
630 // reference, we released everything and we should also release the one the 630 // reference, we released everything and we should also release the one the
631 // renderer just sent us. 631 // renderer just sent us.
632 dispatcher()->Send(new PpapiHostMsg_PPBCore_ReleaseResource( 632 dispatcher()->Send(new PpapiHostMsg_PPBCore_ReleaseResource(
633 API_ID_PPB_CORE, old_image_data)); 633 API_ID_PPB_CORE, old_image_data));
634 } 634 }
635 635
636 } // namespace proxy 636 } // namespace proxy
637 } // namespace ppapi 637 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698