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

Side by Side Diff: webkit/support/platform_support_linux.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert ptr to bool for win compile. 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 unified diff | Download patch | Annotate | Revision Log
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 #include "webkit/support/platform_support.h" 5 #include "webkit/support/platform_support.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "base/string_piece.h" 12 #include "base/string_piece.h"
13 #include "grit/webkit_resources.h" 13 #include "grit/webkit_resources.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/base/resource/resource_handle.h"
15 #include "webkit/support/test_webkit_platform_support.h" 16 #include "webkit/support/test_webkit_platform_support.h"
16 17
17 namespace webkit_support { 18 namespace webkit_support {
18 19
19 // TODO(tkent): Implement some of the followings for platform-dependent tasks 20 // TODO(tkent): Implement some of the followings for platform-dependent tasks
20 // such as loading resource. 21 // such as loading resource.
21 22
22 void BeforeInitialize(bool unit_test_mode) { 23 void BeforeInitialize(bool unit_test_mode) {
23 } 24 }
24 25
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (resize_corner_data.empty()) { 66 if (resize_corner_data.empty()) {
66 FilePath path = resources_path.Append("textAreaResizeCorner.png"); 67 FilePath path = resources_path.Append("textAreaResizeCorner.png");
67 bool success = file_util::ReadFileToString(path, &resize_corner_data); 68 bool success = file_util::ReadFileToString(path, &resize_corner_data);
68 if (!success) 69 if (!success)
69 LOG(FATAL) << "Failed reading: " << path.value(); 70 LOG(FATAL) << "Failed reading: " << path.value();
70 } 71 }
71 return resize_corner_data; 72 return resize_corner_data;
72 } 73 }
73 } 74 }
74 75
75 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); 76 return ResourceBundle::GetSharedInstance().GetRawDataResource(
77 resource_id, ui::ResourceHandle::kScaleFactorNone);
76 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698