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

Side by Side Diff: ui/base/resource/resource_bundle.h

Issue 291073002: Move IsScaleFactorSupported, FindClosestScaleFactorUnsafe to ui/base/resource_bundle.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/layout.cc ('k') | ui/base/resource/resource_bundle.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 UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 5 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // string if no locale data files are found and |test_file_exists| is true. 249 // string if no locale data files are found and |test_file_exists| is true.
250 // Used on Android to load the local file in the browser process and pass it 250 // Used on Android to load the local file in the browser process and pass it
251 // to the sandboxed renderer process. 251 // to the sandboxed renderer process.
252 base::FilePath GetLocaleFilePath(const std::string& app_locale, 252 base::FilePath GetLocaleFilePath(const std::string& app_locale,
253 bool test_file_exists); 253 bool test_file_exists);
254 254
255 // Returns the maximum scale factor currently loaded. 255 // Returns the maximum scale factor currently loaded.
256 // Returns SCALE_FACTOR_100P if no resource is loaded. 256 // Returns SCALE_FACTOR_100P if no resource is loaded.
257 ScaleFactor GetMaxScaleFactor() const; 257 ScaleFactor GetMaxScaleFactor() const;
258 258
259 protected:
260 // Returns true if |scale_factor| is supported by this platform.
261 static bool IsScaleFactorSupported(ScaleFactor scale_factor);
262
259 private: 263 private:
260 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetPathForLocalePack); 264 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetPathForLocalePack);
261 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetImageNamed); 265 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetImageNamed);
262 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetNativeImageNamed); 266 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetNativeImageNamed);
263 267
264 friend class ResourceBundleImageTest; 268 friend class ResourceBundleImageTest;
265 friend class ResourceBundleTest; 269 friend class ResourceBundleTest;
266 270
267 class ResourceBundleImageSource; 271 class ResourceBundleImageSource;
268 friend class ResourceBundleImageSource; 272 friend class ResourceBundleImageSource;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 397
394 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); 398 DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
395 }; 399 };
396 400
397 } // namespace ui 401 } // namespace ui
398 402
399 // TODO(beng): Someday, maybe, get rid of this. 403 // TODO(beng): Someday, maybe, get rid of this.
400 using ui::ResourceBundle; 404 using ui::ResourceBundle;
401 405
402 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 406 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
OLDNEW
« no previous file with comments | « ui/base/layout.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698