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

Side by Side Diff: android_webview/browser/global_tile_manager.h

Issue 264213003: Update a comment. It was not accurate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: meh Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 #ifndef ANDROID_WEBVIEW_BROWSER_GLOBAL_TILE_MANAGER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_GLOBAL_TILE_MANAGER_H_
6 #define ANDROID_WEBVIEW_BROWSER_GLOBAL_TILE_MANAGER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_GLOBAL_TILE_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 13 matching lines...) Expand all
24 class GlobalTileManager { 24 class GlobalTileManager {
25 private: 25 private:
26 typedef std::list<GlobalTileManagerClient*> ListType; 26 typedef std::list<GlobalTileManagerClient*> ListType;
27 27
28 public: 28 public:
29 typedef ListType::iterator Key; 29 typedef ListType::iterator Key;
30 static GlobalTileManager* GetInstance(); 30 static GlobalTileManager* GetInstance();
31 31
32 // Requests the |num_of_tiles| from the available global pool. Calls 32 // Requests the |num_of_tiles| from the available global pool. Calls
33 // GlobalTileManagerClient.SetNumTiles after the manager determines how many 33 // GlobalTileManagerClient.SetNumTiles after the manager determines how many
34 // tiles are available for the client. The tile policy on the clients are not 34 // tiles are available for the client. If the number of tiles left is not
35 // immediately enforced, unless |effective_immediately| is true. If the 35 // enough to satisfy the request, the manager will evict tiles allocated to
36 // number of tiles left are not enough to satisfy the request, the manager 36 // other clients.
37 // will evict tiles allocated to other clients.
38 void RequestTiles(size_t new_num_of_tiles, Key key); 37 void RequestTiles(size_t new_num_of_tiles, Key key);
39 38
40 Key PushBack(GlobalTileManagerClient* client); 39 Key PushBack(GlobalTileManagerClient* client);
41 40
42 // |key| must be already in manager. Move the tile manager client 41 // |key| must be already in manager. Move the tile manager client
43 // corresponding to |key| to most recent. This function should be called after 42 // corresponding to |key| to most recent. This function should be called after
44 // RequestTiles. 43 // RequestTiles.
45 void DidUse(Key key); 44 void DidUse(Key key);
46 45
47 void Remove(Key key); 46 void Remove(Key key);
(...skipping 17 matching lines...) Expand all
65 size_t total_allocated_tiles_; 64 size_t total_allocated_tiles_;
66 ListType mru_list_; 65 ListType mru_list_;
67 base::SequenceChecker sequence_checker_; 66 base::SequenceChecker sequence_checker_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(GlobalTileManager); 68 DISALLOW_COPY_AND_ASSIGN(GlobalTileManager);
70 }; 69 };
71 70
72 } // namespace android_webview 71 } // namespace android_webview
73 72
74 #endif // ANDROID_WEBVIEW_BROWSER_GLOBAL_TILE_MANAGER_H_ 73 #endif // ANDROID_WEBVIEW_BROWSER_GLOBAL_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698