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

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

Issue 7698005: Move base/resource_util.* into base/win/ since it's windows specific. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/resource_util.h"
13 #include "base/string16.h" 12 #include "base/string16.h"
14 #include "base/string_piece.h" 13 #include "base/string_piece.h"
14 #include "base/win/resource_util.h"
15 #include "grit/webkit_chromium_resources.h" 15 #include "grit/webkit_chromium_resources.h"
16 #include "grit/webkit_resources.h" 16 #include "grit/webkit_resources.h"
17 17
18 #define MAX_LOADSTRING 100 18 #define MAX_LOADSTRING 100
19 19
20 namespace { 20 namespace {
21 21
22 FilePath GetResourceFilePath(const char* ascii_name) { 22 FilePath GetResourceFilePath(const char* ascii_name) {
23 FilePath path; 23 FilePath path;
24 PathService::Get(base::DIR_EXE, &path); 24 PathService::Get(base::DIR_EXE, &path);
25 path = path.AppendASCII("DumpRenderTree_resources"); 25 path = path.AppendASCII("DumpRenderTree_resources");
26 return path.AppendASCII(ascii_name); 26 return path.AppendASCII(ascii_name);
27 } 27 }
28 28
29 base::StringPiece GetRawDataResource(HMODULE module, int resource_id) { 29 base::StringPiece GetRawDataResource(HMODULE module, int resource_id) {
30 void* data_ptr; 30 void* data_ptr;
31 size_t data_size; 31 size_t data_size;
32 return base::GetDataResourceFromModule(module, resource_id, &data_ptr, 32 return base::win::GetDataResourceFromModule(module, resource_id, &data_ptr,
33 &data_size) 33 &data_size)
34 ? base::StringPiece(static_cast<char*>(data_ptr), data_size) 34 ? base::StringPiece(static_cast<char*>(data_ptr), data_size)
35 : base::StringPiece(); 35 : base::StringPiece();
36 } 36 }
37 37
38 base::StringPiece ResourceProvider(int key) { 38 base::StringPiece ResourceProvider(int key) {
39 return GetRawDataResource(::GetModuleHandle(NULL), key); 39 return GetRawDataResource(::GetModuleHandle(NULL), key);
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 } 99 }
100 return resize_corner_data; 100 return resize_corner_data;
101 } 101 }
102 } 102 }
103 103
104 return ResourceProvider(resource_id); 104 return ResourceProvider(resource_id);
105 } 105 }
106 106
107 } // namespace webkit_glue 107 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « ui/gfx/canvas_direct2d_unittest.cc ('k') | webkit/tools/test_shell/test_shell_platform_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698