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

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

Issue 2278423002: Misc. cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot a few Created 4 years, 3 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
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 22 matching lines...) Expand all
33 std::string GetMimeType(const std::string& path) const override; 33 std::string GetMimeType(const std::string& path) const override;
34 base::MessageLoop* MessageLoopForRequestPath( 34 base::MessageLoop* MessageLoopForRequestPath(
35 const std::string& path) const override; 35 const std::string& path) const override;
36 bool ShouldReplaceExistingSource() const override; 36 bool ShouldReplaceExistingSource() const override;
37 bool ShouldServiceRequest(const net::URLRequest* request) const override; 37 bool ShouldServiceRequest(const net::URLRequest* request) const override;
38 38
39 private: 39 private:
40 // Fetch and send the theme bitmap. 40 // Fetch and send the theme bitmap.
41 void SendThemeBitmap(const content::URLDataSource::GotDataCallback& callback, 41 void SendThemeBitmap(const content::URLDataSource::GotDataCallback& callback,
42 int resource_id, 42 int resource_id,
43 float scale_factor); 43 float scale);
44 44
45 // Similar to SendThemeBitmap but treat the responded data as image; if the 45 // Similar to SendThemeBitmap but treat the responded data as image; if the
46 // resource bundle does not contain the data for |scale_factor|, the resource 46 // resource bundle does not contain the data for |scale|, the resource bundle
47 // bundle falls back to the data of a lower scale, which means smaller images 47 // falls back to the data of a lower scale, which means smaller images will be
48 // will be served and webui handles the image incorrectly. 48 // served and webui handles the image incorrectly. See crbug.com/442384.
49 // See crbug.com/442384.
50 void SendThemeImage(const content::URLDataSource::GotDataCallback& callback, 49 void SendThemeImage(const content::URLDataSource::GotDataCallback& callback,
51 int resource_id, 50 int resource_id,
52 float scale_factor); 51 float scale);
sky 2016/08/26 16:25:46 Why do you prefer scale over scale_factor? I belie
Peter Kasting 2016/08/26 19:14:57 ScaleFactor is an enum, while "scale" is a float v
53 52
54 // The original profile (never an OTR profile). 53 // The original profile (never an OTR profile).
55 Profile* profile_; 54 Profile* profile_;
56 55
57 // We grab the CSS early so we don't have to go back to the UI thread later. 56 // We grab the CSS early so we don't have to go back to the UI thread later.
58 scoped_refptr<base::RefCountedMemory> css_bytes_; 57 scoped_refptr<base::RefCountedMemory> css_bytes_;
59 58
60 DISALLOW_COPY_AND_ASSIGN(ThemeSource); 59 DISALLOW_COPY_AND_ASSIGN(ThemeSource);
61 }; 60 };
62 61
63 #endif // CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_ 62 #endif // CHROME_BROWSER_UI_WEBUI_THEME_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/password_manager_list.js ('k') | chrome/browser/ui/webui/theme_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698