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

Unified Diff: ui/base/resource/resource_data_dll_win.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac and win compile errors. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/resource/resource_data_dll_win.cc
diff --git a/ui/base/resource/resource_data_dll_win.cc b/ui/base/resource/resource_data_dll_win.cc
index 48e9db1dbd9f4af28f210dbbaa148b578c865721..4b3bcf3ac3fa132b3df870614e95d54c9245da00 100644
--- a/ui/base/resource/resource_data_dll_win.cc
+++ b/ui/base/resource/resource_data_dll_win.cc
@@ -17,6 +17,18 @@ ResourceDataDLL::ResourceDataDLL(HINSTANCE module) : module_(module) {
ResourceDataDLL::~ResourceDataDLL() {
}
+bool ResourceDataDLL::HasResource(uint16 resource_id) const {
+ void* data_ptr;
+ size_t data_size;
+ if (base::win::GetDataResourceFromModule(module_,
tony 2012/05/15 20:19:56 Can you just return the results of this function c
flackr 2012/05/16 13:39:23 Done.
+ resource_id,
+ &data_ptr,
+ &data_size)) {
+ return true;
+ }
+ return false;
+}
+
bool ResourceDataDLL::GetStringPiece(uint16 resource_id,
base::StringPiece* data) const {
DCHECK(data);
@@ -48,8 +60,8 @@ ResourceHandle::TextEncodingType ResourceDataDLL::GetTextEncodingType() const {
return BINARY;
}
-float ResourceDataDLL::GetScaleFactor() const {
- return 1.0;
+ScaleFactor ResourceDataDLL::GetScaleFactor() const {
+ return ui::kScaleFactorNone;
}
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698