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

Side by Side Diff: chrome/browser/ui/webui/theme_source.h

Issue 2476433002: Replace URLDataSource::MessageLoopForRequestPath() with TaskRunnerForRequestPath(). (Closed)
Patch Set: rebase off local branch Created 4 years, 1 month 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
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_UI_WEBUI_THEME_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 12 matching lines...) Expand all
23 explicit ThemeSource(Profile* profile); 23 explicit ThemeSource(Profile* profile);
24 ~ThemeSource() override; 24 ~ThemeSource() override;
25 25
26 // content::URLDataSource implementation. 26 // content::URLDataSource implementation.
27 std::string GetSource() const override; 27 std::string GetSource() const override;
28 void StartDataRequest( 28 void StartDataRequest(
29 const std::string& path, 29 const std::string& path,
30 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 30 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
31 const content::URLDataSource::GotDataCallback& callback) override; 31 const content::URLDataSource::GotDataCallback& callback) override;
32 std::string GetMimeType(const std::string& path) const override; 32 std::string GetMimeType(const std::string& path) const override;
33 base::MessageLoop* MessageLoopForRequestPath( 33 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath(
34 const std::string& path) const override; 34 const std::string& path) const override;
35 bool ShouldServiceRequest(const net::URLRequest* request) const override; 35 bool ShouldServiceRequest(const net::URLRequest* request) const override;
36 36
37 private: 37 private:
38 // Fetches and sends the theme bitmap. 38 // Fetches and sends the theme bitmap.
39 void SendThemeBitmap(const content::URLDataSource::GotDataCallback& callback, 39 void SendThemeBitmap(const content::URLDataSource::GotDataCallback& callback,
40 int resource_id, 40 int resource_id,
41 float scale); 41 float scale);
42 42
43 // Used in place of SendThemeBitmap when the desired scale is larger than 43 // Used in place of SendThemeBitmap when the desired scale is larger than
44 // what the resource bundle supports. This can rescale the provided bitmap up 44 // what the resource bundle supports. This can rescale the provided bitmap up
45 // to the desired size. 45 // to the desired size.
46 void SendThemeImage(const content::URLDataSource::GotDataCallback& callback, 46 void SendThemeImage(const content::URLDataSource::GotDataCallback& callback,
47 int resource_id, 47 int resource_id,
48 float scale); 48 float scale);
49 49
50 // The profile this object was initialized with. 50 // The profile this object was initialized with.
51 Profile* profile_; 51 Profile* profile_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(ThemeSource); 53 DISALLOW_COPY_AND_ASSIGN(ThemeSource);
54 }; 54 };
55 55
56 #endif // CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_ 56 #endif // CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_list_source.cc ('k') | chrome/browser/ui/webui/theme_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698