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

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

Issue 10686005: Add methods to add DataPack from open files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
« no previous file with comments | « webkit/support/platform_support_android.cc ('k') | webkit/support/platform_support_mac.mm » ('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 #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"
(...skipping 11 matching lines...) Expand all
22 void BeforeInitialize(bool unit_test_mode) { 22 void BeforeInitialize(bool unit_test_mode) {
23 } 23 }
24 24
25 void AfterInitialize(bool unit_test_mode) { 25 void AfterInitialize(bool unit_test_mode) {
26 if (unit_test_mode) 26 if (unit_test_mode)
27 return; // We don't have a resource pack when running the unit-tests. 27 return; // We don't have a resource pack when running the unit-tests.
28 28
29 FilePath data_path; 29 FilePath data_path;
30 PathService::Get(base::DIR_EXE, &data_path); 30 PathService::Get(base::DIR_EXE, &data_path);
31 data_path = data_path.Append("DumpRenderTree.pak"); 31 data_path = data_path.Append("DumpRenderTree.pak");
32 ResourceBundle::InitSharedInstanceWithPakFile(data_path); 32 ResourceBundle::InitSharedInstanceWithPakPath(data_path);
33 } 33 }
34 34
35 void BeforeShutdown() { 35 void BeforeShutdown() {
36 ResourceBundle::CleanupSharedInstance(); 36 ResourceBundle::CleanupSharedInstance();
37 } 37 }
38 38
39 void AfterShutdown() { 39 void AfterShutdown() {
40 } 40 }
41 41
42 } // namespace webkit_support 42 } // namespace webkit_support
(...skipping 27 matching lines...) Expand all
70 if (!success) 70 if (!success)
71 LOG(FATAL) << "Failed reading: " << path.value(); 71 LOG(FATAL) << "Failed reading: " << path.value();
72 } 72 }
73 return resize_corner_data; 73 return resize_corner_data;
74 } 74 }
75 } 75 }
76 76
77 return ResourceBundle::GetSharedInstance().GetRawDataResource( 77 return ResourceBundle::GetSharedInstance().GetRawDataResource(
78 resource_id, scale_factor); 78 resource_id, scale_factor);
79 } 79 }
OLDNEW
« no previous file with comments | « webkit/support/platform_support_android.cc ('k') | webkit/support/platform_support_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698