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

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

Issue 2634413002: Faster Reload: Specify AllowCaching = false for some URLDataSources that need it (Closed)
Patch Set: Created 3 years, 11 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 | « chrome/browser/ui/webui/large_icon_source.cc ('k') | chrome/browser/ui/webui/theme_source.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 #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 10 matching lines...) Expand all
21 21
22 // content::URLDataSource implementation. 22 // content::URLDataSource implementation.
23 std::string GetSource() const override; 23 std::string GetSource() const override;
24 void StartDataRequest( 24 void StartDataRequest(
25 const std::string& path, 25 const std::string& path,
26 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 26 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
27 const content::URLDataSource::GotDataCallback& callback) override; 27 const content::URLDataSource::GotDataCallback& callback) override;
28 std::string GetMimeType(const std::string& path) const override; 28 std::string GetMimeType(const std::string& path) const override;
29 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath( 29 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath(
30 const std::string& path) const override; 30 const std::string& path) const override;
31 bool AllowCaching() const override;
31 bool ShouldServiceRequest(const net::URLRequest* request) const override; 32 bool ShouldServiceRequest(const net::URLRequest* request) const override;
32 33
33 private: 34 private:
34 // Fetches and sends the theme bitmap. 35 // Fetches and sends the theme bitmap.
35 void SendThemeBitmap(const content::URLDataSource::GotDataCallback& callback, 36 void SendThemeBitmap(const content::URLDataSource::GotDataCallback& callback,
36 int resource_id, 37 int resource_id,
37 float scale); 38 float scale);
38 39
39 // Used in place of SendThemeBitmap when the desired scale is larger than 40 // Used in place of SendThemeBitmap when the desired scale is larger than
40 // what the resource bundle supports. This can rescale the provided bitmap up 41 // what the resource bundle supports. This can rescale the provided bitmap up
41 // to the desired size. 42 // to the desired size.
42 void SendThemeImage(const content::URLDataSource::GotDataCallback& callback, 43 void SendThemeImage(const content::URLDataSource::GotDataCallback& callback,
43 int resource_id, 44 int resource_id,
44 float scale); 45 float scale);
45 46
46 // The profile this object was initialized with. 47 // The profile this object was initialized with.
47 Profile* profile_; 48 Profile* profile_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(ThemeSource); 50 DISALLOW_COPY_AND_ASSIGN(ThemeSource);
50 }; 51 };
51 52
52 #endif // CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_ 53 #endif // CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/large_icon_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