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

Side by Side Diff: chrome/browser/icon_loader.h

Issue 2953633002: Move the IconLoader to use the task scheduler. (Closed)
Patch Set: Created 3 years, 6 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 | chrome/browser/icon_loader.cc » ('j') | chrome/browser/icon_loader.cc » ('J')
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 #ifndef CHROME_BROWSER_ICON_LOADER_H_ 5 #ifndef CHROME_BROWSER_ICON_LOADER_H_
6 #define CHROME_BROWSER_ICON_LOADER_H_ 6 #define CHROME_BROWSER_ICON_LOADER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 private: 59 private:
60 IconLoader(const base::FilePath& file_path, 60 IconLoader(const base::FilePath& file_path,
61 IconSize size, 61 IconSize size,
62 IconLoadedCallback callback); 62 IconLoadedCallback callback);
63 63
64 ~IconLoader(); 64 ~IconLoader();
65 65
66 // Given a file path, get the group for the given file. 66 // Given a file path, get the group for the given file.
67 static IconGroup GroupForFilepath(const base::FilePath& file_path); 67 static IconGroup GroupForFilepath(const base::FilePath& file_path);
68 68
69 // The thread ReadIcon() should be called on. 69 // Whether ReadIcon() must be called on the UI thread.
70 static content::BrowserThread::ID ReadIconThreadID(); 70 static bool ReadIconRequiresUIThread();
71 71
72 void ReadGroup(); 72 void ReadGroup();
73 void OnReadGroup(); 73 void OnReadGroup();
74 void ReadIcon(); 74 void ReadIcon();
75 75
76 // The task runner object of the thread in which we notify the delegate. 76 // The task runner object of the thread in which we notify the delegate.
77 scoped_refptr<base::SingleThreadTaskRunner> target_task_runner_; 77 scoped_refptr<base::SingleThreadTaskRunner> target_task_runner_;
78 78
79 base::FilePath file_path_; 79 base::FilePath file_path_;
80 80
81 IconGroup group_; 81 IconGroup group_;
82 82
83 IconSize icon_size_; 83 IconSize icon_size_;
84 84
85 IconLoadedCallback callback_; 85 IconLoadedCallback callback_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(IconLoader); 87 DISALLOW_COPY_AND_ASSIGN(IconLoader);
88 }; 88 };
89 89
90 #endif // CHROME_BROWSER_ICON_LOADER_H_ 90 #endif // CHROME_BROWSER_ICON_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/icon_loader.cc » ('j') | chrome/browser/icon_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698